Sep 3, 2013

Web server path when out of http context

When running a service under IIS, the HttpContext.Current object is not available, so HttpContext.Current.Server.MapPath will fail.

http://tim-stanley.com/post/use-hostingenvironmentmappath/

http://dteixeira.com/684/alternative-server-mappath/

No comments:

Post a Comment