I am creating a file uploader tool to upload a file to a file server using HTTP POST. My tool is running on IIS web server and my file server is another IIS server. Now I am browsing a file using the uploader and temporarily storing on my IIS machine [where
the application runs ] and from there I am posting to the File Server.
Is there any way that I can directly POST the file from any machine to File Server, without storing it in my IIS[application] server.
I want to use a web tool only. No console, form...
I am able to save like this, But my Fileserver is not a network share. It is a remote IP , in internet. I just have a script running on there to receive the POST and write the file into file server.
I am able to save like this, But my Fileserver is not a network share. It is a remote IP , in internet. I just have a script running on there to receive the POST and write the file into file server.
oh.. in that case, u should use WebClient class's uploadfile method
Optimus13
Member
1 Points
7 Posts
File upload using HTTP POST to upload local file.
Jan 04, 2013 04:03 AM|LINK
Hi.
I am creating a file uploader tool to upload a file to a file server using HTTP POST. My tool is running on IIS web server and my file server is another IIS server. Now I am browsing a file using the uploader and temporarily storing on my IIS machine [where the application runs ] and from there I am posting to the File Server.
Is there any way that I can directly POST the file from any machine to File Server, without storing it in my IIS[application] server.
I want to use a web tool only. No console, form...
thanks in advance..
kedarrkulkar...
All-Star
34023 Points
5468 Posts
Re: File upload using HTTP POST to upload local file.
Jan 04, 2013 05:30 AM|LINK
from file upload control, u can directly store the file on to the remote server (file server)
FileUpload1.SaveAs("\\remoteServerName\FolderName\" + filename);
however, u need to make sure that current user running the web site in iss (aspnet_wp) has the access permission on remote file server
refer this to understand the access tweak
http://aspalliance.com/336_Upload_Files_Using_ASPNET_Impersonation_and_UNC_Share.all
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
Optimus13
Member
1 Points
7 Posts
Re: File upload using HTTP POST to upload local file.
Jan 04, 2013 09:18 AM|LINK
Hi KK, Thanks for ur time..
I am able to save like this, But my Fileserver is not a network share. It is a remote IP , in internet. I just have a script running on there to receive the POST and write the file into file server.
Hope u got the situation,.
kedarrkulkar...
All-Star
34023 Points
5468 Posts
Re: File upload using HTTP POST to upload local file.
Jan 04, 2013 06:42 PM|LINK
oh.. in that case, u should use WebClient class's uploadfile method
http://msdn.microsoft.com/en-us/library/36s52zhs.aspx
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site