Setting up IIS on Windows 10 for local testing can be a little tricky at first, but it's definitely manageable with a few checks and tweaks. Let’s break down some potential solutions and steps for your mentioned issues:
Addressing the Connection Error: Apart from ensuring the World Wide Web Publishing Service is running, it's important to verify that your IIS default site is actually listening on the right IP address and port. Open IIS Manager, select your site, and click on "Bindings" in the right actions panel. Here, make sure you have an entry binding to http on port 80 using all unassigned IP addresses initially, or directly to your local IP/localhost. Also, consider checking Windows Firewall settings to ensure it isn't blocking IIS inbound connections.
Deploying Your Web Application: After placing your application files within C:\inetpub\wwwroot
or your preferred directory, remember to give necessary permissions to the application folders, especially read/execute rights for IIS_IUSRS group. In IIS Manager, you might need to add a new site if managing multiple sites or configure application settings such as setting up handlers and modules depending on your tech stack. Don’t forget to configure your web.config file for necessary application settings.
Specific Considerations on Windows 10: While it's quite robust, remember that Windows 10 IIS might have limitations compared to server editions, such as connections limits, which aren’t generally an issue for local testing. It's smart to disable unnecessary modules you don’t need running, to optimize performance. Additionally, if your development involves HTTPS, consider setting up a self-signed certificate for secure testing.
Make sure your IIS logs are enabled because they provide insightful details when debugging. It’s a process, so take one step at a time, and you'll have a nice local testing environment set up in no time. Let me know how it goes or if you hit any specific snags!