2

I have upgraded my asp.net 3.5 app to 4.0 and added support for routing (added dlls are made "copy locaL"). It works perfectly locally. After deployed to IIS7 (using FileSystem publish method in VS2010) it gives me a 403 "access is denied" when I try to acces the base url (mysite.com). If I try to go to any route url (mysite.com/resources) it gives me a 404 error "File or Directory not found".

I have removed Authorization section in web.config. "Intergrated" is selected for managed pipeline mode in application pool conf. Http Redirection installed

Here is a pattern of my Global.ascx file

routes.MapPageRoute(
  "default",             // Route name 
  "{tab}",               // URL 
  "~/member/{tab}.aspx", // Physical ASPX file 
  false,
  new RouteValueDictionary(new {tab = "Default"})
);

routes.MapRoute(
  null,
  "{controller}/{action}/{id}",
  new {
    action = "Index",
    id = UrlParameter.Optional
  }
);

UPDATE: Accessing aspx pages directly like mysite.com/member/Default.aspx works without any issue.

Here is detailed error message:

**HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.**

    Module DirectoryListingModule 
    Notification ExecuteRequestHandler 
    Handler StaticFile 
    Error Code 0x00000000 

looks like the request is handled by the wrong Handler.

What I did miss here? Thanks in advance.

tereško
  • 58,060
  • 25
  • 98
  • 150
khaled
  • 132
  • 1
  • 11

0 Answers0