Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Error 500.30 - ANCM In-Process Start Failure #8980

Closed
Plasma opened this issue Apr 2, 2019 · 39 comments
Closed

HTTP Error 500.30 - ANCM In-Process Start Failure #8980

Plasma opened this issue Apr 2, 2019 · 39 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM

Comments

@Plasma
Copy link

Plasma commented Apr 2, 2019

Describe the bug

When trying to launch an ASP.NET Core 2.2 web app locally (Windows 10) I receive HTTP Error 500.30 - ANCM In-Process Start Failure error message when the browser opens.

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core 2.2
  2. Configure to use IIS in-process model

Expected behavior

It to work without error.

Screenshots

image

More information

None of the other bug reports appear to have a resolution.

Is this an Azure only feature, and wont ever work locally? How is it supposed to work locally?

Assuming its the most performant option, can I make it so local development continues to use Kestrel and only production/Release-mode uses IIS in-proc?

Thanks

@Plasma
Copy link
Author

Plasma commented Apr 2, 2019

This also breaks with the same exact message on Azure App Service sometimes when restarting the website. Is it meant to be this broken? :(

@tonyatl
Copy link

tonyatl commented Apr 2, 2019

i have the same problem on windows data center 2016 iis 10. i created vs 2017.9 asp.net .net core mvc application - no changes. it runs successfully on windows 10 iis but not on server. i am using asp.net core 2.2.3 runtime. i am running DotNetCore.2.0.8-WindowsHosting and httpPlatformHandler_amd64 and dotnet-hosting-2.2.3-win. the application starts as a kestrel process - ie i run the exe of my application or dotnet myapp.dll.

an empty log is created - no messages no nothing to help further isolate/identify issue.

ps - after more poking around i found a similar - perhaps same - issue
HRESULT returned: 0x800700b7

Cannot create a file that already exists?

https://github.com/aspnet/IISIntegration/blob/master/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp#L415

in fact that hresult is the same one i got.

pps - so has this bug been fixed? if so where do i get the fix?

ppps - is the work around to use out of process?

@jkotalik jkotalik added the feature-iis Includes: IIS, ANCM label Apr 4, 2019
@analogrelay
Copy link
Contributor

Have you looked at the troubleshooting guidance in our documentation? https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/troubleshoot?view=aspnetcore-2.2#50030-in-process-startup-failure

If you still have failures after going through those steps, let us know.

@Plasma
Copy link
Author

Plasma commented Apr 9, 2019

I think I may have a lead on this, at least for local development.

I started my project with using the legacy out of process hosting system, and then later switch to the InProcess system. This seemed to have broken things with this obtuse error.

I then changed the port number and it started to work. Does it have something to do with the applicationHost.config file perhaps?

@analogrelay
Copy link
Contributor

Have you looked at the Event log or standard output logs as described in the doc I linked?

@analogrelay
Copy link
Contributor

Closing this as we haven't heard from you and generally close issues with no response after ~7 days. Please feel free to comment if you're able to get the information we're looking for and we can reopen the issue to investigate further!

@deanilvincent
Copy link

This error appears to me after I accidentally registered the same interface in my ConfigureServices

`services.AddScope<IMyInterface, IMyInterface>();`

Make sure to double check your Startup.cs ConfigureServices

@worldspawn
Copy link

I can confirm I also had some dynamic registrations registering an interface as both service type and implementation type. What an astonishingly awful job aspnetcore does of communicating this. We're like one or two steps away from the bad old days of Error 0x80001000.

@KooshkakiH
Copy link

I get this error and problem was mistake connection string.

@analogrelay
Copy link
Contributor

analogrelay commented Jun 1, 2019

Just a heads-up that since this is a closed issue we don't track it in our regular issue management processes. If you are still seeing this error and need assistance, please file a new issue so it gets right in our face :).

@worldspawn these kinds of errors should definitely be reported (in detail) on the error page when in Development mode (in ASP.NET Core 3.0 previews and the coming RTM version). We can't report them in production environments because it's a security risk, but there they should land in the Windows Event Log (in detail). If you have a situation where you aren't seeing the detailed error page in development mode (when dotnet runing or launching from VS) please feel free to file a new issue.w

@robinwilson16
Copy link

I got this error and realised I had missed a comma out of the appsettings.json file.
May be worth a try for anyone still getting this issue.

It would be good if it did give a less generic error though to speed up troubleshooting.

@GerFVersteegGitHub
Copy link

The ANCM error is after I have installed the "Key Vault" for my web app. with ASP.Net Core 2.2
When I remove this function everything goo fine now.

@edimarmartins
Copy link

Please, check the Database Connection string at appsettings.json and assure the path, user and password is correct

@GerFVersteegGitHub
Copy link

Hi, when I use a Key Vault than I don't have a Database Connection string in appsettings.json.
I use the Key Vault for more security. Only in that way I have the ANCM error (only with ASP.net Core 2.2.
With Core 21 there where no problems.
Now I have changed back to work with appsettings.json everything is fine. But the best secure way is with the Key Vault.

@DimaSUN
Copy link

DimaSUN commented Jun 26, 2019

Work for me

ASP.NET Core 2.2 or later: For a 64-bit (x64) self-contained deployment that uses the in-process hosting model, disable the app pool for 32-bit (x86) processes.

In the Actions sidebar of IIS Manager > Application Pools, select Set Application Pool Defaults or Advanced Settings. Locate Enable 32-Bit Applications and set the value to False.

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.0#create-the-iis-site

@GerFVersteegGitHub
Copy link

Hi DimaSun,
The ANCM error is not on my local web, but in Azure. How can I change the IIS settings for web aps in Azure? I work with Visual Studio 2019.

@AHTA
Copy link

AHTA commented Jun 28, 2019

This work for me

In the file MyProject.csproj

I Change this line
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>

For this
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>

I'm looking for a better solution...

@GerFVersteegGitHub
Copy link

Hi AHTA,

Sorry, but everything is the same as before. only the error header is changed in Azure:
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
I hope you will find something else. Thanks for your devotion

@eaguerrerov
Copy link

Net Core 2.2
Check your lines "addScope" or "addSinglenton" in Startup.cs, probably you have two o more lines same.

@GerFVersteegGitHub
Copy link

Sorry Eaguerrerov, this was one of my checks. The only problem is when I work with a "Key fault" in my program. Without the key vault and use the appsettings.json, then every thing is Ok.

@KhalilHemissi
Copy link

Hi !!
i want to lunch my api (asp core 2.2)on IIS Server , I receive HTTP Error 500.30 - ANCM In-Process Start Failure .
i configured Web.config , and myProject.csproj and program.Cs .
the same error ..
Any One can help me !! thanks

@eaguerrerov
Copy link

@KhalilHemissi is working with dependency injection in your application asp net core 2.2 ?

@worldspawn
Copy link

@KhalilHemissi this is a generic error and there are many causes. Check the windows event viewer application log for a cause and if you don't find anything there check the log file setup in web.config. Usually ./logs, it's off by default, enable in web.config.

@KhalilHemissi
Copy link

@worldspawn
when i enable stdoutLogEnabled with module AspNetCoreModuleV2 ./log created but files of logs is empty.and when i enable it with module AspNetCoreModule the log files contains :
Hosting environment: Production
Content root path: C:\Deploy\IXIGraphiqueApi\09-DEV
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

Thanks for answering ..

@KhalilHemissi
Copy link

@eaguerrerov Yes .
it works on local but when i wanna to lunch it on server IIS ! it causes problem ..
this is the first time , i deploy app on iis , it can be problem of setup ???
i follow instruction of this documentation :
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2

Thanks for answering ..

@KhalilHemissi
Copy link

even when i create a new project api core 2.2 !! it didn't work , same problem !!! :( :(

@eaguerrerov
Copy link

@KhalilHemissi
Try download and install manually asp net core 2.2 in this url.
No required Visual Studio Installer.

url here:
https://dotnet.microsoft.com/download/dotnet-core/2.2

@KhalilHemissi
Copy link

@eaguerrerov thanks , i will try but i have new news !!
I created an MVC Web Application (asp.core 2.2) then i deploy it on IIS and it's works !!
and re-create and other project but WEB API , but on IIS didn't !!! okay

@KhalilHemissi
Copy link

@eaguerrerov i re-installed .NET Core SDK 2.2.0 and 2.2.0 Runtime & Hosting bundle.
Finally it works !! thanks a lot

@NUlliiON
Copy link

NUlliiON commented Aug 1, 2019

Perhaps your problem is that you missed the comma in "appsettings.json"

@vladlee098
Copy link

vladlee098 commented Aug 8, 2019

In my case we had to change back slash with '/' (forward slash) in one of the path settings in logging.json which was referenced in startup.

@mickey-stringer
Copy link

Apparently many conditions can trigger this error code. In my case, I had to re-authenticate VS with Azure so my Key Vault client could be created,
Running your app from the command line should give you a more specific error output. See https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-2.2#troubleshoot-on-iis

@KoenvHaren
Copy link

I got this error and realised I had missed a comma out of the appsettings.json file.
May be worth a try for anyone still getting this issue.

It would be good if it did give a less generic error though to speed up troubleshooting.

Brilliant, this solved it for me. This error seems like the dumping ground for whatever exception pops up during startup.

@joacar
Copy link

joacar commented Oct 3, 2019

Run the application from command line since that might reveal the actual error. First got this generic one and then I ran dotnet run and the issue was revealed.

@mmhgarcia
Copy link

I get this error and problem was mistake connection string.

A friend had the same problem, the error was in the connection string, wrong host name.
Thanks.

@ronnygunawan
Copy link

ronnygunawan commented Oct 26, 2019

I solved mine by deleting all obj and bin folders then rebuild solution and published it again.

If you encounter this problem, then try to delete obj and bin first before trying anything else suggested in this issue. Powershell command I used to delete all bin and obj in solution folder: gci -include bin,obj -recurse | remove-item -force -recurse

@arafat198717
Copy link

arafat198717 commented Oct 29, 2019

Thank you.
I got same problem but It was connecting string error, after correction of connecting string its working.

@dowla021
Copy link

dowla021 commented Nov 14, 2019

Same problem (connection string), but in my case it was "SERVER\INSTANCE", after correction to "SERVER\\INSTANCE" it works.

Thanks for your hints.

@dowla021
Copy link

dowla021 commented Nov 14, 2019

Server\\Instance with double backslash...

@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 14, 2019
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM
Projects
None yet
Development

No branches or pull requests