Local debugging of subdomains with VS 2015

后端 未结 1 1777
北荒
北荒 2020-12-31 23:24

I have a multi-tenant website that has to take care of any incoming request and determine the appropriate routing by the URL subdomain.

I set up the subdomain routing

相关标签:
1条回答
  • 2020-12-31 23:49

    I'm guessing you're using IIS express locally?

    If so, in your solution directory, there is a .vs folder. You need to add the binding in the \config\applicationhost.config file inside that folder. Then make sure that you've allowed IIS express to listen to that subdomain.

    You can refer to Scott's article on how to configure IIS Express. Specifically look for this paragraph "1. GETTING IIS EXPRESS TO SERVE EXTERNALLY OVER PORT 80"

    To be more specific, you need to run these commands:

    netsh http add urlacl url=http://{your-domain}:{custom-port}/ user=everyone

    netsh firewall add portopening TCP {custom-port} IISExpressWeb enable ALL

    0 讨论(0)
提交回复
热议问题