Naming a file in the server in multiuser evironment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KittyKit
    New Member
    • Dec 2009
    • 4

    Naming a file in the server in multiuser evironment

    Hello there

    I've a website that allows a user to create and download a document. I first save the file in the server and then let the user download it. This works just fine. But when multiple users try to do this, they must create their own copy of the file in the server. Can somebody suggest a foolproof way of naming the file - so that everyuser downloads only their copy of the file.

    Many thanks in advance.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Instead of saving the file to the server, why not write the file directly to the output stream?

    -Frinny

    Comment

    • KittyKit
      New Member
      • Dec 2009
      • 4

      #3
      Hey Guys, Happy newyear. Am just back from the vacation and thats y the delay in replying.

      I am creating some .sav files,can I directly write them to output stream?

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        When you create the file, instead of saving it to the server, write it to the Response.Output Stream. Be sure to change the content type header of the aspx page to specify the data that is being sent to the browser.

        Please note that the whole purpose of this aspx page is to create and send the file...it doesn't have any HTML or other ASP.NET controls on it.

        -Frinny

        Comment

        Working...