views:

150

answers:

2

My application works fine on localhost. But when I publish it to the server , it throws the exception below.
It was working yesterday, but I added some simple file IO operations to global.asax and some other parts in code, i try to write log to some file in server side ..

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value  [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value    [HKLM\Software\Microsoft\Fusion!EnableLog].



Stack Trace: 


[FileNotFoundException: Could not load file or assembly 'MyApplication' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +78
System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +64
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +51
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +38
A: 

My assumption would be that you haven't marked the target folder as an "application" is IIS, meaning it will be looking in the wrong place for the "bin" folder. You can do this in the IIS manager on the server; the folder should have a "cog" icon, indicating that it knows it is an application. If not: right-click on the folder and go into the properties; there should be a "Create Application" button (or similar). Also verify that ASP.NET is set to 2.0.* (on the ASP.NET tab).

(disclosure: there was a "moderator" flag suggesting this belongs on serverfault, but I disagree: knowing how to get an ASP.NET app working (even on a server) is a development issue)

Marc Gravell
A: 

is MyApplication.dll present in the bin folder? check it or give some details more about how you published the website

Marco Mangia

related questions