4

I have a website which uses .net framework 4.5. Using Visual Studio 2013, I have no issues to run it. However, when I publish it, I get the following error message: "the file '/Views/Shared/Admin.Master' doesn't exists.", but it does exists.

Linha 1:  <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
Linha 2:  
Linha 3:  <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

Any idea about it, if I need to do something before publishing, or if I need to configure something in IIS? Thanks a lot.

2
  • try replacing ~ with .. "~/Views/Shared/Admin.Master" as "../Views/Shared/Admin.Master" Feb 24, 2014 at 19:23
  • I tried, but I'm still getting the same error. Thanks for your reply.
    – Lucas Lima
    Feb 24, 2014 at 21:01

2 Answers 2

4

I faced the same issue, the application build and run correctly on visual studio 2013, but give that error when publishing.

To fix that I changed the build action of the master-page from None to Content

0

Probably IIS issue. Go to your IIS, go to your website. Once there, in the IIS tab, find Authentication. Open it. Enable ASP.NET Impersonation.

It happens to me sometimes. Is a problem of rights

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.