Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would suggest <strong>not</strong> attempting to read the <code>Request.InputStream</code> during <code>Application_Start</code> - it's used for initialising the application. Accessing the Request object from within Application_Start results in an exception "Request is not available in this context."</p> <p>The fact that you are wanting to read the input stream suggests you should be using <code>Application_BeginRequest</code> instead - <em>this has access to request and response</em>.</p> <p>In Summary:</p> <ol> <li><p><code>Application_Start</code><br> Fires once when the application starts. While usually triggered by the first request, it occurs before the first request is set up. Don't do request specific code in here as it doesn't have access to Request and Response.</p></li> <li><p><code>Application_BeginRequest</code><br> Fires for every request before any page handlers are invoked - you can read the input, write to response, end the request, etc...</p></li> </ol> <p>See these SO articles for more info:</p> <ul> <li><a href="https://stackoverflow.com/questions/2518057/request-is-not-available-in-this-context">Request is not available in this context</a></li> <li><a href="https://stackoverflow.com/questions/1593128/replacement-for-httpcontext-current-request-servervariablesserver-name-in-in/">Replacement for HttpContext.Current.Request.ServerVariables[&quot;SERVER_NAME&quot;] in Integrated Mode</a></li> <li><a href="https://stackoverflow.com/questions/9607738/when-does-httprequest-get-created">When does HttpRequest get created?</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload