0

I have a question about one issue what I want to implement in my project... I've two production domains, based on subdomain I change some functionality in my app, and for some reasons debugging on *.localhost for now is quite difficult for now(because I need to test two different functionalities in one domain), so I thinked that somehow I can add some button which could switch my *.localhost subdomains. what I expect:

domain1.localhost:59328/controller/action domain2.localhost:59328/controller/action

when I pressed button it switchs domain1 to domain2 and vice verse...

So, is it possible somehow?

I'm using IIS express on localhost

P.S i'm new in asp.net routing so I don't know much about it...

vladimir
  • 1
  • 2
  • usually the port is the thing that you change to distinguish projects running locally make your logic on that; [try this](https://stackoverflow.com/questions/21202885/how-can-i-change-iis-express-port-for-a-site) – Rafal Mar 01 '22 at 08:07
  • ASP.NET routing is only concerned about the path and query part of the URI. You would usually setup the domain in IIS and configure it so that domain1 / domain2 either internally point to different ports or to different paths on the same port. Though I don’t know how much of this can be done using IIS Express. – ckuri Mar 01 '22 at 08:18

0 Answers0