I developed a web application which is working perfectly on my local (laptop), now, when I copied-pasted the .dll (which came from my laptop) and other .aspx files on another PC and browsing the web application on the localhost (new machine), I am encountering an error saying Server error in "/" application,
Parser error message: Could not load type 'namespace.of.my.library'
Additional info:
When I build/publish the .dll, it's only producing one dll file, so I am sure that I didn't missed anything when I copy-pasted the code into a different machine.
I also checked the framework version of the generated dll and the framework version of IIS and they are the same with my laptop.
And since the web page is producing this error, I don't know how to debug, I can't get any relevant info out of it.
Did I missed something?
Thanks!
Related
In our ASP.NET Core web api, we are attempting to load unmanaged C++ code from a DLL that we included in our published folder.
This fails upon calling the endpoint that loads the DLL. The exception is as follows:
DllNotFoundException: Unable to load DLL 'libespeak-ng' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
It should be noted that this DLL loads and functions fine when the app is run through Visual Studio. Running the app in Kestrel with the dotnet command also works properly, on the same server. It is only inside of IIS that the app fails to load this DLL.
We have made sure the IIS user (as well as the default app pool) has permission to read and execute the DLL. We've tried placing the DLL in the app bin folder, in System32, in SysWOW64, and in the various inetsrv directories. None of this has resolved the issue.
Looking at ProcMon, it seems like IIS does not even attempt to load the DLL. Dependency Walker doesn't reveal any missing dependencies that aren't also missing when running it with Kestrel on any machine.
After many hours of struggling, and attempting the solutions commented by other users, we finally figured out the issue.
The DLL was trying to access some Windows APIs that did not exist in Windows Server 2012 R2, apparently. Once we updated the server to the latest windows server version, everything worked without issue.
I have a blazor app that sometimes gets a ERR_CONNECTION_RESET on a specific dll and fails to launch.
This does not happen in every machine, and sometimes in the same browser but on different machines, it does not open also.
The dll in question is in the correct directory.
What troubles me more is the "randomness" of the error, since we are unable to find why in some machines it works and others it does not.
Here is a pic of the error.
Thanks to everyone that can help.
I'm writing an ASP.NET Web Forms project in Visual Studio 2013, but am having trouble moving it to my computer's IIS 7. Although the project launches successfully from Visual Studio and works properly, launching the version I put on IIS gives an HTTP 500 error: "localhost is currently unable to handle this request."
Here is my process:
Use the File System method of Visual Studio's Publish tool to publish the project to a folder on my computer.
Access IIS' Default Web Site, and set the Physical Path to the folder I published the application to.
If the project works from Visual Studio, why wouldn't it work in IIS?
I had a double entry for in my web.config, and it was causing the same issue: 500 error with no other clue.
The problem was I was submitting a Web Form Application instead of a regular Web Site. The former has additional files in it that makes it not work properly in IIS (at least, I've never been able to make it work).
Thankfully, making a blank Web Site in Visual Studio and copying the web pages over from the Web Forms application was a simple matter, and I got it working easily.
I had an entry made in the web.config
which caused this error...remove the line fixed this issue. so probably any error in web.config makes the browser to not load the server and hence the issue
I have developed a SOAP Service on basis of C# and .NET 4.0 (service.dll). The service internally loads a C++ DLL (cpp.dll) and does stuff. I deployed that on an IIS 7.5 running on Windows 7 and it all worked well. However, recently the service stopped working.
If I now try to create a service using the wcftestclient application shipped with Visual Studio, I get following error message:
Warning: There were errors loading types in an assembly loaded from
'C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll'
some types in the assembly could not be loaded and will not be
available to the tool.Error: An error occurred in the tool.Error:
Object reference not set to an instance of an object.
I did not touch any of the DLLs or so. Googling the error message didn't lead me anywhere, so I'm desperate now and would appreciate some help with this. What does the message mean and what should I investigate?
I can open http://myserver/myservice/service.svc?wsdl and it shows me the correct WSDL. Also, I have a command line tool which itself loads the cpp.dll and this works too, so the problem cannot be there. It has to be something with the service.dll or with the settings in IIS or with a recent Windows update screwing up my .NET environment... right?
I have a perfectly running asp.net c# application, i have windows 7, vs200, vs2010 and sqlserver2008r2 installed on my computer. I use vs2008 for my application. I use web deploy in release mode to generate a package and send it to an administrator to deploy the pack on a testing server. the deployed application works fine for some aspx pages but for some others pages it doesn't find them and displays an error message:
server eror in '/' application
the resource cannot be found
description: http 404. the resource you are looking for could have been removed...
requested url: /pagename.aspx
thank's for the help
ps: i do not have access or control over the testing server. the application was working fine before my first deploy.
The best explanation is that pagename.aspx isn't at the expected location.
Check if the file is there
If so, check if iis has the right directory for you webapplication
If not, make a correct deployment (do a test deployment on an clean directory).
Another hypothesis: It can happen if you are using svn and forgot to add unversion files to subversion.