473,486 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.HtmlControls.HtmlInputFile fb;

HttpFileCollection MyFileColl = Request.Files;
HttpPostedFile MyPostedMember = MyFileColl.Get("fb");
fb.PostedFile.SaveAs(("C:\\temp\\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.SaveAs(("192.168.6.2\\temp\\test.wav " ));
but got error.

how should I modify my code?

Thanks for your kind advice, David.

Nov 17 '05 #1
1 1589
Hi,

AFAIK the asp.net user is not allowed to access the network,
also instead of using SaveAs(("192.168.6.2\\temp\\test.wav" ));
which is incorrect , why don't use "Z" : .SaveAs(("z:\\temp\\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" <da*********@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
Hi, I have a question.
I upload file from client to server by asp.net,
this is my code:

protected System.Web.UI.HtmlControls.HtmlInputFile fb;

HttpFileCollection MyFileColl = Request.Files;
HttpPostedFile MyPostedMember = MyFileColl.Get("fb");
fb.PostedFile.SaveAs(("C:\\temp\\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.SaveAs(("192.168.6.2\\temp\\test.wav " ));
but got error.

how should I modify my code?

Thanks for your kind advice, David.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
1949
by: Todd Denlinger | last post by:
Ok, I know how to upload a file in asp.net using the <input type="file" runat="server"> control. What I don't know how to do is monitor the progress of the upload so that I can show the...
7
3165
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
10
2517
by: jonathan184 | last post by:
Hi I am tryin to validate certian types of files to be uploaded and file size and if this follows this correctly then insert in db this is the code i did so far. So far I commented out the parts...
4
2911
cassbiz
by: cassbiz | last post by:
Could use some help here. This script is carrying over an image just fine but the text isn't coming over. can you see why it is not working???? from the form I want to carry over two lines of...
6
4882
by: =?Utf-8?B?U2NvdHQgVHJpY2s=?= | last post by:
I followed the instructions from MSDN for Webclient UploadFile and I get an error: Could not find file 'C:\testfile.xls'. If I add the file (c:\testfile.xls) to the server I do not get the error...
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.