简体   繁体   中英

asp.net publish on iis 6 - masterpage fail

I'm working at an ASP.net application.

When I debug the local Project, it works and everything is okay. I tried to publish the project directly from Visual Studio 2010 via File System. The publish work and there are no errors. But if I call the project via browser, I get the error

The file 'pagemaster.master' does not exist.

I have to say that this project doesn't contain the master. The master is in an other project. But I added this project to the solution and I also added a reference to the other project. And as I already said, the project works locally.

Can anybody help me fix this?

Check first if it's working in local because of an hidden old copy of the master page (in the solution view check show hidden files ).

After this, if you reference a master page from another project, you need to be sure that the fiscal non-code-behind part of it is copied in the resources.

To assure that you should set the property of the master page to Embedded Resource and access it using a VirtualPathProvider mechanism to call the Resource.

It's a bad solution, but also your approach is really "unconventional" :( You should consider other way to recycle code and templates from common projects.

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