Problems with an ASP.NET session on a production server

This is a rather vague question as I was not able to reproduce my problems outside of our web server, and I'm not sure if my two problems are related.

My application server is running Windows Server 2003 and has open access. The ASP.NET web application runs on .NET 3.5 and uses (closed) SQL Server (2008) on the local network. The server running SQL Server also contains SQL Server Reporting Services, which are used in our web application through a page containing the MS ReportViewer control.

The application used to work with .NET 1.1 was ported to 3.5 last year. The database was SQL Server 2000, and it was updated in a separate release earlier this year.

I ran into two strange problems in our deployment: it should be configured, but I ran out of suspicion.

Both problems are related to the loss of user sessions.

The first occurs in reports and runs in the ReportViewer control. Infrequently, our users will try to manipulate the report (I found one reproducible case for a particular user and a combination of reports - an exception always occurs when trying to change report pages).

The exception call stack looks like this:

Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session expired or could not be found in Microsoft.Reporting.WebForms.ViewerDataOperation..ctor () in Microsoft.Reporting.WebForms.ReportDataOperation..ctor (Boolean requireFullReportLoad) in Microsoft.Reporting. WebForms.HttpHandler.GetHandler (String operationType) in Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest (HttpContext context) in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecppepep.epecutepep ExecuteStep (IExecutionStep step, logical and completed synchronously)

The web application is configured to use the InProc state repository, so the second IIS process will not be able to find the user session - which, as a rule, means this exception, according to several blogs that I read. I could see that IIS sends additional requests to another workflow ... Except that the site is configured to use one process. This exception should not be thrown - so IIS GUI tools lie to me that the web application is configured as single-processor, or the exception message does not describe the real problem.

I created a new application pool in IIS that is configured to process workflows every 10,000 requests, as well as at 2 a.m. (Request rule 10000 is an old solution for solving a problem that may or may not exist until now - the problem and information about it precede me, and I am not inclined to experiment with it) On the performance tab, the maximum number of work processes is 1.

The only fix I could come up with was to keep track of what ReportViewer users were saying, namely, to switch the status server mode from InProc to using a serialization model outside the process. I chose the ASP.NET status server.

It works great on every server except production. When I included it in production, each user had the following experience:

1) Click the login page, enter your credentials, log in 2) Click any link from the main page 3) Download back to enter the screen. Re-enter credentials, log in. 4) The site works fine until the user logs out.

Once again, this problem existed only on this production server and did not reproduce on my dev machine, our test server, or our public demo server.

Are they related? Maybe, maybe not. With such little useful diagnostic information, I have few ideas left. If someone hits something like this or has an idea of ​​a new path, I can go down, I would really appreciate it.

+4
source share
1 answer

I managed to solve both problems.

The second problem (the need to log in twice) is no longer reproducible. I reregistered ASP.NET (aspnet_regiis), trying to fix another patch that might or another unrelated configuration change did this.

The main problem is a bug in the ReportViewer control. For some reason, ASP.NET began to log more exceptions leading to the one I reported, and I got a hint of the root cause described in this Connect problem:

https://connect.microsoft.com/VisualStudio/feedback/details/556989/blank-gif-resource-generates-server-error-in-reportviewer-in-non-ie-browsers?wa=wsignin1.0#tabs

I also posted a workaround. This is a bug in the web service that ReportViewer passes. The error was resolved only by browsers other than IE.

+2
source

All Articles