0
votes

I have hosted asp.net mvc application as an application called "samples" inside default website in wwwroot folder in IIS7.0. The url www.website.com/samples will show the application but i want the url www.website.com to show the application.

I have set default document as below.

<defaultDocument enabled="true">
<files>
<clear />
<add value="Index.aspx" />
</files>
</defaultDocument>

Also i have placed the Index.aspx in root folder. I am getting the below error

The file '/Views/Shared/Site.Master' does not exist.

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

I have searched and found setting default document will work but getting above error.

Can anyone suggest the best way?

1

1 Answers

0
votes

Your application should be deployed to the root folder for which the web site is configured for:

enter image description here

So in this example you deploy your application in c:\inetpub\wwwroot directly. No subfolders.