Monday, March 19, 2012

Crazy error when too many rows (records) are requested

Hi,

I am hoping someone here can help me out with this crazy error. I have an rdlc that works fine most of the time. When the user selects certain large date ranges and requests a huge amount of data we get this error:

HttpException (0x80072745): Unable to make the session state request to the session state server. Please ensure that the ASP.NET State
service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it
accepts remote requests by checking the value of
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local
machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use
either 'localhost' or '127.0.0.1' as the server name.]
System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive
exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout,
SessionNDMakeRequestResults& results) +1565
System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData
item, Object lockId, Boolean newItem) +192
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +355
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Caveat; State Service is running.So, this solution is NOT germanehttp://forums.asp.net/t/1030680.aspx
Do to business requirements I cannot restrict the date ranges a user might enter

Any ideas, suggestions, work-arounds?? Thank you in advance!

I have finally figured out a "solution". Basically, I had to change how session was being managed. It was being manged by StateServer and I switched it to "InProc" and that seemed to do the trick.

Believe me I tried pretty muchEVERYTHING to get this to work and switching the session management was a last ditch, stab-in-the-dark try. And it worked. I think maybe there is some sort of bug with StateServer and rdlc files?

I was able to reproduce the error and the solution locally using a basic .aspx page with an rdlc control. I made a basic object for the data. Dumped a million rows onto the rdlc while running StateServer and got the error posted above. Then I just switched the session management to "InProc" and got the report to display the million rows. It took a bit of spinning but it eventually displayed. I hope this helps somebody out. Take care.
Smile


No comments:

Post a Comment