I am new to web technologies and hosting apps. What I am currently trying is: I have created a simple app (just created a web app using Visual Studio 2022 in .NET 6.0), it automatically created the weather forecast app.
When I execute the application through VS2022, the app is hosted in IIS Express and I am able to get the response from the server. What I am actually trying is to create a batch file which has command to run IIS Express. Below is my command: (IISTest is the App Name)
start "IISTest" /MIN "C:\Program Files\IIS Express\iisexpress.exe"
/config:%~dp0applicationhost.config /site:"IISTest" /trace:info
I have copied the default applicationhost.config
file from Documents/IIS Express/config
folder and placed it along the batch file modified the <Sites>
section to point it to my solution directory and updated the <bindings>
to "*:44300:localhost"
.
With these changes when I run the command, I get the Internal Server Error.
What am I missing here? Thanks.