简体   繁体   中英

Routing with Web Forms - Could not load System.Web.Routing

I am using:

  • ASP.NET 3.5 SP1 with Web Forms
  • Routing thru Global.asax (System.Web.Routing and RegisterRoutes)
  • IIS 7

Everything is working fine in my local machine, but it gives the following error in my hosting environment:

Could not load file or assembly 'System.Web.Routing, Version=3.5.0.0, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I did everything inside my web.config file mentioned in the following link:

http://msdn.microsoft.com/en-us/libr...8VS.90%29.aspx

But I am still getting the above error.

What else am I supposed to do fix the error?

Thank you for your help!

It could be possible that some settings in web.config are missing which are necessary when you host your application in IIS. Take a look at this article , especially Figure 2 which describes the configuration entries for IIS 7.

I remember that in ASP.NET 4 setting

<modules runAllManagedModulesForAllRequests="true" />

was enough and adding the modules and handlers in Figure 2 of this article wasn't required. But in ASP.NET 3.5 it might be necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM