Click here to Skip to main content
16,016,263 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I am using ASP.NET Core 5 for API and it's working fine on the localhost but while deploying on a subdomain(GoDaddy shared server), it's not working and I am trying to find a solution for the same since last week. If anyone has an idea, please share as I am unable to generate any logs on the server as well.

** asked GoDaddy support - they said that the code is having some issues. But when I copied and pasted the code of the main domain (which is working fine and developed on dotnet core 5), that's not working on subdomain.

I am unable to identify the issue.

Please help! Thanks!

What I have tried:

I tried to change the web.config of the published file.

XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\API.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

to:
XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\API.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>
Posted
Updated 19-Aug-23 10:13am
v2
Comments
Richard Deeming 3-May-23 4:45am    
"It's not working" tells us precisely nothing.

We can't see your code. We can't see your error messages. And we have no access to your server.

Go back to GoDaddy and get them to explain precisely what the problem is. After all, you're paying them to host your code.

If they won't, or can't, tell you what the problem is, then demand a refund and find a better host.
itsathere 5-May-23 13:26pm    
After enabling the log on the server does not generate the log. That's another reason to not identify the issue. Will try to resolve it by tomorrow with their support help if not and then will ask for a refund.
Thanks for your suggestion.

1 solution

This is several months late but might help someone in the future. From the two web.configs I notice you went from an InProcess to OutOfProcess hosting model.
I did the same thing and got a very similar result. For me it threw the error waiting for database data. I found this article helped (though is sort of the reverse of what I was doing): ASP.NET Core Request Timeout IIS In-Process Mode - The Seeley Coder[^]
Essentially I set the timeout to 30min
XML
<aspNetCore processPath="dotnet" arguments="[app name].dll" stdoutLogEnabled="false" stdoutLogFile="[log location]" hostingModel="OutOfProcess" requestTimeout="00:30:00"/>
and just to make sure added
XML
<system.web>
  <httpRuntime executionTimeout="1800" />
</system.web>
to the web.config Hope this is of some use to somebody.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900