UMBRACO 10 HTTP Error 500.30 - ASP.NET Core app failed to start - asp.net-core

I am trying to deploy my Website with umbraco 10, I always get the following error:
HTTP Error 500.30 - ASP.NET Core app failed to start
The website works correctly locally, however when deploying the app I get the same error...
Details:
DB SQL Server
Azure WebApp .Net6
What i have tried
I have followed the instructions: https://our.umbraco.com/documentation/Fundamentals/Setup/Server-Setup/azure-web-apps
I have created a project from scratch, thinking that the problem was some package, but still the same error.
This is how my umbraco 10 application looks once deployed from VS to an appservice (Azure)

The first thing I would do is check the logs on the the environment where you have deployed the code. That should give you a better idea what is actually going wrong as the error you are getting is very generic and not that helpful.
I have seen issues where the media folder is missing and that is something to check.
When I have issues in Azure, I also look at the files via the Azure Portal and check the connection string and any other configurations files to ensure they look correct. It could be the deployment has screwed up some values.
Have a look at this post which may provide some further details - https://our.umbraco.com/forum/using-umbraco-and-getting-started/108288-getting-http-error-50030-after-successful-publishing-to-azure

Related

Blazor .NET Core app not deploying on IIS

I'm trying to deploy a blazor app on IIS following the article below
https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-5.0&tabs=visual-studio
I've installed IIS version 10.0 using the following settings:
I then created the site and changed the application pool to No Managed Code
I created a new Blazor app and deployed it immediately without changing a thing (so I know there's not a problem with the code). Looking in the project properties it's using .NET Core 3.1
I noticed there was no web.config file when I built the Release version.
I copied the Release version to the website directory.
Browsing to the site gives me a 403.14 - Forbidden error.
I read in another article to try configuring the Mapping Handlers this was the current state of the handlers:
I added a module mapping like so:
I now get a 500 error:
The web.config file currently looks like this:
I then read to add this aspCore line to the configuration file:
After that it looks like it loads but with none of the formatting.
I assumed hosting a Blazor site on IIS would be a simple thing to do, would someone be able to point me to where I am going wrong?

Deploying Asp.net Core 3.1 does not work on Windows server

I have this Asp.net Core 3.1 developed on VS2019 preview.
basically it is a blazor server-side app with referenced assemblies and some nugets.
it runs fine on VS2019 and on my IIS after publishing to folder..
problem is when i move that folder to windows server machine with IIS installed and everything.
an error with 500 code appears.
one thing i noticed here..the log_error.txt file in the server it points out an exception
,and that exception -what ever it is- showing the error line of the startup.cs file with my laptop directory path !
i mean it shows this C:/mrmeeez/..../Startup.cs line 411
but this path does not exists in the windows server machine
it supposed to be F:/.... somthing/Startup.cs line 411
i don't know if it has something too do with the problem anyway..or maybe my assemblies and nugets not shipping correctly to the server
windows server machine is working fine , i tried blazor app template and it ran perfectly.
i need your help guys , Thanks !
Ok , i found it
i don't know for sure is this related to asp.net core 3.1
because i deployed asp.net core 2.1 months ago and it was fine
anyway i used the development exception page in the final publish to see what causing the error and showed this
UnauthorizedAccessException: Access to the path 'C:\Windows\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys' is denied.
and after searching for that i found the answer from a guy in github
it seems that the user IIS_IUSRS for this application pool -by default- does not have permissions to access that path
to solve this problem,either one of the two below:
1-Give IIS_IUSRS permissions to access the system files -NOT RECOMANDED-
2-Change the user of the your application pool to LocalSystem account in IIS by going to Application Pools -> Right-Click your app -> Advance Settings -> Process Model section then change Identity
Reference: https://github.com/dotnet/aspnetcore/issues/1983
Thanks!

Publish .NET Code application to Arvixe Host

I have a ASP.NET Core with Blazor website and I want to deploy it to Arvixe host. The website is very simple and contains only UI elements no database required. I published the website to a local file system and uploaded it using FTP to the Plesk.
When I am visiting the website, I receive this error:
500 - Internal server error. There is a problem with the resource you
are looking for, and it cannot be displayed.
I have tried to run it on the IIS and I received more details:
Configuration The configuration file cannot be read due to
insufficient permissions.
I tried to add IIS_IUSRS to the group and users for web.config but I am not able to find it because I am using a windows 10 connected to active directory.
Besides, I still don't know how to solve this problem at Arvixe. Does anyone know tips might help?
500 internal error is generic issue. Please kindly check the error message on the server and paste it here. Make sure that your provider has installed .net core bundled on their server and here are tutorial about publsih .net core using plesk https://windowswebhostingreview.com/how-to-publish-using-web-deploy-with-plesk-control-panel/. It should be working fine.
You need to give Full Trust permission (Read-Write-Execute) to your application folder and also to Application Pool and also check if the Runtime version supported by Arvixe matches with your Asp.net Core version.
Also enable the logs in web.config file by setting stdoutLogEnabled="true" to get detailed error so that you can investigate more about the error.

ASP.NET Core web app response with 502 error

I'm investigating an issue with the asp.net core 1.1 web app.
We had to install the latest VS 2017 on the build server. And straight after that, all the deployed builds return 502 responses. Nothing changed in the app code or the referenced packages, however, many binaries are different after VS 2017 install. The deployment is done via FTP.
I also noticed there is now a small difference in Http response headers. API Response Headers used to have Server: Kestrel. But now, after installing VS2017, the deployed builds return Server: Microsoft-IIS/10.0. This probably explains 502 error, but why would the Server now switch to IIS?
Managed to fix it. The error is caused because IIS server (proxy) can't access AspNetCoreModule, the process that hosts kestrel. Usually, the reason is because kestrel in some trouble.
The solution starts with checking Application logs in Event Viewer on the server.
In my case it was:
Application 'MACHINE/WEBROOT/APPHOST/MyApp.API' with physical root '\servername\c$\inetpub\wwwroot\MyApp.Api\' failed to start process with commandline '"dotnet" .\MyApp.Api.Web.dll', ErrorCode = '0x80004005 : 80008083.
So, by googling the error code I've realised that the server didn't have the right asp.net core version (for some reason).
Downloaded the installer, works fine now! :)

local work but hosting on AppHarbor can not query SQL Server

So I have my web.config connection string pointing to my SQL Server on appharbor - from local (running Visual Studios) I can login and the memberships works. However from the build that is on the hosting side I get sorry, an error occurred while processing your request.
This is strange because I made a new user from local and check with SQL Server Management Studio whether or not the data has been added to the hosting server and it WORKS.
From my latest build I get the error:
Sorry, an error occurred while processing your request.
which is weird because they both point to the same server...
Anyone have an idea of what I am doing incorrectly?
ASP.NET MVC project has the "HandleErrorAttribute" on by default. You should remove it from FilterConfig.cs in App_Start Folder to see the actual error rather than the handled response.
It's located in the RegisterGlobalFilters method where filters.Add(new HandleErrorAttribute()); should be removed.
AppHarbor has a FAQ to help you troubleshoot deployment errors like these. In particular, you should inspect the "Errors" interface on AppHarbor and disable customErrors. Please elaborate the question if the FAQ doesn't help you solve the problem.