简体   繁体   中英

asp.net 3.5 deployment error - “The file '/Site1.Master' does not exist”

Having a problem deploying a new project to IIS6 and asp.net 3.5.

Project works fine locally, but when published to the server, I get the error "The file '/Site1.Master' does not exist ".

Things I've tried:

I've looked for the problem online and seen that people suggest removing the tilde in the page pirective. ( MasterPageFile="~/Site1.Master" ). I've done this, and it sends me on to a new error, but a similar one saying Could not load type 'MySite.Site1 .

Some people have said that it is caused by not having a namespace, but I've checked to make sure and I do.

I've tried changing from CodeBehind to CodeFile in the Page Directive and still no progress.

And I have tried setting the VirtualPage property of MasterType in the content page. Still zip.

Anyone any ideas? Thanks

尝试将〜/ Site1.master之前的波浪号替换为句点./Site1.master。

(i)Make sure that the user account that the server is running under has permissions to access that directory.

(ii)When using "~" in a file path, make sure that the current application deployment believes the root directory is the same as it was before.

(iii)Open IIS, right-click on the virtual directory folder for this site, and selected "Convert to Application." Refresh and check again.

see ASP.net MasterPage.master does not exist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM