title: Webresource.axd? - 500 internal server error
body: <p>im trying to use a file upload control from the obout control library, i really like it, and think its quite slick without any flash!..</p>
  
  <p>i downloaded the entire installer, played with the settings in the samples, and made the control act exactly as i wanted.</p>
  
  <p>i created a brand new web application ins vs2008, and included the web.config, dlls, and folders with style code, as well as the aspx page that i had tweaked to give me the desired output.</p>
  
  <p>i built the new project, and ran it, the control loaded, and works fine.</p>
  
  <hr>
  
  <p>now i want to use this in the already existing project that i have been working on, so i copied the web.config values, the dlls, and the folders with the style code and the aspx page that i tweaked..</p>
  
  <p>i put them in the same locations i did with the other project, built it and ran the page..
  everything loaded however when i clicked on a button i got a webresource.axd error, 2 actually, both with encryption at the end. </p>
  
  <p>after doing some research, it looks like the webresource.axd can be used to dynamically load javasript and css files etc... soo my guess at this point is the control uses this as a hidden way to include javascript files it requires.. and its failing on those includes.. which baffles me.</p>
  
  <p>i have stripped out everything from my project, and it is still failing, i found an article that stated it could be the iis configuration of the site, so i checked, i have the mapping to the .net 2.0 lib file, with the axd extension.. so i doubt that was the issue, however i did delete and recreate the iis site.. and it still does not work...</p>
  
  <p>i have included this line as well in the web config..</p>
  
  <pre><code>&lt;add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader" validate="true"/&gt;
  </code></pre>
  
  <p>this also did not seem to help..</p>
  
  <p>does anyone know where i can go with this?...</p>
  
  <p>EDIT:
  i came across this in the event viewer..</p>
  
  <pre><code>Event code: 3005 
  Event message: An unhandled exception has occurred. 
  Event time: 05/05/2009 2:38:16 PM 
  Event time (UTC): 05/05/2009 6:38:16 PM 
  Event ID: 8579dbce2f5844169b1740bb95ebffb1 
  Event sequence: 8 
  Event occurrence: 1 
  Event detail code: 0 
  
  Application information: 
      Application domain: /LM/W3SVC/1/Root/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem-12-128860222914549340 
      Trust level: Full 
      Application Virtual Path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem 
      Application Path: c:\inetpub\wwwroot\SVN_WORKSPACE\WWWROOT\WorkEstimateSystem\ 
      Machine name: GREGE6500 
  
  Process information: 
      Process ID: 2276 
      Process name: aspnet_wp.exe 
      Account name: GREGE6500\ASPNET 
  
  Exception information: 
      Exception type: HttpException 
      Exception message: Session state is not available in this context. 
  
  Request information: 
      Request URL: http://localhost/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd?d=gPWI1Nyst2kh_ORsvV-AHCh4GSmizSjDuHRCpBgAKBsmi1Zr6e44K950Zcfsdc4p2GuNTPmRl4yAADV0USSNLFQQ7sk-iY1WVt4JJWJE_yg1&amp;t=633771228432707325 
      Request path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd 
      User host address: 127.0.0.1 
      User:  
      Is authenticated: False 
      Authentication Type:  
      Thread account name: GREGE6500\ASPNET 
  
  Thread information: 
      Thread ID: 8 
      Thread account name: GREGE6500\ASPNET 
      Is impersonating: False 
      Stack trace:    at System.Web.HttpApplication.get_Session()
     at GlobalClass.CURRENT_EMPLOYEE_ID()
     at GlobalClass.checkLogin(String pagerequested)
     at GlobalClass.Application_OnPostRequestHandlerExecute(Object sender, EventArgs e)
     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
  
  
  Custom event details: 
  
  For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
  </code></pre>
  
  <hr>
  
  <p>the global.asax has some session start and end functions as well as application start and end functions.. is there any way to simply say if request is coming from an axd do something different or dont run these custom functions?</p>
  
  <p>FIXED:</p>
  
  <p>inside the global.asax page..</p>
  
  <pre><code>    Sub Application_OnPostRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
  select case requestedPageName
     case "webResource.axd"
      exit sub
  </code></pre>
  
  <p>this fixed it!</p>