Last post Jul 27, 2014 02:54 AM by Sh4rk
Jul 26, 2014 12:11 PM|Sh4rk|LINK
I have a little problem :
I try to publish a site on a server.
I made my site with
Web Forms directly on IIS.
I compiled with command line aspx.cs files that giving an
output to a DLL int the
Bin directory : i called it MyWebSite.dll.
In localhost (IIS),
web site works
perfectly. But when i upload my files to the server (all the .aspx.cs, the .aspx, the \Bin\MyWebSite.dll) and when
i try my website, it display :
Could not load file or assembly 'MyWebsite.dll' or one of its dependencies. The specified module could not be found.
I peel the
web in search of
solution in vain.
Thank you in advance for
Jul 26, 2014 01:51 PM|Rajneesh Verma|LINK
Could you try after publishing the website.
Jul 26, 2014 02:40 PM|markfitzme|LINK
Is the directory that you are uploading to marked as an application? If not, then it would be looking for the dll in another location, namely the bin directory of whatever directory above in the hierarchy that is marked as an application.
Also, are you referencing any other libraries? If so then it could be reporting that a dll it references is missing. The error can be misleading because it mentions mywebsite.dll, which most people latch onto as the error, but also states "or one of it's
dependencies". That last one is trickier to debug especially if you don't have full access to the server. If you have full access to the server, the error should also describe how to enable Fusion logging in the registry. With fusion logging turned on (you
will definitely need to restart the website and app pool before trying again and hopefully not restart the server) it will also show exactly which dll it depends on that it can't find.
Jul 26, 2014 03:23 PM|Sh4rk|LINK
Thanks for yours answers.
In the server directory, there just three folders and one file (before i upload mines) :
and file Web.config
I put my dll in Bin. In my code i juste use these references :
Jul 26, 2014 03:45 PM|markfitzme|LINK
In IIS is that directory marked as an application?
Jul 26, 2014 04:30 PM|Sh4rk|LINK
Yes, for sure.
Jul 26, 2014 05:27 PM|markfitzme|LINK
Ok, next up you're positive that the application pool on the server is configured for the correct version of the framework? Even if the version you are using is installed, that doesn't mean the application pool is running that particular version.
You could then be running into an issue when the app attempts to load a dependent dll, but is picking up the wrong version. Example: The app is configured for ASP.Net 4.x, but the reference in the web.config sates 3.5.
Jul 27, 2014 02:54 AM|Sh4rk|LINK
Server and localhost run the same version of the .NET Framework (4.0.30319).