There is a file upload function in the project, you need to display the file upload progress. The Webservice/webmethod is then called with Pagemethods.
Test everything normally in the demo. However, you cannot asynchronously refresh the file upload progress after moving to the project.
After debugging, it is found that the session information is not up-to-date when the File upload page is updated because of asynchronous refresh.
also found in Web. config is the following settings
<sessionstate mode= "StateServer" stateconnectionstring= "tcpip=localhost:42424" cookieless= "false" timeout= "30"/ >
The asynchronous flush works correctly after the comment is dropped, so it concludes
Setting session saved after StateServer caused Webservice/webmethod unable to get session asynchronously
However, when commented out, it causes the session to be lost unexpectedly.
Find a variety of materials have not found a way to solve.
And then accidentally remembered the application can also store objects
So: Replace session with Application