302 found response

后端 未结 2 1204
情深已故
情深已故 2020-12-31 01:32

I have implemented ajax request to populate my drop down fields. It is working Fine but when I stay idle for some time and select some value in drop down the ajax request ge

相关标签:
2条回答
  • 2020-12-31 01:46

    In your code you should check whether a session is available, because when a GET/POST request is sent, there may be additional requests for images or other resources. Sessions won’t be available for those requests.

    if (Context.Session != null)
    {
        // your code
    }
    
    0 讨论(0)
  • 2020-12-31 01:55

    The 302 status code indicates that the resource you are requesting has redirected to another resource. If this is behind some authentication, or requiring a session to be active then yes, it would follow that the session timing out is responsible for the ajax resource being called to redirect to possibly a login screen maybe.

    I would seriously recommend using something like Charles or Fiddler to track the requests being made.

    0 讨论(0)
提交回复
热议问题