• Register
0 votes
710 views

Problem :

I am trying to host the asp.net 5 application on the azure, the code is complied for the beta8, my application runs fine on the local environment but when i publish the code on the azure site. I am facing a common error as follows:

 "The specified CGI application encountered an error and the server terminated the process."

6 5 3
7,540 points

1 Answer

0 votes

Solution :

You can try following options to fix your issue.

1.  Fixed the issue using UseIISIntegration() on the WebHostBuilder.as follows:

public static void Main(string[] args)
{
var whost = new WebHostBuilder()
UseContentRoot(Directory.GetCurrentDirectory())
UseKestrel()
UseIISIntegration() // Must for Azure.
UseStartup<Program>()
.Build();
whost.Run();
}

 

2.    Fixed the issue by setting the requestTimeout within the web.config as follows:

<?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=".\PROJECT.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" requestTimeout="00:30:00"/>
    </system.webServer>
  </location>
</configuration>

3.    Fixed the issue by following the below steps.

Firstly my application was .NET CORE 2.2 and I was trying to deploy it in the Azure web app.

I just Right Clicked on the project and clicked on the publish button.

After that Selected the publish profile which I had downloaded from Azure.

Next changed the deployment mode under the Summary to Self-Contained.

Finally clicked on publish button and it worked. 

9 7 4
38,600 points

Related questions

0 votes
1 answer 8 views
8 views
Problem: I am naive to Asp.Net.I am having a weird looking problem where I am trying to open up my ASP.NET MVC application but I am receiving the below ASP.NET error page which says: Server Error in '/' Application. The resource cannot be found. Description: ... unknown reason to me it seems like it is actually searching for the .aspx file. Please guide me if you think I am missing something.
asked Aug 19 Raphael Pacheco 4.9k points
0 votes
1 answer 70 views
70 views
Problem : I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error: "The page cannot be displayed because an internal server error has occurred" Nothing else. Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?
asked Jan 28 jwilliam 3.9k points
0 votes
1 answer 33 views
33 views
Problem: I am completely new to ASP .net core. I guess it is giving me the dependency injection error as shown below: InvalidOperationException: Unable to resolve service for type 'Spinit ... ) Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
asked Aug 17 Raphael Pacheco 4.9k points
1 vote
1 answer 209 views
209 views
Problem : We are now running the 32-bit Windows server 2008 with the IIS version of 7. We are trying to publish the asp.net 4.0 webapp but so far our attempts have failed and only yielded the few warnings in our serverlog without even the stopping our 4.0 application ... very badly after that we ran out of the ideas on what to do on our issue so any form of the input would be greatly appreciated.
asked Dec 30, 2019 alecxe 7.5k points
0 votes
1 answer 884 views
884 views
Problem : I am facing the below error: Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost/App/AngularJS/angular.min.js My project works fine on the localhost. But when I try to run it on the IIS (7.5) I often face ... read/write/modify access for the "IUSR" & "IIS_ISURS" users of my whole project. But still I am facing the same exception on my IIS.
asked Dec 24, 2019 alecxe 7.5k points