nacho10f
nacho10f

Reputation: 5886

WCF Web Api as a subdomain of an asp.net mvc 3 app?

I have an mvc app running on mydomain.com, and I have added a wcf web api to the web project.

I can access the rest service by going to mydomain.com/MyResource but I actually want MyResource to ONLY work if I go to api.myDomain.com/MyResource, and mydomain.com/MyResource to look for a controller called MyResourceController and throw an error if it didn't find it.

How can I do this?

Upvotes: 5

Views: 250

Answers (1)

Alexander Zeitler
Alexander Zeitler

Reputation: 13089

You'll have to create a new web site in IIS to solve this and create two projects in your solution.

Upvotes: 2

Related Questions