why am I getting: "HTTP Error 500.30 error" when publishing the Blazor server-side site?

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
Hello,

I've made my web app on Blazor server-side and I'm trying to publish it on a windows server. I tried different methods to publish but all came to the same conclusion.

HTTP Error 500.30 - ANCM In-Process Start Failure

Why am I having this problem? You can see the result on mangoscarf.com.

regards,

Saeed
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
Are you sure that the Windows Server that you are publishing to has the same version of .NET Core as the one you built against?
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
Are you sure that the Windows Server that you are publishing to has the same version of .NET Core as the one you built against?
I suppose but I'm not sure. Did you see the page?
first I published to win 32. But then changed it to win 64. But the result was the same both times.
 
Last edited:

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
I'm not talking about bitness. I'm talking about .NET version. For example, you may have built your server side Blazor app as .NET 5, but the machine you are trying to run on has .NET Core 3.1.

I've seen errors like that where someone was trying to run their .NET Core 2.2 app on our server which has .NET Core 3.1.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
I asked the host, both .net core and bitness are the same but still have this problem.

Why there is no index file and there is an application file? is this correct?

thanks,
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
Look at your publish directory. Did it have an index file? It should not. Did it have an application executable? This will depend if you built self contained it not.

Time to use the mighty Google to see the other reasons for that error.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
It sounds the problem is related to the version of the .net core.
How can I be sure which .net core versions should be installed?

thanks,
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
What version did you build with? That's the version that should installed, specially if you are not building/running as self-contained. If you are building/running as self-contained, there is a little bit more leeway to have a mismatch between the version of .NET core you are using vs. the IIS hosting bundle installed by your web host.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
When I run the site you can see this error:
An error has occurred. This application may no longer respond until reloaded.
Do you think what is the reason?
This site is mangoscarf.com
Here comes the published files: do you think what is wrong?

pub.png
 
Last edited:

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
It could be lots of things. The server side could have crashed. The client side may have failed to re-establish a connection with the server side. A developer may have put in that message just to mess with you. Who knows? You'll need to take time to debug your application. Enable logging and check your logs. Check the IIS logs. Check the Windows event logs. Use Fiddler to trace the SignalR traffic between the client side and server side.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
All of them. You want to narrow down where the error is occurring. You'll have to start out with a wide net and then iteratively figure out what is relevant.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
According to this forum latest post:
I got this result: An error has occurred. This application may no longer respond until reloaded.
You can check on mangoscarf.com

What you mean by saying: Enable logging and check your logs
Can you please let me know what you mean?

What is surprising me is: there is no index.html file, and instead there is an application file: index.exe:oops:
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
What is surprising me is: there is no index.html file, and instead there is an application file
That is how .NET ASP.NET Core works. IIS directs all the traffic to the executable.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
I said enable both of them. See post #12.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
But both of these methods should be written in web.confing:

C#:
<aspNetCore ...>
  <handlerSettings>
    <handlerSetting name="debugLevel" value="file" />
    <handlerSetting name="debugFile" value="c:\temp\ancm.log" />
  </handlerSettings>
</aspNetCore>

and:

C#:
<aspNetCore processPath="dotnet"
      arguments=".\MyApp.dll"
      stdoutLogEnabled="false"
      stdoutLogFile=".\logs\stdout"
      hostingModel="InProcess">
  <environmentVariables>
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
  </environmentVariables>
</aspNetCore>

While blazor server side doesn't have web.cofig file!
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
2,892
Location
Chesapeake, VA
Programming Experience
10+
If you are publishing your Blazor Server App correctly, you should have one. It should be in the bin\Release\net5.0\publish directory if you are publishing to a folder. If you are publishing to IIS using a web deploy package, it'll be compressed in the deployment file.

Anyway, based on your post #10, that file at the bottom of the screenshot looks to be your web.config file.
 

SaeedP

Well-known member
Joined
Oct 21, 2020
Messages
54
Programming Experience
3-5
If you are publishing your Blazor Server App correctly, you should have one. It should be in the bin\Release\net5.0\publish directory if you are publishing to a folder. If you are publishing to IIS using a web deploy package, it'll be compressed in the deployment file.

Anyway, based on your post #10, that file at the bottom of the screenshot looks to be your web.config file.
I understood what you say. After the project was published I will place these codes in web.config file then what should happen to log.
I mean I should I run a command or what?
 
Top Bottom