1

I am trying to deploy a simple ASP.NET web application over the Internet, using the google cloud platform. I followed the tutorial on this page : https://cloud.google.com/dotnet/docs/getting-started/hello-world (I uploaded a slightly more complex app though). So basically everything went well from the creation of the ASP.NET framework virtual machine to the deployment from my computer to the VM since I've been able to reach for the web app home page through the VM IP address.


Starting Web deployment task from source: manifest(C:\Users...\obj\Release\netcoreapp2.2\PubTmp\myApp.SourceManifest.xml) to Destination: auto().

Updating file (Default Web Site\MyApp.deps.json).

Updating file (Default Web Site\MyApp.runtimeconfig.json).

Updating file (Default Web Site\web.config).

Successfully executed Web deployment task.


Problem is that the home page won't display as it did when I would deploy it locally (with IIS express) but rather throw an

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

I found some interesting subjects raising the same issue :

  • Deploying website: 500 - Internal server error : suggests to enable detailed errors and/or to change a few lines in the web.config file but I do not have a web.config file at my side of the process in my project (only a Startup.cs which does some of the work) and I cannot manipulate the one in the google virtual machine.

  • I noticed that before uploading the web app to the VM, the output displayed errors similar to these : https://github.com/dotnet/sdk/issues/1897 (message NETSDK1041) so I thought that the discrepancies between referenced/platform assemblies might be the origin of these errors but then, why wouldn't they impact the local deployment of the web-app too ?

I would like my web application to run on google cloud's VM (based on the generic Google Compute Engine ASP.NET framework), the web app is 'correctly' deployed to the host VM but raises a wild 500 - internal error. Anybody has any idea as to how I could at least identify the source of this error ? (Helping me find the web.config would also help greatly, I understand that everybody has this file somewhere, but I can't find it and don't have a clue on its whereabouts because I just used a random template MVC application on Visual Studio Community 2017 which did all the configuration work

J. Valjean
  • 35
  • 7
  • Did you actually read the tutorial? [Specifically the section that shows the solution explorer with the `web.config`?](https://cloud.google.com/dotnet/images/publish-to-google-cloud.png) – Ian Kemp Jun 15 '19 at 20:53
  • Yes I did, but the thing is that my configuration does not have this web.config, it is automatically built if I decide to publish my app 'locally' using IIS but it doesn't exist otherwise. I managed to publish my app on Microsoft Azure somehow but it still doesn't work on other cloud structures such as Google cloud... – J. Valjean Jun 15 '19 at 22:31

0 Answers0