1

I am creating a small website which consists of one asp page, its codebehind, and an additional project containing some library code. I can run this in the Visual Studio development environment and it's all spiffing.

I publish this website using the FileSystem method (I can't get either Web Deploy or FTP to work, but that's another question) to a local directory and then copy the resulting files to the server.

On invoking the website, I get the old favourite error:-

Could not load the assembly 'App_Web_qwertyuiop'. Make sure that it is compiled before accessing the page.

I have looked into the solutions provided here. I don't understand the accepted answer, and I have checked the application pool is running the same .Net framework as the code is compiled for. The other answers are not applicable, so far as I can tell.

The answer given here doesn't make any sense. There are no files present in any Temporary ASP.NET Files folder as suggested here, and modifying the web.config as suggested doesn't fix the problem. I have fixed the permissions as suggested here, and the option given in the last answer doesn't exist on my version of IIS.

Is there anything else I can try?

Edit I created the web site in IIS by using Sites -> Add Website. The files are found in the directory C:\inetpub\wwwroot\mywebsite; this contains a directory \bin where the file App_Web_qwertyuiop is found, along with a dll for the library functions.

Community
  • 1
  • 1
Brian Hooper
  • 21,544
  • 24
  • 88
  • 139

3 Answers3

0

Have you created an application or a virtual directory for this in IIS? Also have you copied the binaries of your application in the folder in the application directory or directly into the application directory. The latter is what we should do. You can give it a try and see if it helps!

Marshaler
  • 1
  • 1
  • Thank you for your suggestion. I have answered your question in the edit. I haven't created a virtual directory, as I have no idea what it should be called or how it should be defined. – Brian Hooper Nov 10 '15 at 11:04
0

Its might be a issue with Application pool so whenever you will upload your website on IIS server, first do re-cycle your application pool and browse your website on browser.

  • Thank you for the suggestion; I have stopped all the application pools and all the websites, deleted and recreated the website files, and restarted everything. The result is the same error as before. – Brian Hooper Nov 10 '15 at 13:37
0

Can you enable IIS logs and see if you get any error or detailed stack of the issue.

From the basic concept, it seems asp.net is generating the assembly on fly and writing to disk or loading directly into memory. For some reason, either its not able to write to disk or somehow the assembly load fails.

In this case, you can try using Fusion Log tool. This might give you clue as to why the assembly binding failed and where all it tried to look for loading this assembly.

Marshaler
  • 1
  • 1
  • Thank you for your help. I have (I think) managed to enable logging, and a list of entries when I attempted to display the web site are produced. I have run up the Fusion Logging application but the display is blank. All the settings are greyed out too, which suggests I'm not doing this quite right. – Brian Hooper Nov 10 '15 at 13:51