Wednesday, June 7, 2017

I was working on an internal company website with which I starting diving with ASP.net core and the new dotnet core world.
I tried to publish my project to deploy it in a server machine and serve it using Kestrel, everything went fine except the connection from the client which was constantly being refused by the server with error 500.
When you publish a self contained application using dotnet core, you can specify the target host and architecture in which, dotnet publish process will include all necessary file to run out of the box except 2 item in my case for windows 7 x86, that require restarting your OS which are:

  • VS C++ redistributable 2017
  • KB2533623
After publishing your application, you will get a folder in bin\<build> with the name of your target OS if you published with -r <target_RID*>  where you will find a <app_name>.exe file with the name of your app, and a publish folder which contains the whole assets needed to run the server.

The problem in my case it that I thought that I should run the <app_name>.exe in output folder, by doing this, connections got refused by the server with error 500 in my browser. I wend searching in the publish folder and found a similar <app_name>.exe, clicked on it, and it worked fine after then.

I don't know what is the purpose of that exe file in the root directory, maybe someone can tell me. If I find out about it I will update this post eventually.

_____________________
RID: Runtime Identifier
Next
This is the most recent post.
Previous
Older Post

0 comments:

Post a Comment