开发者

When Deploying MVC 3 Application to IIS 7 The index pages load fine but when I select Menu item 404 Error Pops

I have BIN deployed my MVC 3 application to my local IIS7 server. It runs fine in Visual Basic. But in IIS 7 only the index pages for my views are accessible. If I select any menu item it throws this error:

Server Error in '/' Application

The Resource cannot be found

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavalible. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Admin/import_excel.vbhtml

Version Information: Microsoft.NET Framework Version 4.0.30319; ASP.NET Version 4.0.30319.237

Below is a copy of the routing table that is being used as well....

            Public Class MvcApplication
                   Inherits System.Web.HttpApplication

            Shared Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection)
                filters.Add(New HandleErrorAttribute())
            End Sub

            Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
               routes.IgnoreRoute("{resource}开发者_Go百科.axd/{*pathInfo}")

            ' MapRoute takes the following parameters, in order:
            ' (1) Route name
            ' (2) URL with parameters
            ' (3) Parameter defaults
              routes.MapRoute( _
              "Default", _
               "{controller}/{action}/{id}", _
            New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} _
    )

             End Sub

             Sub Application_Start()
             AreaRegistration.RegisterAllAreas()

             RegisterGlobalFilters(GlobalFilters.Filters)
             RegisterRoutes(RouteTable.Routes)
             End Sub
             End Class

Anyone know where I might be going wrong at?????


figured out what was wrong... I had a problem with Microsoft.ACE not being registered on the server machine. I found a thread in a forum that said to change the Target Cpu to x86. Later I found that I just needed to download the ace data assemblies but never changed the Target CPU back to ANY. After changing it back I recompiled and deployed it again with no problems... Although I am still lost as to why this would cause only 404's on some pages and not all....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜