Asked by:
Storing Session in SQL Server - no records in ASPStateTempSessions table

Question
-
User366436490 posted
I'm at a loss on this issue - hopefully someone can help...
I installed the ASPState objects using: aspnet_regsql -S serverName -U UserName -P Password -ssadd -sstype p and verified all db objects were created successfully.
In IIS Manager I changed the Session State of the web site to 'SQL Server' and put in the correct (verified) connection string parameters. With 'Enable Custom Database' un-checked, Enable Compression un-checked and Use hosting identity for impersonation un-checked.
I changed a page on that web site to use Session and verified that I can store and read values from Session. When I query the table ASPState.dbo.ASPStateTempSessions there are no records in the table. Why is this? I'm guessing this web site is using 'In process' for storing Session State but it's not what I want. Also, if I change Session State to 'Not Enabled' I get an error in the application - which to me is specifying Session is being used.
How can I troubleshoot this???
Thanks,
Mike
Thursday, June 11, 2020 3:15 PM
All replies
-
User288213138 posted
Hi Mike1244,
In IIS Manager I changed the Session State of the web site to 'SQL Server' and put in the correct (verified) connection string parameters. With 'Enable Custom Database' un-checked, Enable Compression un-checked and Use hosting identity for impersonation un-checked.
I changed a page on that web site to use Session and verified that I can store and read values from Session. When I query the table ASPState.dbo.ASPStateTempSessions there are no records in the table. Why is this? I'm guessing this web site is using 'In process' for storing Session State but it's not what I want. Also, if I change Session State to 'Not Enabled' I get an error in the application - which to me is specifying Session is being used.
How can I troubleshoot this???
To find the root cause, we need to dig the exception. First of all , please check your event viewer. If no exception can be found in event viewer. It might be a first chance exception. Then you need to collect dump file with debug diagnostic collection and analyze the dump file with WINDBG.
Using Microsoft's Debug Diagnostics Tool
Best regards,
Sam
Friday, June 12, 2020 6:40 AM -
User366436490 posted
Hi,
Thanks for getting back to me.
I couldn't find any events that would relate to this issue in the Event Viewer. I download and installed WINDBG. Created a rule for my IIS App Pool and ran the tool. While the tool was running I stopped and restarted IIS and hit the page using session and nothing appeared as a userdump and the only entries in the log file were informational - no errors in the log file. In addition, I ran SQL Profiler and no sql queries were hitting the ASPState database. So it doesn't appear that IIS is not even making an attempt to use SQL Server.
I'm still at a loss as to why this is happening. Any other ideas????
Thanks,
MikeFriday, June 12, 2020 3:07 PM -
User288213138 posted
Hi Mike1244,
I couldn't find any events that would relate to this issue in the Event Viewer. I download and installed WINDBG. Created a rule for my IIS App Pool and ran the tool. While the tool was running I stopped and restarted IIS and hit the page using session and nothing appeared as a userdump and the only entries in the log file were informational - no errors in the log file. In addition, I ran SQL Profiler and no sql queries were hitting the ASPState database. So it doesn't appear that IIS is not even making an attempt to use SQL Server.Have you set the log stack trace in the action type for unconfigured first chance exceptions?
Best regards,
Sam
Tuesday, June 16, 2020 9:34 AM