Blog Stats
  • Posts - 24
  • Articles - 0
  • Comments - 71
  • Trackbacks - 91

 

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Eron Wright