Blog Stats
  • Posts - 24
  • Articles - 0
  • Comments - 61
  • Trackbacks - 92

 

Indigo - use of HttpContext.Current.Server.MapPath

I have heard Don Box speak about the caviats of using the Indigo service model.  He states that service classes should not use transport-specific API - notably the use of HttpContext.  The logic is obvious. 

The problem is that my ASMX web services must often use XSD files that are in the same directory as the ASMX file. HttpContext.Current.Server.MapPath is used to resolve to a local path.  What is the recommended API for doing such resolution without HttpContext?  Don, your comments would be appreciated.


Feedback

# re: Indigo - use of HttpContext.Current.Server.MapPath

Gravatar You can use AppDomain.CurrentDomain.BaseDirectory to accomplish the same things in all .NET apps. 2/29/2004 6:46 AM | Paul Wilson

# re: Indigo - use of HttpContext.Current.Server.MapPath

Gravatar Thank you. I have been all over the net looking for the base directory of my app. 9/10/2008 8:58 PM | Rodney Britt

# re: Indigo - use of HttpContext.Current.Server.MapPath

Gravatar Thank you. I have been all over the net looking for the base directory of my app. 10/19/2009 10:15 PM | tiffany key ring

Post a comment





 

 

 

Copyright © Eron Wright