Directory of a webservice

F

Felix González

Hi

I need save a configuration file of a webservice, and I´d like save it in
the same directory that webservie. How can know the webservice´s directory?

thanks
 
B

Brock Allen

System.IO.Path.GetDirectoryName(HttpContext.Current.Request.PhysicalApplicationPath)

Though, I don't know how good of an idea it is to have code in your webapplication
saving files into the application's directory, for security reasons. It might
be better to have a dedicated directory that's not being hosted up as a web
application to save files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top