question

u7ername-8342 avatar image
0 Votes"
u7ername-8342 asked u7ername-8342 edited

Cannot run IIS site locally

Just took over a new site techleader built with asp.net and IIS. The solution builds fine in VS, but got this error when trying to run the site locally in debug mode via VS2019 (start debugging) on Win10. Before the error appears, it says "some remote operation is taking longer than expected", somehow this indicates that it's trying to connect to a remote machine. I spent quite some time searching about this error and have seen there are some posts about the same/similar errors but none of solutions works for me. Guess there must be something that is not setup correctly somewhere (most likely in IIS).

104229-dyoxz.png

One of the suggested solutions is editing the hosts file in C:\windows\system32\drivers\etc, which I did add enter an entry: 127.0.0.1 http://cbuk.com but it didn't help.

This is the project property Web tab:

104217-r0oxq.png

In IIS, I created an app pool called 'cbuk' and set it to classic mode, logging in as NetworkService.

This is the binding for the site in IIS:

104137-rmwti.png

Have spent a lot of time on this; some help would be appreciated.


windows-server-iisdotnet-aspnet-core-mvc
dyoxz.png (44.8 KiB)
r0oxq.png (79.2 KiB)
rmwti.png (44.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered

Is UAC enabled and are you running Visual Stuido with UAC admin rights? Did you configure VS to create the virtual directory that would have hooked everything up right app pool and all so VS Web project can be debugged out on IIS?

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2019

I would let VS hook everything up out on IIS for the Web project debugging hosted by IIS. Anything you have done out on IIS, you need to undo. VS must be running with admin rights to create the virtual directory on IIS.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AgaveJoe avatar image
0 Votes"
AgaveJoe answered AgaveJoe edited

You might need to meet with your peers to understand the intention.

Visual Studio is configure to open http://cbuk.com. We cannot determine from the URL if the site is local or remote. What happens when you try to open http://cbuk.com in your browser? Does the site open? What if you comment the entry in the hosts file, does the site open?

Let's assume http://cbuk.com opens and the site is intended to run in local IIS. Make sure you are running Visual Studio and an administrator. Right click run as administrator. Check Windows Fire wall to make sure the port 4024 is open as the error warns. Make sure remote debugging is installed. Try attaching to the site instance. See the following docs for troubleshooting steps.

https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugger-port-assignments?view=vs-2019
https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2019

Maybe just use IIS Express?


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.