简体   繁体   中英

Run two Web APIs on same IIS site with same port

I currently have two C# Web APIs. (One is an older legacy version of OData, and I'm creating a new one to start using the newest version; but I need to support both for some time.)

When I launch the solution locally, I can access them both:
http://localhost:10013/odata3/Screen
http://localhost:10012/odata4/Screen

I want them to launch on the same port, how would I configure this?

I guess you can manage this with help of virtual directories. They are configured easily for full IIS. For IIS Express you will need to dive into C:\\Users\\#username#\\Documents\\IISExpress\\config\\applicationhost.config and configure sites element there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM