Help with share path on server...

Discussion in 'ASP .Net' started by Trint Smith, Mar 3, 2004.

  1. Trint Smith

    Trint Smith Guest

    If my local path for doing 'streamwrite' is
    'd:\inetput\wwwroot\webproject1', when I upload it to the host server
    and my webprojects root is 'e:\web\tribidzcom0\htdocs' how would I put
    that in this so that it writes temp files to the servers drive?:
    Dim sw As StreamWriter
    sw = New StreamWriter("e:\web\tribidzcom0\htdocs\temp", True).

    Any help is appreciated.
    Thanks,
    Trint



    ..Net programmer


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Trint Smith, Mar 3, 2004
    #1
    1. Advertising

  2. Assuming that the folder is somewhere in your web site, use the
    Server.MapPath() method, which takes a relative URL and returns an absolute
    file path. However, be advised that your hosting service isn't likely to
    allow your app to write files to their system.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Trint Smith" <> wrote in message
    news:...
    > If my local path for doing 'streamwrite' is
    > 'd:\inetput\wwwroot\webproject1', when I upload it to the host server
    > and my webprojects root is 'e:\web\tribidzcom0\htdocs' how would I put
    > that in this so that it writes temp files to the servers drive?:
    > Dim sw As StreamWriter
    > sw = New StreamWriter("e:\web\tribidzcom0\htdocs\temp", True).
    >
    > Any help is appreciated.
    > Thanks,
    > Trint
    >
    >
    >
    > Net programmer
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Kevin Spencer, Mar 3, 2004
    #2
    1. Advertising

  3. Trint Smith

    Trint Smith Guest

    I've already asked them because I have to create results.html files and
    that is when they gave me the "e:\web\tribidzcom0\htdocs" as the root
    for my website.
    Can you give me an example of what this should look like with
    Server.MapPath() ?
    sw = New StreamWriter("e:\web\tribidzcom0\htdocs\tempfiles", True)
    Thanks,
    Trint
    ..Net programmer


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Trint Smith, Mar 3, 2004
    #3
    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. John_Woo
    Replies:
    3
    Views:
    492
    Steve W. Jackson
    Jul 21, 2006
  2. Dan
    Replies:
    1
    Views:
    169
  3. Saraswati lakki
    Replies:
    0
    Views:
    1,276
    Saraswati lakki
    Jan 6, 2012
  4. Jack
    Replies:
    2
    Views:
    192
  5. Eric Wong
    Replies:
    0
    Views:
    188
    Eric Wong
    Feb 13, 2010
Loading...

Share This Page