create a file in web service

Discussion in 'ASP .Net Web Services' started by keith, Oct 27, 2008.

  1. keith

    keith Guest

    My environment is Windows XP SP2.

    I created a web service, then added

    authentication mode="Windows", identity impersonate="true" in its config file.

    I disabled Anonymous access for the WS in Authentication Methods in
    Directory Security and select Integrated Windows authentication

    In the web service there is a function to save data to a text file.

    In VS 2005 IDE, I created a test win app that calls the function in the web
    service.

    I stepped in the web service and when ran the statement in the web service

    System.IO.Stream sm = new System.IO.FileStream(c:\temp\test.txt,
    System.IO.FIleMode.Create);

    It threw

    Access to the path 'C:\\temp\test.txt' is denied.

    I ran the WS with my log in and I checked ACL on the file and found out
    that I have full access on it.


    Can you help?

    Thanks

    Keith
    keith, Oct 27, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    609
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,202
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Replies:
    1
    Views:
    3,171
    Not Me
    Jun 5, 2007
  4. Replies:
    1
    Views:
    185
    Andrew Brook
    Aug 2, 2006
  5. Leo Violette
    Replies:
    0
    Views:
    1,000
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page