Last post Dec 06, 2016 03:30 AM by Chris Zhao
Nov 15, 2016 08:14 PM|silentnoise|LINK
I have no idea if this is the correct place to post this, but we're trying to run our application on Server 2016 and all of our app pools are failing to start. This is the error found in the event log:
An error occurred while trying to start an integrated application instance.
Message: Specified cast is not valid.
StackTrace: at System.Web.Configuration.ServerConfig.get_UseMetabase()
at System.Web.Configuration.ServerConfig.GetDefaultDomainInstance(String version)
at System.Web.Hosting.ISAPIApplicationHost..ctor(String appIdOrVirtualPath, String physicalPath, Boolean validatePhysicalPath, IProcessHostSupportFunctions functions, String iisVersion)
at System.Web.Hosting.ProcessHost.CreateAppHost(String appId, String appPath)
at System.Web.Hosting.ProcessHost.StartApplication(String appId, String appPath, Object& runtimeInterface)
I turned on failed request tracing and the logs from that didn't provide any additional data. I suspect this is some sort of misconfiguration on our part, but I have no idea where to start. I've already fumbled around adding various IIS and .net roles
and features, but nothing has worked so far.
Nov 15, 2016 08:22 PM|SheldonS|LINK
Have you looked or posted this on https://forums.iis.net/
Nov 15, 2016 08:40 PM|silentnoise|LINK
I have looked, but I haven't posted there yet. I came across one post where someone was seeing something similar and the first reply was directing them to post here because it was an asp.net problem, not an iis problem. Cross-posted on the iis forum now.
Hopefully someone can help.
Nov 22, 2016 07:36 AM|Chris Zhao|LINK
It looks like there's a problem casting a result from the database or something.
Set the debug attribute in the configuration section of the Web.config file that is located in the root of the application folder to true, as follows:
It is a good idea to enable debugging only when a developer is doing interactive troubleshooting, fix your problem and turn debug=“false” back again.
Nov 22, 2016 05:11 PM|silentnoise|LINK
Thanks for the tip. There's no database interaction (from our product anyway) at this point.
I tried setting the debug attribute and didn't get any additional information.
I'm pretty sure the problem is related to some asp.net compatibility issue. I've reproduced the problem on the default website when our application is installed and asp.net is configured via the roles and features GUI. If I disable asp.net via the same
method, the default website works. Likewise, if our application isn't installed and asp.net is enabled via the GUI, the default website is fine.
We are using .net 4.5.1 in our product.
Nov 29, 2016 09:26 AM|Chris Zhao|LINK
Are you using the default application pool? Could you post IIS application pool settings screenshot? Have you tried changing appliction pool? If necessary 32-bit applications are enabled on the application pool.
ASP.NET Web Deployment steps
Nov 29, 2016 09:03 PM|silentnoise|LINK
No, I'm not using the default application pool. All of our app pools are set to .net clr version 4.0, 32-bit applications are not enabled, and the managed pipeline is integrated.
Before posting to here, I tried allowing 32-bit applications. Our web apps are 64 bit, so this just caused things to fail in a different way. I also tried changing the managed pipeline to classic, which results in a Bad Request, but no additional information
in the failed request trace.
All of our sites and app pools work just fine on Server 2012 R2 with IIS 8.
Dec 06, 2016 03:30 AM|Chris Zhao|LINK
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />