I'm using EC2 to deploy my ASP.net Core MVC web application on IIS. I've published a medium sized project and the browser display the following message "HTTP Error 503. The service is unavailable. " I've published another new project "Empty" with the same
setting as the previous project and the publishing succeeded i tried many solution such as :
making sure that the application poll is not stopped
You should Search for the site you are trying to browse in the logs and the last but one field will give you reason. and you can also find the
evidence of repeated w3wp.exe crashes and Rapid-Fail Protection in Windows Events, in the System log with Source=WAS.
The 503 response from the IIS machine, Service Unavailable, is the result of repeated application crashes. Since the w3wp.exe worker process,
created by IIS to execute a web application, is crashing frequently, the respective IIS application pool is turned off. So you can check if the status
of your application pool is started.
Best Regards,
Jerry Cai
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
i've provided the logs i found . but i didn't know where is the problem. BTW I've published the same web application previously on Azure and it up and running. Now I'm trying to republish using IIS is the previous publishing may cause this problem ? should
i disable or modify something from azure?
Your publishing to azure has no effect on publishing to iis, you can also view the related error messages in the Event Viewer.
Best Regards,
Jerry Cai
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
<div class="votecell post-layout--left"> <div class="js-voting-container grid jc-center fd-column ai-stretch gs4 fc-black-200" data-post-id="66863132">It turns out that the problem is that i didn't have a valid connection string in my appsetting.json</div>
</div> <div class="answercell post-layout--right"> <div class="s-prose js-post-body" itemprop="text">
My startup.cs file is invoking dbInitializer which requires a valid database connection i struggled finding the correct form for the connection string, this is the form if anyone needs it:
Member
14 Points
41 Posts
Publishing with IIS generate Error 503.
Mar 18, 2021 11:21 PM|Amani Al|LINK
I'm using EC2 to deploy my ASP.net Core MVC web application on IIS. I've published a medium sized project and the browser display the following message "HTTP Error 503. The service is unavailable. " I've published another new project "Empty" with the same setting as the previous project and the publishing succeeded i tried many solution such as :
C:\Windows\System32\LogFiles\HTTPERR
C:\inetpub\logs\LogFiles\W3SVC4
i didn't understand the error and I'm hoping for some help
Participant
1110 Points
371 Posts
Re: Publishing with IIS generate Error 503.
Mar 19, 2021 08:56 AM|Jerry Cai|LINK
Hi,Amani AI
You should Search for the site you are trying to browse in the logs and the last but one field will give you reason. and you can also find the
evidence of repeated w3wp.exe crashes and Rapid-Fail Protection in Windows Events, in the System log with Source=WAS.
The 503 response from the IIS machine, Service Unavailable, is the result of repeated application crashes. Since the w3wp.exe worker process,
created by IIS to execute a web application, is crashing frequently, the respective IIS application pool is turned off. So you can check if the status
of your application pool is started.
Best Regards,
Jerry Cai
All-Star
58464 Points
15787 Posts
Re: Publishing with IIS generate Error 503.
Mar 19, 2021 02:42 PM|bruce (sqlwork.com)|LINK
Did you install aspnet core hosting module on your instance.
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-5.0
Member
14 Points
41 Posts
Re: Publishing with IIS generate Error 503.
Mar 20, 2021 10:32 PM|Amani Al|LINK
Yes it is downloaded i got the 3.1.13 version
Member
14 Points
41 Posts
Re: Publishing with IIS generate Error 503.
Mar 20, 2021 10:37 PM|Amani Al|LINK
i've provided the logs i found . but i didn't know where is the problem. BTW I've published the same web application previously on Azure and it up and running. Now I'm trying to republish using IIS is the previous publishing may cause this problem ? should i disable or modify something from azure?
Participant
1110 Points
371 Posts
Re: Publishing with IIS generate Error 503.
Mar 22, 2021 05:58 AM|Jerry Cai|LINK
Hi,Amani AI
Your publishing to azure has no effect on publishing to iis, you can also view the related error messages in the Event Viewer.
Best Regards,
Jerry Cai
Member
14 Points
41 Posts
Re: Publishing with IIS generate Error 503.
Mar 30, 2021 12:03 AM|Amani Al|LINK
My startup.cs file is invoking dbInitializer which requires a valid database connection i struggled finding the correct form for the connection string, this is the form if anyone needs it:
ps: my database is hosted by AWS
Thank you all
</div> </div>