Hello Isasc,
Could you please try the following two methods?
1) Change web.config file:
Please try the following steps to solve the problem without changing the C#
code in the default.aspx.
1. Open the web.config in notepad.
2. Locate the following line in the config file:
</system.web>
3. Replace the line with the following text:
<browserCaps>
<use var="HTTP_USER_AGENT" as="user_agent" />
<filter>
<case match="Windows CE" with="%{user_agent}">
IsMobileDevice = "true"
</case>
</filter>
</browserCaps>
4. Save the web.config.
5. Browse the page again in Pocket PC 2003.
This config is to tell the system if the HTTP_USER_AGENT information
contains "Windows CE", we'd like to set the IsMobileDevice to true. So,
Request.Browser["IsMobileDevice"] will returns true if the HTTP_USER_AGENT
contains "Windows CE".
if (Request.Browser["IsMobileDevice"] == "true") {
Response.Redirect("MobileDefault.aspx");
}
else {
Response.Redirect("DesktopDefault.aspx");
}
For Pocket PC 2002/2003 and Smartphone 2003, the HTTP_USER_AGENT always
contains "Windows CE". This is why the above method works.
2) Another way you can try is to change C# code:
To solve the problem, please open the default.aspx page of the Portal and
locate the following code:
if (Request.Browser["IsMobileDevice"] == "true")
Replace the above code with the following solves the problem:
if (Request.Browser["IsMobileDevice"] == "true" ||
Request.Browser["Platform"] == "WinCE")
Hope that helps.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C
www.microsoft.com/security Register to Access MSDN Managed Newsgroups!
-
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.