Microsoft KB Archive/310904

= PRB: Internal Server Error (500) Occurs upon Postback =

Article ID: 310904

Article Last Modified on 6/14/2002

-

APPLIES TO


 * Microsoft Mobile Internet Toolkit 1.0

-



This article was previously published under Q310904



SYMPTOMS
When browsing a mobile Web Form page with the OmniSky browser on a Palm Vx, you may receive the following error message:

Internal Server Error (500)



CAUSE
This behavior occurs because the OmniSky browser on the Palm Vx does not support cookies. When the page is posted back to the server, the mobile runtime is expecting a cookie that contains the session ID. This session ID is used to identify a unique session on the Web server that contains the ViewState information. Because cookies are not available, data that is maintained in ViewState is lost and is not available upon post back.



RESOLUTION
To resolve this behavior, enable cookieless sessions in your mobile Web application. Cookieless sessions store the session ID in the URL of the page. When the page is posted back to the server, the mobile runtime can identify the unique session on the server.

To enable cookieless sessions, modify the Web.config file in your Web application. Within the Web.config file, set the cookieless attribute of the  element to true:    



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Add a new mobile Web Form to a mobile Web application in Visual Studio .NET. Drag a Label control from the Mobile Web Forms section of the toolbox and drop it onto the mobile Web Form. Drag a Command control from the Mobile Web Forms section of the toolbox and drop it onto the mobile Web Form.</li> On the View menu, click Code.</li>  Add the following code to the Page_Load event: // C# Code Sample Label1.Text = &quot;Hello World&quot;; ' VB Code Sample Label1.Text = &quot;Hello World&quot; </li> Build the solution, and then view the page on the Palm Vx with the OmniSky browser. Click the Command button to perform a postback.</li></ol>

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbstate kbdevicespecific kbprb kbhtmldevice kbcookie KB310904

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.