what path corresponds to "root" in a web service?

I am trying to position a file in my Visual Studio 2005 development environment for a web service.  And I'd like the file to be addressable just as though the web service were running on my website and the file was located in the root directory.

I've tried in the

bin/debug
obj/debug

but I suspect it needs to be in Inetpub

can anybody help?

thanks,
newbieweb
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
drichardsCommented:
What exactly are you trying to do?  There are two types of paths in a web routine virtual and physical.  The Physical path is the path on the OS filesystem (C:\Inetpub\wwwroot\webservice) and the virtual path is the path as configured in the web server (/webservice).  There is a MapPath function to convert the virtual path to a physical path.  If you used the System.IO.Directory.GetCurrentDirectory() method in the web service code it would give you the physical path.  The virtual path is in the request.  The physical path may be in a completely different part of the folder hierarchy or another drive completely from the web server root, depending on how the web site or service was configured in IIS.
0
 
newbiewebSr. Software EngineerAuthor Commented:
I learned that I was hitting a stone wall when trying to write a textfile to the root because of the limitations of shared hosting.  I am now upgrading to a virtual dedicated server.

thanks,
nbw
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.