dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Get web path for web service

  1. #1
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Question Get web path for web service

    I have a webservice, and I'd like it to be able to get its current web path, ex: http://myserver/somepath/myservice.svc

    I use VS2010.

    I've tried things like HttpContext.Current.Server.MapPath("."), but HttpContext is null :-(

    Thanks in advance.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,247

    Re: Get web path for web service

    Try Server.MapPath( null ).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)