Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Writing to a file NOT on web server

Writing to a file NOT on web server

Scheduled Pinned Locked Moved ASP.NET
sysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I am having trouble getting an aspx web form to write to a UNC path. I need to upload a file then write the file to a location not on the web server the file was uploaded to. Is this at all possible? If yes, How?

    C 1 Reply Last reply
    0
    • L Lost User

      I am having trouble getting an aspx web form to write to a UNC path. I need to upload a file then write the file to a location not on the web server the file was uploaded to. Is this at all possible? If yes, How?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      ASP.NET applications run in their own restricted account, that doesn't have very much permission to do anything except run the web site. You need to give permission to this account to write to the disk. If you need to write across a network, it may be possible to select a domain account (ASP.NET normally runs on a machine account) so that permissions can be set elsewhere on your network. You'll find the settings in IIS in the directory security tab of the properties dialog for the virtual directory. However I've never tried this so I'm not 100% certain whether it would work or not.


      "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871)

      E 1 Reply Last reply
      0
      • C Colin Angus Mackay

        ASP.NET applications run in their own restricted account, that doesn't have very much permission to do anything except run the web site. You need to give permission to this account to write to the disk. If you need to write across a network, it may be possible to select a domain account (ASP.NET normally runs on a machine account) so that permissions can be set elsewhere on your network. You'll find the settings in IIS in the directory security tab of the properties dialog for the virtual directory. However I've never tried this so I'm not 100% certain whether it would work or not.


        "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871)

        E Offline
        E Offline
        edward collum
        wrote on last edited by
        #3

        We are unfortunately requiring Windows Authentication to access the website. If we change to allow anonymous access and use a domain account, would it be possible to get the user's domain account so authentication and authorization can occur through .NET.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups