We help IT Professionals succeed at work.

WebService on IIS - Write to File

Programmer_to_be
on
361 Views
Last Modified: 2008-03-06
Hi experts;

Is it possible to write to a file in a C#.NET WebService?? When I try to write to a file in a web service method, and then test it on the localhost machine i get a page cannot be found, so i assume some error occurred. Do i need to alter some setting in IIS to allow me to write a file to a directory on the web server?

Directory structure:-

wwwroot
 + WebServices
    + MyWebService
       + bin
       + Log
       - Global.asax
       - Service1.asmx
       ...

So I want to write to a file in the path: ..wwwroot\WebServices\MyWebService\Log\LogFile.txt

MyWebService is the name of the web service i am developing.

thanks!
       
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.