问题描述:

I am working on client's application in which we have two servers - development server and testing server.

We first develop applications on development server and then publish it and host it on test server for client testing.

Testing server has Microsoft .NET framework 3.5 SP1

On development we have Visual Studio 2010.

We publish the website on development server using VS 2010 and then copy that folder to testing server and host it on it's IIS.

Whenever we try access any aspx page of site hosted on testing server, we get error "Could not load assembly App_Web_xxxxxx.dll". Make sure it is compiled before accessing the page"

Please help.

网友答案:

This could be due to a lot of reasons. I would start by trying one of the following things..

  • Make sure your IIS Site has the correct .net version specified - same as your application
  • Make sure you have all the required .net components installed in windows features (control panetl)
  • Look at event viewer for more errors and post it here
网友答案:

OK guys here is the solution.

Since my testing server is having Microsoft .NET framework 3.5 so on the development server while publishing from VS 2010, I have to choose target framework as 3.5.

Do this:

Right click web site -> Property Page -> Build -> Change the target framework.

After doing this setting, publish the web site again.

相关阅读:
Top