IIS Error - It is not possible to run two different versions of ASP.NET - iis

I'm getting this error thrown repeatedly on my IIS 6.0 server:
It is not possible to run two different versions of ASP.NET in the
same IIS process. Please use the IIS Administration Tool to
reconfigure your server to run the application in a separate process.
However, I ran an IIS MetaBase Analyzer to view all AppPools and AspNetVersions they're running and do not see any AppPools running different versions of AspNet. Is this a bug in IIS or is there definitely an AppPool running multiple versions of AspNet?
Thanks

Although it's an old question, for the benefit of future users who visit this yet unanswered question, here is the solution that worked for me.
In my case, the following worked.
Symptom :
The ASP.NET tab, for the "Default Website" node of the IIS Admin was showing a version of 1.1.
The ASP.NET tab, for my virtual directory application, was showing a version of 2.0 (which is the right one for my application).
Solution :
I changed the first one from 1.1 to 2.0. The application worked.
Cause :
The cause, however, seems "mysteriously unrelated", as it often happens in Windows. It was working fine with the same old (different) settings until a week back. What happened during the week, was that the machine A running the web server for my web application, had to unjoin a domain B and join another domain C, because the primary domain controller on B failed and had to be replaced with C. Why on earth would that affect IIS Admin or the web application hosted on A, and why it should generate this particular error is beyond me. Such a cause for this error seems undocumented.

It is not possible to run two different versions of ASP.NET in the same IIS process. This would mean you have multiple applications (either sites or virtual directories) using the same appPool, but one of these sites/applications has a different .NET version setting in the .NET tab. You would have to create another appPool to use different .NET versions.
To create another appPool and associate it to your application do (Windows Server 2003):
1.Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2.In Internet Information Services (IIS) Manager, expand , right-click Application Pools, point to New, and then click Application Pool
3.Right-click on application that uses a different .NET version and click on Properties
4.On menu Virtual Directory choose in the item Application Pool the application pool that you created in point 2.
Regards!

Related

Problems regarding White Screen Of Death (WSOD) at my site

I have a problem regarding White Screen Of Death (WSOD) at my site.
I will try to explain what I have tried until now.
I know it is not a triviel error to debug, but maybe some of you have tried something similar.
Here is the setup: One Windows Server 2019 v1809 with one IIS: 10.0.17763.1.
Multiple websites with associated application pools.
It's a MVC solution, and we are using .net 4.7.2.
What I have tried:
Recycled application pools every night
Restarted the server every night
Issued a IISReset every night
Deleted temporary files in C:\Windows\Microsoft.NET\
Looked at the IIS logs
Looked at the application log, our own log
Looked at the Windows log
Searched the Internet for similar problems
Made sure there always were some traffic at the website
Made sure no errors were shown when pressing F12 in the browser, the site always returs code 200
The WSOD comes at varies times, and not all the sites are affected at the same time.
A manuel recycle of the website always helps.
My question is, have any of you encounted similar problems?
And how did you solve it?
If you need more information please ask, and I will try to provide it.
/Regards Søren
This kind of problem is very unusual in IIS, because there is almost no record and useful information in the log file.
You can try to use this plan to repair IIS.
Unregister all the versions of ASP.NET with command "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ua". and the framework 64 also versions. 3.0 and 3.5... etc
Delete ASPNET account from "Local Users and Group – Users".
reregister ASP.NET with IIS using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i". and framework64... net 3, 3.5 etc
Give permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET". for framework 32 and 64 and versions.
Reset IIS .

IIS 6 to IIS 8 Migration Errors after using Microsoft Web Deploy

I have recently been trying to migrate some websites from a 2003 server with IIS 6 to a 2012 server with IIS 8 installed. I am using Microsoft's Web Deploy tool and have been successful in copying a few web sites one at a time using the following command (changing the site identifier # for each site).NOTE: The reason the mumbo jumbo with replacing the drive exists is because our new server has a different data drive on it, and MSDeploy didn't like that. Could that be breaking things as well?
msdeploy -verb:sync -source:metakey=lm/w3svc/#,computername=SourceServerNameHere -dest:metakey=lm/w3svc/# -replace:objectName=metaProperty,scopeAttributeName=name,scopeAttributeValue=Path,targetAttributeName=value,match="F:",replace="E:" -enableLink:appPoolExtension > migration.log
The main issue is that when I try to navigate to any site one of three errors happens..
1. 503 Service Unavailable
2. 401.2 Unauthorized
3. 404.17 Not Found
These errors start from 1, and progress to 3 as I am trying to troubleshoot the IIS configurations. But this kind of defeats the purpose of using the Web Deploy Tool. Has anyone had any luck migrating sites being completely successful, or does the tool not actually support "IIS 6.0 or higher migration?"
Thanks in advance.
EDIT: So I have been able to get the main page of my site working by reverting the Handler Mappings and Default Documents to their parent configurations, and making sure that the AppPools don't conflict with versions, etc. The problem with this, is that I have to figure out how to do this for every app and app pool under the sites... Does anyone else have a similar problem?
Try using the iisApp provider instead of the MetaKey provider. For example,
msdeploy -verb:sync -source:iisApp=Site1/ContosoApp,computerName=Server1 -dest:iisApp="Site1/ContosoApp",computerName=Server2
https://technet.microsoft.com/en-us/library/dd569054(v=ws.10).aspx
I ended up contacting Microsoft Support to get this sorted out and ended up spending 3 hours on the phone with them...There were multiple issues that came up during the deploy tool's migration.
The bulk of the issues were corrected by changing the application pools to 64-bit and commenting out abomappercustom handlers in the applicationhost.config.

ASP Error 0223 - TypeLib Not Found, intermittent, resolved after IIS restart

I'm currently in the process of migrating an ASP platform from Windows 2003 R2 IIS 6 web servers to Windows 2012 R2 IIS 8.5 web servers. I'm at the stage where I've migrated a number of sites across to two separate 2012 web servers, all looked great, clients and developers are happy... However the following error has presented itself after a few days hosting on one of the new servers.
Active Server Pages error 'ASP 0223'
TypeLib Not Found
/jobboard/conf/constants.vbs.inc, line 1
METADATA tag contains a Type Library specification that does not match any Registry entry.
The METADATA tag is below:
<!--METADATA TYPE="typelib" NAME="Microsoft ActiveX Data Objects 2.8 Library" UUID="{2A75196C-D9EB-4129-B803-931327F72D5C}" VERSION="2.8"-->
Restarting IIS on this server resolved the issue (albeit temporarily).
Subsequently the other 2012 web server in production presented the same error a couple of days later, again, restarted IIS and works for now.
I've checked the registry and the relevant tag exists with the right UUID and correct permissions.
It doesn't affect all sites on the server, only all sites in a particular application pool.
The application pools use a domain user identity and sites are split up into a number of shared pools.
I've now determined what was causing the above problem...
Our sites on IIS run in a number of shared application pools running as a domain user. We also have a Windows scheduler job which runs a number of scripts over night which also run as the same domain user.
It seems there are cases when this scheduler job runs it interferes with the IIS worker processes. When it completes and ends its user session it unloads the registry file in memory, which the w3wp.exe processes could also using.
This error is presented in the Event log...
Windows detected your registry file is still in use by other
applications or services. The file will be unloaded now. The
applications or services that hold your registry file may not function
properly afterwards. No user action is required.
Along with references to the w3wp.exe processes currently running.
It was replicated when I terminal serviced in as the domain user and logged out again after a period of time. The event log presented the error and the sites all bombed shortly afterwards.
Running the scheduled job as a different user has fixed this issue for us.
I remember having an include file for ADOVBS.inc with all the ADO constants inside and including it as a standard ASP include inside my global include file which is included on every page on the site.
This was before I used the META way of including the file.
So maybe a last resort is to revert to that method of loading in the ADO constants.
It seems like some sort of threshold is being hit, CPU/Memory?, which then prevents IIS caching/loading the file in from the registry. This then causes the error and a recycle of the pool. As no redirect is being done to the 500.100.asp error handler page which hides the error details from the user. It would suggest the error is in IIS and related to the server.
Thanks

IIS7 Authentication problem

I have deployed a web site to a Win 2008 Web server with IIS7. The site works fine on a Win 2003 Standard server with IIS6. On the 2008 box, whenever I request a page (htm or aspx) from a folder named Reports, I get challenged with the Windows Authentication dialog box.
I have Anonymous Authentication and Forms Authentication enabled on the site. I applied Full Control permissions to the root of the site for both NETWORK SERVICE and IIS_IUSRS, but that hasn't make a difference.
Like a previous post already mentioned, here are the detailed steps to fix this:)
If there is a folder in the application named "Reports" and SQL Server Reporting Services are installedon the server, then Reporting Services Virtual Directory folder that is also named "Reports" will be in conflict with the application "Reports" folder.
To fix this open Reporting Services Configuration Manager (Start->All Programs->MS SQL Server->Configuraton Tools) and change the Virtual Directory under the "Report Manager URL" in the menu on the left.
Did you install MSSQL Reporting Services on your new machine? It'll use the Reports folder for the reporting toolkit (default setting) and under MSSQL 2008 you can't enable anonymous Access out of the box.
whats is the authentication mode in your web.config, verify that is not in Windows
<authentication mode="Windows" />
also be sure to disable integrated windows authentication in iis
You could try running FileMon from SysInternals to see if it is the file system that is sending back the "access denied".
Quote from another forum that solved this issue for me:
"SQL Server Reporting Services creates a folder called Reports by default if you install it on IIS. If you install SQL 2008 then Reporting Services doesn't need to use IIS and instead will try to reserve the URL with the HTTP.Sys service.
I believe this is the cause of the conflict you are seeing. What you could try is changing the URL that Reporting Services uses via the SQL Server Reporting Services Configuration Manager."
Well speaking on the same subject here, yesterday I was deploying my application on Windows Server 2008 running IIS7 w/MSSQL 2008 on there too. In my website's tree structure I had a folder named Reports that had a subfolder in it, and then the actual pages. It looked like this "Reports/SalaryReports/SalaryReport.aspx" The interesting thing was that when I clicked on a hyperlink to go to "Reports/SalaryReports/SalaryReport.aspx" I got a username/password prompt from my server. This did not happen on the VS development server when I ran the application on the development machine. So I was like hmm? I looked at the code-behind in SalaryReport.aspx and did not find anything unusual. So then I put a Default.aspx directly in the Reports folder (thinking maybe it was something wrong with the authentication going two nodes down from the root to get to SalaryReport.aspx) but the server still requested username/password even though there was no security settings applied to this new Default.aspx. So I figured it must be that the folder is named "Reports", so I renamed it to "Reports1" and bigno! Everything worked!....I will still look further in this issue today, but it seems that either an IIS 7 HttpModule (not one of mine) is trying to "reserve" the folder that is named "Reports" for itself or something else...I'll look into the SQL Server Reporting services as the above post mentioned...
Anyways, just wanted to share:)
I'm supposing you don't have a SQL Reporting Services running on the same server:
1 - Give rights to user "IUSR" and the user that's running your application pool.
2 - Overwrite child folder permissions and ownership.
2 - Check if there's a web.config file on that folder setting different access rules.

SharePoint Solution Deployment: How do I prevent SP from resetting IIS when upgrading or retracting a globally deployed solutions?

So I figured out that by adding the ResetWebServer="FALSE" attribute to the solution manifest prevents SharePoint from recycling any app pools.
However, when upgrading a solution that originally did not specify ResetWebServer="FALSE" or when retracting a solution that does specify ResetWebServer="FALSE", the application pools are still being recycled. Is there a way to prevent any auto-recycling of app pools?
This does not seem possible given the document on MSDN (see below), note that I included Deploying a Solution over Upgrading a solution as underneath it is effectively doing a file replacement. I believe the restart/recycling is necessary as a result of how IIS functions. An option to explore if you wanted to manage when this occurs is to ensure that all deployments are done via timer jobs and execute when their impact will be minimized.
Deploying a solution
Initially, manifest and feature manifests are parsed to find assembly and _layouts files, which are copied to the appropriate locations. All other files contained within a feature directory are copied to the feature directory. After solution files are copied to the target computers, a configuration reset is scheduled for all front-end Web servers; the reset then deploys the files and restarts Microsoft Internet Information Services (IIS).
Retracting a solution
On each front-end Web server, the following occurs:
Microsoft Internet Information Services (IIS) is disabled.
Files are removed from the system.
IIS is re-enabled and Windows SharePoint Services is reloaded when
a user browses to a page.
You might also take a look at the "-local" switch. Didn't try it yet but it seemed that it allowed deployment server per server when you are in a load balanced situation.
Might be a good lead.

Resources