Results 1 to 2 of 2

Thread: xml

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    xml

    Hi,
    Using vb.net in my application I can use the following code to write a file as .xml and save it on the network

    Dim sw As StreamWriter
    Dim strPath = "G:\folder1\test"

    sw = File.CreateText(strPath & ".XML") 'Create the XML file...
    sw.Write("testdata")


    Why can I not do the same task in ASP.NET?

    Thanks

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    Since asp.net apps usually execute under the guise of the ASPNET account, that account must have rights to write to the specified location. That account by default has next to no rights to do anything, especially across the network. It's a local account, so if you're trying to save to a network drive you may run into a few hiccups with permissions(the ASPNET account probably won't have any rights to access a network device). If you wanna test it out, pick a folder that is local to the webserver. go to the security settings on that folder and add the ASPNET account to the list of users who can write to the folder then try it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width