Reputation: 734
I have just published an MVC application. It has a Home controller with a method Create.
The URL is http://www.myurl.com The name of the virtual directory in IIS is myurl.
When I submit the form that posts to Home/Create I'm getting an error because it's trying to send the data to:
http://www.myurl.com/myurl/Home/Create
rather than:
http://www.myurl.com/Home/Create
I tried adding this route:
routes.MapRoute(
"test",
"Home/CreateNewPlayer",
new { controller = "Home", action = "CreateNewPlayer" }
);
but that hasn't made any difference. Can someone please help me out?
Upvotes: 0
Views: 28
Reputation: 1038820
You should not host your application in a virtual directory but rather directly inside the website which has a binding to the www.myurl.com
domain.
Upvotes: 1