Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have just migrated some sites to IIS7 from IIS6, and am experiencing problems with one of the sites.

When a request comes in for the site (www.ourdomain.com/site1/) with a trailing slash everything is fine. But if the trailing slash is left out (www.ourdomain.com/site1), then the request fails.

Apparently it doesn't do a 301 redirect on the slashl-less URL, resulting in ASP.NET throwing an exception. This is not happening with the other sites at the same domain.

What can be the cause of this?

EDIT: The exception I get is this: System.Web.HttpException: Failed to Execute URL. at System.Web.Hosting. ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) at System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

share|improve this question
    
MattB - The StaticFile handler is set as you describe, except for its path, which is: . Could that be it you think? –  rohde Aug 12 '09 at 10:24
    
Ummm..somehow the asterisk dissapeared. The path for the handler is x.x (where x is standin for asterisk) –  rohde Aug 12 '09 at 10:25

1 Answer 1

Can you give more details about the error you are getting? My first guess is that the StaticFile handler mapping is not present (or not configured properly). In the Handler Mappings setup, you should have a Module Mapping with the following settings:

name: StaticFile
path: *
type: StaticFileModule,DefaultDocumentModule,DirectoryListingModule

Request Restrictions:
mapping: invoke on file or folder
verbs: all
access: read

If this is the problem, you would be getting a 404.4/not found error, with sub error "the resource you are looking for does not have a handler associated with it"

share|improve this answer
    
The static file handler's path is x.x (here x symbolizes the asterisk), maybe that is the issue? I have edited the post with the exeption details –  rohde Aug 12 '09 at 13:00
    
Yes, having it be x.x instead of just * could cause it to be a problem. I just tried it on my test system, and the redirect failed as you outlined above. I didn't get an exception though, just the 404.4 error. Try changing to just * and see if it helps –  MattB Aug 12 '09 at 14:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.