ASP.NET Core hosting - 500 internal server error

user6542823

I am trying to publish as ASP.NET Core project with a hosting provider that supports ASP.NET Core. I am getting 500 Internal Server Error which I believe is very common. So I searched through the internet and various forums and then I checked the processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" in web.config and they look to be correctly converted with processPath="dotnet" and arguments=".\MyApplication.dll".

I also checked the connection string and it points to production DB server that's working. I confirmed the DB connection by changing the connection string to production DB and running project local. It works and I get the production DB access.

I also tried to get the error info by using the below in my Startup.cs (irrespective of env):

app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
app.UseBrowserLink();

I have also enabled stdoutLog in web.config, but I don't see that folder either:

stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"

I also tried to change applicationUrl and launchUrl in launchSettings.json to my prod Url, but that didn't work as well.

So, the 500 Internal Server Error refuses to go away, and I still don't have a useful error message. The page just says:

Oops. 500 Internal Server Error An error occurred while starting the application.

I would really appreciate if someone could help me here.

Lukasz Makowej

I have also enabled stdoutLog in web.config as but I don't see that folder either:

stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"

There is one trick here - you must create both folders logs and stdout manually - then and only then IIS will create log file inside logs folder (not stdout as you could expect) - don't ask me why, because I don't know why ;)


Oops. 500 Internal Server Error An error occurred while starting the application.

Usually, means problems with a configuration in Startup.cs - the most common problems include an issue with DB itself, an issue with migrations (if you are using Code First approach), problems with appsettings.js, problems with Social Logins credentials (like missing SecretKey)...

Please refer to log file in .\logs\stdout - this is the quickest way to find details about the problem :)


app.UseDeveloperExceptionPage();

app.UseDatabaseErrorPage();

Those will work after your WebApp fully started, but not while starting the application.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

unity 500 internal server error

分類Dev

Cronjob causing 500 internal server error

分類Dev

500 internal server error elastic beanstalk flask

分類Dev

ajax post in laravel 5 return error 500 (Internal Server Error)

分類Dev

ASP.NET Core hosting environment variable ignored

分類Dev

how to show 500 internal Server error page in laravel 5.2?

分類Dev

Insert into AJAX Laravel return 500 Internal Server Error

分類Dev

.htaccess 500 internal server error when adding simple 301 redirect

分類Dev

How to intercept 500 internal server error in WSO2 ESB

分類Dev

Jcrop & Canvas: Size of cropped area is weird & 500 Internal Server Error

分類Dev

500 internal server error while saving data to mongoDB

分類Dev

RequestSizeLimitAttribute: HTTP 500 instead of 413 in ASP.NET Core 2.1.401

分類Dev

MVC4: After server restart, cannot post ajax internal server error 500

分類Dev

Failed to load resource: the server responded with a status of 500 (Internal Server Error) Azure MVC

分類Dev

Gitlab webhook get error:500 Internal Server Error-URI :: InvalidURIError

分類Dev

Hosting multiple product APIs in single ASP.NET Core WebAPI Service

分類Dev

Is it possible to determine the ASP.NET Core hosting environment in an HTML helper method?

分類Dev

Jquery ajax call to pass JSON array in MVC (500 internal server error)

分類Dev

500 internal server error mod_wsgi apache "importerror: No Module named 'django'

分類Dev

Async method returns 500 Internal Server Error to view, even after it completes

分類Dev

DELETE http://localhost:8000/product/[object%20Object] 500 (Internal Server Error)

分類Dev

PHP Telegram Bot: calling functions from another php file results in 500 Internal Server Error

分類Dev

500 Internal Server Error Apache2 When Opens pdf file

分類Dev

Paperclip image upload (base64) - getting 500 internal server error (undefined method 'permit')

分類Dev

Laravel 5 `Internal Server Error`(500)withAjaxフォーム送信

分類Dev

heroku: internal server error

分類Dev

.NET application (WinForms) depending on ASP.NET Core server

分類Dev

Internal Error 500 Apache, but nothing in the logs?

分類Dev

ASP.NET Core Model Binding Error Messages Localization in ASP.NET CORE 2.0

Related 関連記事

  1. 1

    unity 500 internal server error

  2. 2

    Cronjob causing 500 internal server error

  3. 3

    500 internal server error elastic beanstalk flask

  4. 4

    ajax post in laravel 5 return error 500 (Internal Server Error)

  5. 5

    ASP.NET Core hosting environment variable ignored

  6. 6

    how to show 500 internal Server error page in laravel 5.2?

  7. 7

    Insert into AJAX Laravel return 500 Internal Server Error

  8. 8

    .htaccess 500 internal server error when adding simple 301 redirect

  9. 9

    How to intercept 500 internal server error in WSO2 ESB

  10. 10

    Jcrop & Canvas: Size of cropped area is weird & 500 Internal Server Error

  11. 11

    500 internal server error while saving data to mongoDB

  12. 12

    RequestSizeLimitAttribute: HTTP 500 instead of 413 in ASP.NET Core 2.1.401

  13. 13

    MVC4: After server restart, cannot post ajax internal server error 500

  14. 14

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) Azure MVC

  15. 15

    Gitlab webhook get error:500 Internal Server Error-URI :: InvalidURIError

  16. 16

    Hosting multiple product APIs in single ASP.NET Core WebAPI Service

  17. 17

    Is it possible to determine the ASP.NET Core hosting environment in an HTML helper method?

  18. 18

    Jquery ajax call to pass JSON array in MVC (500 internal server error)

  19. 19

    500 internal server error mod_wsgi apache "importerror: No Module named 'django'

  20. 20

    Async method returns 500 Internal Server Error to view, even after it completes

  21. 21

    DELETE http://localhost:8000/product/[object%20Object] 500 (Internal Server Error)

  22. 22

    PHP Telegram Bot: calling functions from another php file results in 500 Internal Server Error

  23. 23

    500 Internal Server Error Apache2 When Opens pdf file

  24. 24

    Paperclip image upload (base64) - getting 500 internal server error (undefined method 'permit')

  25. 25

    Laravel 5 `Internal Server Error`(500)withAjaxフォーム送信

  26. 26

    heroku: internal server error

  27. 27

    .NET application (WinForms) depending on ASP.NET Core server

  28. 28

    Internal Error 500 Apache, but nothing in the logs?

  29. 29

    ASP.NET Core Model Binding Error Messages Localization in ASP.NET CORE 2.0

ホットタグ

アーカイブ