开发者

Web Deployment Project failed to map path for include virtual

I am building my site with a web deployment project but the build fails with a number of errors all relating to the "#include virtua开发者_Go百科l" directives in my master page.

The includes are necessary to import a set of centrally managed html template files.

Here is an example of the include directive and associated error:

<!-- #include virtual="/v3/sits/pdpdev/assets-templates/inc/head.html" -->

/PDPRegistration.csproj/Pages/ContentPage.Master(15): 
error ASPPARSE: Failed to map the path 
'/v3/sits/pdpdev/assets-templates/inc/head.html'.

The error for each included file actually appears multiple times. I'm not sure what is being mapped or why, but this was never a problem until I started using WDP (which I wanted to alter web.config depending on the build environment, among other things.)

The project is built locally on my PC and then copied to the web server via a mapped drive. I found a few solutions on the 'net involving IIS metabase - they weren't quite clear to me, and I'm not sure if they apply given how I build and deploy the project (that is, would I have to build on the same system as IIS in order to make use of the metabase?)

Can anyone suggest how I can get my project to build with WDP?


Although SSI's are available within the Framework, the preferred way of doing include is to wrap the content from the file into a User Control (.ascx) as per the MSDN documentation See also: support.microsoft.com/kb/306575

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜