I am trying to deploy an ASP.NET 5 application to my 64-bit Windows Server 2008 R2 server. I created a blank web application and set up a file system publish profile using dnx-clr-win-x64.1.0.0-beta4. I copied the results from the publish location to a folder on my server and created a new virtual directory with a .NET 4.0 app pool pointing at the wwwroot folder of my application. However, when I try to browse to the site, I get this error:
Could not load file or assembly 'dnx.clr.managed' or one of its
dependencies. The system cannot find the file specified.
Description:
An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details:
System.IO.FileNotFoundException: Could not load file or assembly
'dnx.clr.managed' or one of its dependencies. The system cannot find
the file specified.
The same steps on my local PC (where I have Visual Studio 2015 installed) work correctly so it seems like I need to install something else on my server. I have already installed .NET 4.6 on this server without success. Does anyone know what I am missing?
I found the solution thanks to this question: Azure deployment : Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified
At first I thought that wasn't the answer because it didn't work when I changed my publish profile from dnx-clr-win-x86.1.0.0-beta4 to dnx-clr-win-x64.1.0.0-beta4. However, I later noticed that approot/packages folder didn't have the x64 package. So I deleted everything and re-published with my new profile and the page loaded.
Change the dependencies file to the current version, whether it is 1.0.0-beta7 or 1.0.0-beta6 ensure that you go to nuget package manager and install the appropriate version rebuild the solution you should see file updates from your output windows.
Related
I am a new bee to web services and I have to publish a web service to a server.
I added an application using IIS but when I try to browse the application it gives me this error.
Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.
I had seen other answers about this issue,where most of them are related to installing Microsoft.AI.Web package. This is already installed in my web service and I am still getting the error.
Thanks in advance for any suggestions to resolve this.
There was an update waiting on the Nuget package manager for Microsoft.ApplicationInsights, after updating it added the application again to IIS. This resolved my error.
So I have created a NuGet Server via an ASP.Net Web Application following this tutorial: http://nugetserver.net/ which is hosted in IIS. I have placed the files on my D: drive on my server along with my packages.
IIS Sites Virtual Path:
I get the following error when I navigate to the url:
In case the picture is not clear enough, please see below:
Could not load file or assembly 'NuGet.Server, Version=2.11.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Here is my project's web.config file along with my publishing profile:
My target .NET Framework version is 4.6 but the packages themselves are those of an earlier version of .NET. Could this be the problem? I took the project folder and put it on my physical path on my local machine and it works just fine when I run the project in debug mode. Please see screenshot below:
NOTE: I have to hide the package names due to organizational confidentiality policies.
I am pointing to these package files:
D:\Backup\Dropbox\vox_server_01\nuget\Packages
The reason I am creating this NuGet server is because the existing one is buggy.
Could this be a permissions thing to the users group in IIS? This link Could not load file or assembly 'someProject' or one of its dependencies. Access is denied lead me to that question. Any suggestions on how I can get around this?
Update: Here are my package sources below:
I could not replicate your error, but here are some notes how nuget server problems can be solved:
The packagesPath key in web.config can be left blank, as you are already using the default folder \Packages.
When deploying to the server, you might find an error in the line of Access to the path server.cache.bin is denied. Just create a blank file with that name on your server.
Came here because of the same problem. Funny enough, I had my solution named "Nuget.Server" as well. Changing my Assembly name (under project properties) fixed it. Renamed it to "NugetServer"
If in your Web.config you have a reference to this NuGet.Server package, delete it from the file and try running again. Fairly similar to a BadImageFormatException from a bad reference in the web.config
I have unloaded the version free Community Edition from
http://selectpdf.com/html-to-pdf/demo/
Because I wanted to use the example that turned a page html into pdf.
In visual studio I have succeeded in using the file asp.net but when I put it online I receive this error:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
I have loaded the files on three different servers.
Azure, Aruba and Godaddy, but do I always receive the same error, as I can resolve?
http://pdf.cyberkings.fr/html-to-pdf-converter.aspx
http://www.numero-telefono.it/html-to-pdf-converter.aspx
Thanks
Conversion failure. Could not find 'Select.Html.dep'.
Description: An unhandled exception occurred during the execution of the current web request
When installing Select.HtmlToPdf from NuGET, the installation copies the dependancy file Select.Html.dep to the bin. When you build, a copy gets placed in the /bin beside Select.HtmlToPdf.dll.
However, when deploying your application, the dependency file does not get copied automatically.
You need to copy Select.Html.dep manually.
See the SelectPdf Html To Pdf Converter for .NET deployment documentation.
How do I publish/deploy an asp.net website to a live server (like a goDaddy server)?
I moved all the files to the remote server without dataaccess layer and business layer. Move dlls to bin folder on live server. But when I try to browse website it gives errors like:
Could not load file or assembly 'BusLayer' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'BusLayer' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Please help me handle these errors. I am not very good at English; maybe there are a lot of mistakes in my question. Thanks in advance for help.
I assume Bus layer means business layer. I believe that your presentation layer has some dependencies on the business layer. Now since you didn't push the business layer to production (remote server), its looking for a file and not finding it and hence the error.
the fix i guess will be to move all your files to remote server and try browsing files that doesn't have database dependencies (Again, assuming you don't have a database at production)
"This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." usually means that you have a .NET version issue. Is the BusLayer assembly on the server compiled under a newer version that the web site?
Also, does the app run locally? If so, publish all the contents of your local BIN.
I hope you made a backup of your site prior to deployment.
I added a reference to a DLL in my ASP.Net app. That started causing a BadFileFormatException, so I switched my app to target x86. I'm now getting this error:
System.IO.FileNotFoundException: Could not load file or assembly 'TheDLLThatIReferenced.dll' or one of its dependencies. The specified module could not be found.
The DLL in question is present in both the bin directory, and in bin\x86\Debug in my app's directory on the server. When I try to run my app out of Visual Studio, it runs just fine, but if I try to hit it via the internet, I get that error.
What might be causing this error, and how can I correct it?
Every time I've seen this it has boiled down to the assembly not being where it ought to on the server.
Have you confirmed that the web site you are hitting on the server is actually pointed at the directory you are looking at?
put validateRequest=false on asp.net page that is throwing Java.io.FileNotFoundException.