« Previous Next »

Thread: URL without trailing slash fails

Last post 10-22-2009 7:58 PM by anilr. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 08-10-2009, 4:54 AM

    • rohdester
    • Not Ranked
    • Joined on 05-16-2007, 11:09 AM
    • Posts 5

    URL without trailing slash fails

    Hi

     We have just migrated from IIS6 to IIS7. We have a number of ASP.NET apps running on the server.

    We are experiencing problems with one of them.

    When we enter ourdomain.com/site1/ in the browser, everything works as expected. The site is loaded etc. But if we leave out the trailing slash we get an exception:

    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)
     
    This particular app is an ASP.NET Webforms app with its managed pipeline set to classic mode. This worked on II6 without any issues.

     

  • 08-10-2009, 9:17 AM In reply to

    Re: URL without trailing slash fails

     Looks like you have something responding to the directory name as a file.  Which technically is correct, since directory names are supposed to have a trailing slash.  Normally the browser or server will try a second request with the slash, but if you have something responding to an extensionless request that won't happen.

    But, since it failed to execute, my guess is that "site1" is really a substitute for a directory name similar to "example.com."  Since the .com extension is a legitimate executable extension in Windows, it is attempting to execute your folder name.  Stop using .com in folder names, it's really that simple.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 08-10-2009, 9:34 AM In reply to

    • rohdester
    • Not Ranked
    • Joined on 05-16-2007, 11:09 AM
    • Posts 5

    Re: URL without trailing slash fails

     Hi Jeff

    Thanks for the reply.

    But what you're suggesting is not the case. "site1" is the name of the folder as well as the name of the virtual directory hosting this particular ASP.NET application. And there is no dot-anything in the name.

  • 08-11-2009, 3:06 AM In reply to

    • rohdester
    • Not Ranked
    • Joined on 05-16-2007, 11:09 AM
    • Posts 5

    Re: URL without trailing slash fails

     Bump. Not anyone? This is driving me crazy.

  • 10-22-2009, 7:58 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: URL without trailing slash fails

    A failed request trace for the request + a copy of your handlers section (appcmd list config "your site/your app" -section:system.webServer/handlers) may help us diagnose the issue.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (5 items)
Microsoft Communities