简体   繁体   中英

Using MVCSiteMapProvider with Windows Azure

I'm coding a .NET Azure Web Role using MVC4 RC. To generate a site map, I use MVC SiteMap and it works well on localhost. But once deployed on Azure, I get this error : Site map file could not be found. Verify that the path provided in Web.config is correct.

My MVC SiteMap configuration in web.config is the one by default. The file ~/Mvc.sitemap is at the project's root

Any idea ?

If you are getting error as "Site map file could not be found. Verify that the path provided in Web.config is correct." that means the site map file is not included with your Windows Azure Project when you deployed to it. Have you included ~/Mvc.sitemap file with you project?

To include ~/Mvc.sitemap correctly, you would need to set its property as "content" and copy local as true so this file is part of CSPKG when deployed to Windows Azure.

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