file upload position

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    file upload position

    Hi, I have a question.
    I upload file from client to server by asp.net,
    this is my code:

    protected System.Web.UI.H tmlControls.Htm lInputFile fb;

    HttpFileCollect ion MyFileColl = Request.Files;
    HttpPostedFile MyPostedMember = MyFileColl.Get( "fb");
    fb.PostedFile.S aveAs(("C:\\tem p\\test.wav" ));

    and it is ok.

    But I w'd like to save the file to another ip address (like
    192.168.6.2),
    and I open the share folder on it and create the mapping disk on my pc
    is Z.

    I try this:
    fb.PostedFile.S aveAs(("192.168 .6.2\\temp\\tes t.wav" ));
    but got error.

    how should I modify my code?

    Thanks for your kind advice, David.

  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: file upload position

    Hi,

    AFAIK the asp.net user is not allowed to access the network,
    also instead of using SaveAs(("192.16 8.6.2\\temp\\te st.wav" ));
    which is incorrect , why don't use "Z" : .SaveAs(("z:\\t emp\\test.wav" ));
    even so you probably will need to change the permissions,.

    what error are you getting anyway?

    cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation



    "David" <davidchentw@gm ail.com> wrote in message
    news:1125383999 .921322.94880@g 49g2000cwa.goog legroups.com...[color=blue]
    > Hi, I have a question.
    > I upload file from client to server by asp.net,
    > this is my code:
    >
    > protected System.Web.UI.H tmlControls.Htm lInputFile fb;
    >
    > HttpFileCollect ion MyFileColl = Request.Files;
    > HttpPostedFile MyPostedMember = MyFileColl.Get( "fb");
    > fb.PostedFile.S aveAs(("C:\\tem p\\test.wav" ));
    >
    > and it is ok.
    >
    > But I w'd like to save the file to another ip address (like
    > 192.168.6.2),
    > and I open the share folder on it and create the mapping disk on my pc
    > is Z.
    >
    > I try this:
    > fb.PostedFile.S aveAs(("192.168 .6.2\\temp\\tes t.wav" ));
    > but got error.
    >
    > how should I modify my code?
    >
    > Thanks for your kind advice, David.
    >[/color]


    Comment

    Working...