How do I run multiple MVC apps within a subdomain on IIS7?
Posted
by
Matthew Patrick Cashatt
on Server Fault
See other posts from Server Fault
or by Matthew Patrick Cashatt
Published on 2012-09-08T16:42:47Z
Indexed on
2012/09/08
21:39 UTC
Read the original article
Hit count: 273
Hello and thanks for looking.
Background
I am currently wrapping up a development contract and the client would like for me to push a build of the application to their IIS 7-based server in which they would like to run multiple MVC apps.
One of the issues I have off of the bat is that this server is already a subdomain on their larger network. So, if I enter SERVERNAME
in my browser, it automatically directs to SERVERNAME.COMPANYNAME.COM
.
Now, this is just fine if I place my application in the default website/root. In this scenario, clicking a link that requests admin.html
directs to `SERVERNAME.COMPANYNAME.COM/admin.html' as usual.
BUT they want me to place the app in a subdomain on this server so that they can also run other apps on the same server. So I assume that I need MYAPP.SERVERNAME.COMPANYNAME.COM
but I have no idea how to do that.
Complicating matters is that my app and the future ones they wish to install are all MVC based which intercepts and re-writes URLs. I assume that this takes care of itself if I can just successfully get my app into a subdomain to begin with.
What I have tried
- Creating a new site on the server in it's own app pool
- Setting the binding for that site to
MYAPP.SERVERNAME.COMPANYNAME.COM
- Setting the binding for that site to
MYAPP
- Setting the binding for that site to
MYAPP.SERVERNAME
- Setting the binding for that site to
MYAPP.SERVERNAME.COM
- Setting the binding for that site to
MYAPP.COMPANYNAME.COM
Nothing is working. Am I missing something simple here?
Thanks,
Matt
© Server Fault or respective owner