开发者

asp.net web project path - parser error - The virtual path maps to another application, which is not allowed

开发者 https://www.devze.com 2023-04-04 13:41 出处:网络
I have a web site project which include a folder named - /pix. Under the pix folder I have an aspx page -开发者_运维技巧 BPDList.aspx. This page is related to a master page. This is the first line on

I have a web site project which include a folder named - /pix. Under the pix folder I have an aspx page -开发者_运维技巧 BPDList.aspx. This page is related to a master page. This is the first line on the page -

<%@ Page Title="K online" Language="C#" MasterPageFile="../MasterPage.master"
AutoEventWireup="true" CodeFile="BPDPage.aspx.cs" Inherits="BPDPage" %>

The file MasterPage.master exist in the root of my web project (one level above the folder pix). I receive the following error :

"Parser Error Message: The virtual path '/MasterPage.master' maps to another application, which is not allowed."

When changing the path to - "~/MasterPage.master" I receive this error:

"Parser Error Message: The file '/pix/MasterPage.master' does not exist."

How can I reffer to a file in another directory? Why does the 'pix' folder defined as an application?

0

精彩评论

暂无评论...
验证码 换一张
取 消