locked
How can I get a blank page after running several hours? RRS feed

  • Question

  • User-609535877 posted

    I implemented an intranet web form application with asp.net Identity in Visual Studio 2015 And use Windows authentication to authenticate application users / authorize user's role. The application mainly displays a SSRS report on the ReportSearch page.

    I didn't set OWIN cookie expiration date so it is default to 17 days and use StateServer to keep server session data from application pool recycle on testing site.

    On the testing site I can keep the ReportSearch page open for several hours and then click the link to reload the page. The issue is if I keep the page open long enough such as overnight until my second day work and click same link to reload the page, I got a blank page but didn't catch any errors.

    A. For the blank page there is only one log item

    2019-03-20 11:34:04 10.184.66.61 POST /PayrollReportSSO/SSRSReport/ReportSearch - 80 NYPDFINEST\ZHAO790 10.178.24.194 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko __AntiXsrfToken=7631422d7bea4fc2bc8f39395cb6b60a;+ASP.NET_SessionId=ymg2gpcixm0zqsfydyr3smev http://s1ppwebdev1/PayrollReportSSO/SSRSReport/ReportSearch s1ppwebdev1 200 0 0 4609

    B. For the working page there are 20 more log items for the same event and first several items as follows:

    2019-03-20 11:39:01 10.184.66.61 POST /PayrollReportSSO/SSRSReport/ReportSearch - 80 NYPDFINEST\ZHAO790 10.178.24.194 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko __AntiXsrfToken=7631422d7bea4fc2bc8f39395cb6b60a;+ASP.NET_SessionId=ymg2gpcixm0zqsfydyr3smev http://s1ppwebdev1/PayrollReportSSO/SSRSReport/ReportSearch s1ppwebdev1 200 0 0 31
    2019-03-20 11:39:40 ::1 POST /reportserver/ReportExecution2005.asmx - 80 - ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - - localhost 401 2 5 156
    2019-03-20 11:39:40 ::1 POST /reportserver/ReportExecution2005.asmx - 80 NYPDFINEST\WSS_App12 ::1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - - localhost 404 0 0 15
    2019-03-20 11:39:41 10.184.66.61 GET /PayrollReportSSO/SSRSReport/ReportSearch - 80 NYPDFINEST\ZHAO790 10.178.24.194 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko __AntiXsrfToken=7631422d7bea4fc2bc8f39395cb6b60a;+ASP.NET_SessionId=ymg2gpcixm0zqsfydyr3smev - s1ppwebdev1 200 0 0 2140

    Comparing these two log files, for the blank page case the steps beginning from second step are never executed. What is the real problem and how to fix it?

    Thanks in advance!

    Wednesday, March 20, 2019 6:33 PM

Answers

  • User-1174608757 posted

    Hi zhao790,

    So,have you tried to set the time of cookie? I think it will work since OWIN-Mixed Authentication is saved in cookie not in session.

    Best Regards

    Wei

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 10, 2019 1:37 AM

All replies

  • User475983607 posted

    I implemented an intranet web form application with asp.net Identity in Visual Studio 2015 And use Windows authentication to authenticate application users / authorize user's role. The application mainly displays a SSRS report on the ReportSearch page.

    I didn't set OWIN cookie expiration date so it is default to 17 days and use StateServer to keep server session data from application pool recycle on testing site.

    Windows Authentication does not use an OWIN cookie and Windows Authentication is not related to Session.

    On the testing site I can keep the ReportSearch page open for several hours and then click the link to reload the page. The issue is if I keep the page open long enough such as overnight until my second day work and click same link to reload the page, I got a blank page but didn't catch any errors.

    I can only assume the site stopped after no use and all state was lost.  Anyway a blank page usually indicates a 500 error.  

    Wednesday, March 20, 2019 7:18 PM
  • User-609535877 posted

    Thank you for your response, mgebhard.

    Windows Authentication does not use an OWIN cookie and Windows Authentication is not related to Session.

    Because not all Domain users are the application user. I use Windows Authentication to get user's AD account then is authenticated by OWIN Identity without the log on page.

    I can only assume the site stopped after no use and all state was lost.  Anyway a blank page usually indicates a 500 error.  

    I am thinking some communication information between the browser and web server was lost due to no activity. Which side is the state lost ( cookie or session)?  but how to check and fix it?

    Wednesday, March 20, 2019 10:07 PM
  • User475983607 posted

    I am thinking some communication information between the browser and web server was lost due to no activity. Which side is the state lost ( cookie or session)?  but how to check and fix it?

    I'm not sure as I cannot see the code.  As stated above a blank page usually indicated a 500 error on the server.  Review your exception handlers to make sure you are capturing all exceptions.  Take a look at the Event Viewer logs.

    Wednesday, March 20, 2019 10:30 PM
  • User-609535877 posted

    Hi megebhard, thank so much for your response.

    This intranet project is updated from default OWIN Identity "Individual User Account" template integrated with  OWIN Mixed Authentication library so the application user within our domain can automatically login by AD account in DB without Log on page.

    By now I configured the StateServer to keep server session data in case application pool recycle by

    <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false"/>

    in WebConfig

    After your last response I purposedly set application recycle time interval to 6000 min (100 hrs)  on testing server and keep the application inactive over last weekend. Monday morning I can continue running the application, didn't get blank page but after setting back recycle time to several hours I get the blank page.

    It sounds the session data lost communication with browser cookie after application pool recycle. I didn't catch exception in global.asa by

            void Application_Error(object sender, EventArgs e)
            {
                // Code that runs when an unhandled error occurs

                // Get the exception object.
                Exception exc = Server.GetLastError();
                if (exc is HttpUnhandledException)
                {
                    if (exc.InnerException != null)
                    {
                        exc = new Exception(exc.InnerException.Message);
                        Server.TransferRequest("~/ErrorPage.aspx?handler=Application_Error2%20-%20Global1.asax", true);
                    }
                    AppUtility.LogException(exc, "Global.aspx");
                }
            }

    and didn't find error or warning in web testing server event  Viewer log.

    Thursday, March 28, 2019 2:27 PM
  • User-1174608757 posted

    Hi zhao790,

    As far as I known, OWIN-Mixed Authentication is saved in cookie not in session. So if you set the time of this , you should set the time of cookie but not session,

    Did you use  OWIN-Mixed Authentication  this link?

    https://github.com/MohammadYounes/OWIN-MixedAuth

    Best Regards

    Wei

    Monday, April 1, 2019 9:48 AM
  • User-609535877 posted

    Yes, I used this OWIN-Mixed Authentication framework

    Tuesday, April 2, 2019 2:12 PM
  • User-1174608757 posted

    Hi zhao790,

    So,have you tried to set the time of cookie? I think it will work since OWIN-Mixed Authentication is saved in cookie not in session.

    Best Regards

    Wei

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 10, 2019 1:37 AM
  • User-609535877 posted

    After adding machine key in local webconfig it works now. Thanks!

    Wednesday, April 10, 2019 11:56 AM