HTTP Error 404

Feb 19, 2011 at 3:42 AM

Hi, Thank you  for the excellent work!

I followed all instructions here for this to work with WebForms 3.5

the SampleWebApplication example works perfect when I compile and run it using vs2008. However when I copy sources to my site, IIS6 returns systematically  404 error for the generated .xcr files

<link type="text/css" rel="stylesheet" href="/xpedite.083E4F6F094EA4E6.news2.css.xcr" />

 <link type="text/css" rel="stylesheet" href="/xpedite.FAFD51CF70656F86.news2.css.xcr" />

 

Thank you in advance if anyone can assist me

Feb 19, 2011 at 5:14 AM
Edited Feb 19, 2011 at 5:14 AM

Thank you, happy that the tool is useful to you.

With regard to the 404 error; one step that I should document is that you have to configure IIS to recognize the XCR (and potentially JS/CSS extensions). This will ensure that IIS routes all requests to the asp engine. I don't have an instance of IIS6 available at the moment, but if memory serves, you have to manually map the XCR file extension in the Mappings tab on the Application Configuration dialog. This dialog is accessible from the Home or Virtual Directory tab in the IIS Properties dialog.  Configure the same as the .aspx extension. This may also be required for the .CSS and .JS files if you are also serving standalone minified resources on the fly (not normally run through the ASP.NET engine).

If you continue to have trouble, please let me know and we will figure it out.

I will also try to track down an instance of IIS6 next week to formally document the steps.



Edit: IIS7 is nice enough to read this information directly from the web.config; so no manual configuration is required

Feb 23, 2011 at 3:03 PM

Hi and thanks for the quick reply.

Indeed, the mapping of the xcr extension just solves the problem.

Here are the steps to follow for II 6:

  1. Open the IIS Manager - click Start | Administrative Tools | Internet Information Services (IIS) Manager.
  2. Expand your server. Expand Web Sites. Right click your web site and choose Properties.
  3. Click the Home Directory tab, and then click the Configuration button.
  4. Get the path to the ASP.NET handler:
    1. Click the line with the .aspx extension.
    2. Click the Edit button.
    3. Copy the contents of the Executable box. If you use .Net 2 or .Net 3.5, it will be C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll.
    4. Click Cancel to close the dialog.
  5. Configure IIS 6 to let ASP.NET handle all requests for files with extension .xcr:

    1. Click the Add button.
    2. Paste the path to the ASP.NET handler you just found into the Executable field.
    3. Enter .xcr into the Extension field.
    4. Uncheck the Verify that file exists box.
    5. Click OK.
  6. Repeat the last step, for extensions .css and .js.
  7. Click OK to close the Configuration dialog.
  8. Click the Apply button, and then click OK to close the Properties dialog.

thanks again!

Feb 26, 2011 at 2:55 PM

Excellent, I am happy that was all that was required. If you encounter any further issues, please let me know.

Thanks also for the steps to configure; I rarely come across IIS6 these days, so it is good to have accurate set of steps that I can post.