Open Buzzzsaw opened 5 years ago
I had the exact same problem and I got it to work after installing latest NET Core Hosting Tools for IIS and restarting the machine. Before like you I only could call localhost:5000 on IIS server itself. Now I can reach Baget from outside.
Don't forget to restart because otherwise you will get another HTTP error... Here's the download I used: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2#install-the-net-core-hosting-bundle
@Buzzzsaw could you check if what @Cocotus describes fixes your issue? If not, I'll dig deeper into this issue.
I had a similar issue with 500 errors. For me the resolution was to step down from .Net Core 3.0 to 2.2.
I too had the same problem. The fix from @Cocotus saved my day. 👍
In addition, to be able to access in LAN, I need to run the following command
> netsh advfirewall firewall add rule name="Open Port 5000" dir=in action=allow protocol=TCP localport=5000
Thanks everyone for the help. It seems there's two things I can do to reduce these kinds of errors:
Please let me know if you have any other suggestions on how I can improve these kinds of issues!
Considering my use case, where the hosting server is not connected to the internet, I am more biased towards step 3. But, other steps 1 and 2 are also great.
I wanna add my 50 cents, because today I spend several hours make to run this project with IIS. Worked only OutOfProcess process hosting model (for CoreModuleV2 version) Finished with working this web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="aspNetCore" />
<add name="aspNetCore" path="*" verb="*"
modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore
processPath="dotnet" arguments="./BaGet.dll"
stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"
forwardWindowsAuthToken="false"
hostingModel="OutOfProcess" >
<!-- hostingModel="InProcess" > -->
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
</environmentVariables>
</aspNetCore>
</system.webServer>
<!--
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.0
-->
<location path="." inheritInChildApplications="false">
<system.webServer>
<applicationInitialization doAppInitAfterRestart="true" />
</system.webServer>
</location>
<!-- global Windows/System/InetSrv config reference for .dll:
<add name="AspNetCoreModuleV2"
image="%ProgramFiles%\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll" />
</globalModules> -->
</configuration>
$p = "$PWD\app"
start "http://localhost:7000/"
& "C:\Program Files\IIS Express\iisexpress.exe" /path:$p /port:7000 /trace:error
I hope for someone be usefull info (because baget docs for IIS to short...:P).
I was using NugetGallery for 2 last years. Now I moved to this great project.
With Docker Desktop version for macOs had no problems to run.
Thanks for the information @akrisiun! I've never used IIS myself, so sadly I don't have the knowledge to further improve the docs. Let me know if there's anything you think we should add (or feel free to open a pull request!)
I know virtually nothing about IIS, but, when I used @akrisiun web.config
file, my logs started working which showed me my actual error (that my packages
path was wrong)
Describe the bug
Server responds with an HTTP Error 500.19 with an IIS setup after trying to access it from another machine. Full error information:
Config source:
-1: 0:
The error happens both on localhost and remote PC, after first trying to access the server from another PC.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Being able to at least access the home page from the server itself.
Additional context
I am basically following the steps in
Getting started
andIIS setup
without touching any configuration file.