Page view counter

writing files

Last post 06-21-2005 11:24 AM by roh_8_it_3. 3 replies.

Sort Posts:

  • writing files

    06-20-2005, 5:45 PM
    • Loading...
    • roh_8_it_3
    • Joined on 04-13-2005, 1:25 PM
    • Posts 149
    • Points 718
    hi all,

    i m saving the dataset as a xml file.it writes the file on my local machine but i want to write it on any machine in the intranet by giving the ip address.

    But when i tries to save it on any other machin i get this error "System.IO.IOException: The referenced account is currently locked out and may not be logged on to"

    What i need to do??do i need to give the aspnet account admin rights??but i dont know how to do that??

    thanks in advance.
    if this post helped you then pls mark this as Answer.
  • Re: writing files

    06-20-2005, 11:17 PM
    • Loading...
    • JawadKhan
    • Joined on 03-09-2005, 12:41 AM
    • Toronto, Canada
    • Posts 1,066
    • Points 5,360
    ASPNet service account by default doesn't have right to Network resources. You can give the account the rights which is not recommended for security or use impersonation just to read/write files from Netwrk. Following link discusses all the options in detail .....

    http://west-wind.com/weblog/posts/1572.aspx
  • Re: writing files

    06-21-2005, 10:21 AM
    • Loading...
    • roh_8_it_3
    • Joined on 04-13-2005, 1:25 PM
    • Posts 149
    • Points 718
    Thanks Jawad,I dont want to do it run time so i just tried  to give the rights to the aspnet account.

    First i included the aspnet in the admins group but no success.i was still not able to write any files on  other machine in the network.

    Then i changed the web config file with this information

    <system.web>

    <identity

    impersonate="false"

    userName="domainname\username"

    password="password" />

    </syetem.web>

    but still its saying that access to the path is denied but using this username and password i can access the  network machine.


    Also i tried to check the value for user.identity.name but its not showing me anything.

    Any help on this pls

    if this post helped you then pls mark this as Answer.
  • Re: writing files

    06-21-2005, 11:24 AM
    • Loading...
    • roh_8_it_3
    • Joined on 04-13-2005, 1:25 PM
    • Posts 149
    • Points 718

    got it working with impersonate="true" but i still dont know why it doest show anything for user.identity.name??

    thannks to all.

    if this post helped you then pls mark this as Answer.
Page 1 of 1 (4 items)