Click here to Skip to main content
15,885,918 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I publish my website to my server and when I try to run it I get the following exception:

Could not load the assembly 'App_Web_kh7-x3ka'.
Posted

Looks like the name of a dynamically created assembly. E.g. when you use XMLSerialization, a dll is created at runtime which contains the code for that purpose.
Now, either the creation of that dll failed (user has no rights to execute csc.exe), or loading the freshly generated dll failed which could be due to a virus scanner still scrutinizing it, or security settings.
Hence check that the security settings of the server allow IIS to generate assemblies and to load those assemblies.
 
Share this answer
 
XML
On the first line of your aspx page within the <%@Page /> tag you’ll probably see an attribute like:

inherits="yourPageClass, App_Web_kh7-x3ka".

Delete the "App_Web_XXXX" part and add the CodeFile attribute pointing to your code behind file:

CodeFile="yourPageFile.aspx.cs"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900