I developed a web service using ServiceStack (great framework, btw -- had fun using it) on .Net 3.5. The service runs fine on the dev box under IIS6. But when I try to deploy to a prod server running IIS7, I get the error:
[FileNotFoundException: Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified.]
I tried deployment via both xcopy (which I thought was sufficient for ServiceStack) and MSDeploy -- same error. The IIS7 virtual directory passes both authentication and authorization tests.
As mentioned, I'm not an IIS or ServiceStack expert. Might this be a registration or GAC issue? Any thoughts would be appreciated.
Related
I deployed my multi-tier application to azure. It was working perfectly, but now when I try to deploying it, it shows an error saying:
Could not load file or assembly 'MySomething.dll' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
I checked other answers, but all of them dealing with IIS. Azure Web Apps IIS cannot be accessed directly. How can I resolve this?
As usual, this issue happened because of caching. Removing the bin/obj directories alongside the IIS Express cache folder fixed the issue.
I have an Asp.Net Web Api project that uses a 32 bit dll. I can deploy and use the application on IIS my own machine after changing Enable 32 bit Applications property of the application pool to true. Here are the properties of my windows and IIS:
But if I try to publish my project to a demo server using the same settings, I'm getting the following error:
Could not load file or assembly 'ManagerApi.DLL' or one of its
dependencies. is not a valid Win32 application. (Exception from
HRESULT: 0x800700C1)
Here is the versions of windows and IIS on the demo server:
How can I overcome this error?
Thanks in advance,
I have an ASP.Net web application developed in Visual Studio 2008 (.Net 3.5). I have copied this solution to another root folder (both on my Win7 64b machine) and upgraded the copy to VS2013 (Professional) and .Net451, but when I try to debug the web app in VS2013 I get an Access Denied error ("Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server"). I don't have this issue runing the original from VS2008 on the same machine.
Apart from the changes mentioned above the two are a straight code copy.
In VS2008 the project Web properties are: Use Visual Studio Development Server, auto-assign port, Virtual path = /
In VS2013 the project Web properties are: Server=IIS Express, Project URL=http://localhost:63064/ (and I have clicked on Create Virtual Directory)
I can see this must be some sort of security issue, but what extra needs to be done to get a VS2008 web app, upgraded to VS2013, to run within the VS2013 IDE?
Postscript: If I start the web app without debugging (ctrl-F5) I get "HTTP Error 503. The service is unavailable."
It turns out that the simple solution is configure the web app properties in VS2013 to use the local webserver (IIS) instead of IISExpress, and also to run VS2013 as administrator (but this is not necessary for VS2008). So obviously it is an IIS permissions thing but IIS is common and hasn't been changed - so what has changed in VS2013 to make this necessary? I don't really want to run VS2013 as administrator if I can avoid that.
I'm having a hard time configuring my server to host MVC4 application. Here's my situation:
I have Windows 2003 server SP2
Until now, all my hosted applications are targeted to .NET Framework 3.5, thus using ASP .NET 2. I use single web site to host web application
Now, I want to host very first application targeted to ASP .NET 4
What I did is:
I've installed .NET Framework 4
I've added new new application pool
I've added new virtual directory to my web site (the same web site that hosts ASP .NET 2 web apps) and converted it to web application. Next, I've selected ASP .NET version 4 on ASP .NET tab
So, I thought that it would be enough. But when I access my application with root url, the first thing I get is 403. I've checked security options and they seem to be all right.
Next, I tried to access one of my controller actions, eg:
http://servername/home/index
and now I get 404 error. Ok, so I've enabled browsing of files and I tried to access web.config, for to check what happens, and I received error:
Could not load file or assembly 'System.Core, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or
one of its dependencies. The given assembly name or codebase was
invalid. (Exception from HRESULT: 0x80131047)
I've also run regiis command:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -s W3SVC/2049612577/root/cip-new/
but still in vain. Bottom line, it's something wrong, but I have not idea what is happening.
EDIT 1:
I've made some testing. What I did, is I'd created a basic MVC4 application from Basic template and simply published it to the server. And it worked. However when I published it to the server to the same directory, I got the error:
The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047).]
2 things I've had to do in the past to get v4 working on IIS6...
Make sure the site using .Net version 4.x runs in it's own app pool, separate to sites using .Net version 2.x
If you are using Razor I've noticed that IIS6 doesn't immediately know what to do. So you need to configure the Application Extensions Mappings. Add an extension mapping for .cshtml or .vbhtml depending on whether using C# or VB. I think that's why you're getting your 404 errors.
Restart IIS or recycle relevant app pools once above applied if you can to make sure changes are in effect.
I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.
The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?
I tried to following:
I copied my entire project directory (so including the .csproj file, the bin folder etc.) to the following location on the remote server, where IIS is running C:\MyProject.
In IIS manager i added a Virtual Directory under Default Web Site. Located my Web Site files in C:\MyProject and added that folder. Then in IIS manager i converted that Virtual Directory to an Application.
But when i browse to my Web Site i get an error:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.
So my question is, what do i have to do in order to run my Web Site on IIS..?
The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.
SoL:
Create a new apppool with classic mode and .net framework equals to your application developed framework.
attach the newly created apppool to your virtual directory.
Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.
If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.
Update .net framework in the server to 4.0 if you have only 2.0.
Then register .net 4.0 version in IIS by running the following command in command prompt.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Try changing Application pool to Classic. To do that open Advanced settings of your application in IIS manager and change Application Pool. There should be "ASP.NET v4.0 Classic" or something similar according to your framework version.
http://technet.microsoft.com/en-us/library/cc731755(v=ws.10).aspx