ASP.Net - Server operation is not available in this context - Using Server.MapPath in Global.asax

.NET Programming

If you try to use the Server.MapPath() function in your global.asax file for ASP.Net you are likely to encounter this error:

Server operation is not available in this context

To use Server.MapPath() in global.asax instead use:

System.Web.Hosting.HostingEnvironment.MapPath()

More details about System.Web.Hosting.HostingEnvironment.MapPath() are available on MSDN



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






ASP.Net - Server operation is not available in this context - Using Server.MapPath in Global.asax | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.


Gold Coast Aquarium Maintenance | Gold Coast Marine Fish | Gold Coast Tropical Fish
Jewel Jones - Counselling Service - Penrith, Richmond
 
     
 Copyright © 2017 Julian Kuiters
 All trademarks and copyrights on this page are owned by their respective owners.