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,
Related
I am currently working on upgrading an ASP.NET web application to use Crystal Reports SP31. When running the web application on our web server, I get the following error:
System.Runtime.InteropServices.COMException (0x8007007F): Retrieving the COM class factory for component with CLSID {F734A321-8381-4FFD-A614-139E8906DC83} failed due to the following error: 8007007f The specified procedure could not be found. (Exception from HRESULT: 0x8007007F).
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.CreateRptDoc()
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Initialize()
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
The Crystal Reports runtime (32-bit) is installed on the web server, and its IIS is configured to allow 32-bit applications. I've run the same web application on my own local machine with no problems.
Any advice would be greatly appreciated.
Update - I've identified the cause of the issue. The server also has Shibboleth 3.3.0 installed on it, and apparently that "breaks" the Crystal Reports runtime. Unfortunately, the Shibboleth application is required, so I can't just uninstall it.
Does anyone have any suggestions on what to do here?
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 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.
I have built an ASP.NET web application with Visual Studio 2008 and target framework version 2.0. I have created a Web Setup project to deploy this at multiple target OSes.
For the setup project, I have written a custom action which gets executed on "OnCommitting" event. This custom action adds wildcard script mapping for routing all requests through ASP.NET engine.
FileMon suggests that an error occurs while creating a file in the following directory:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
The user account which was attempting this action was IWAM_<host name>.
The problem is after running this setup, if I try to access any url on the newly installed site, I received the error message:
Server Error in '/myapp' Application.
Failed to access IIS metabase.
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.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I have already tried these options after 2 days of googling:
Run aspnet_regiis -i
Run aspnet_regiis -ga \ASPNET
Run aspnet_regiis -u and then aspnet_regiis -i
Option 3 has worked for me as of now, but, I want avoid using this, since, my web app will be deployed on a machine which might already be hosting some other app on IIS and I do not want to disturb these apps.
Can anyone suggest me a workaround for this?
B.T.W. my current system has .Net framework 3.5 and VS2008 installed on Win XP SP3 and IIS 5.1.
Thanks,
Vamyip
Your best bet is a custom bit of script in the installer package that checks permissions and then runs the command based on that information.
On a server OS this shouldn't be necessary since the default user for the application group will be in the IIS_WPG and have permissions to the temp directories. Windows XP has a bugged up version of IIS that is non-standard and doesn't follow all the rules. If your expected deployment environment is Windows Server 2003 or better then your installer should work as-is.
Switching aged 2003 SRV to 2008 caused my Asp.net 2 application fail: The application is no more loading the required library DLL from /bin/ folder anymore.
What should I change in my code or web.config to make this webapp load OK also in new 2008 server?
Now I receive this error when I access the application: This type is in IMPORTS ( Dll ).
Compiler Error Message: BC30002: Type
'Facebook.Entity.User' is not defined.
It sounds like you are missing some of the required libraries. Make sure Facebook.Controls.dll, Facebook.dll, and Facebook.WebControls.dll are in the bin folder AND accessible (check security) by the app pool identity.
Next, check the application pool pipeline settings. Is it set to integrated v2.0? Does the identity of the app pool have the right access to that folder?
Also, did you change from an x86 to an x64 server? If so, you might redeploy the app to specifically target x86.