By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

How to download a file from Server to client local pc without user intervention?

P: n/a
Dear Friends,

How to download a file from server to client local pc without user
intervention ie without the save as popup window.

Can you give me step by step.

Thanks

Jul 19 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ashok,

That should be normally prevented by the securitiy options. It should be
impossible without any user intervention, if that user has not loaded any
special software from you that makes that possible (what is of course an
action).

I hope that this gives an idea,

Cor

"Ashok" <ml*****@gmail.comschreef in bericht
news:11**********************@m79g2000cwm.googlegr oups.com...
Dear Friends,

How to download a file from server to client local pc without user
intervention ie without the save as popup window.

Can you give me step by step.

Thanks

Jul 19 '06 #2

P: n/a
"Ashok" <ml*****@gmail.comwrote in news:1153278703.862556.155520
@m79g2000cwm.googlegroups.com:
How to download a file from server to client local pc without user
intervention ie without the save as popup window.
Is this through a VB app or ASP.NET app?
Jul 19 '06 #3

P: n/a
With VB.NET, I use two methods: You may use ftp connection or internal My.Computer.Network.UploadFile/DownloadFile commands...
Public Sub Upload()

''Upload file

'Dim ftp As FtpWebRequest

'ftp = FtpWebRequest.Create(Url & "/" & ReportFile)

'ftp.Method = WebRequestMethods.Ftp.UploadFile

'Dim sourceStream As New StreamReader(Application.StartupPath & "\" & ReportFile)

'Dim fileContent As String = sourceStream.ReadToEnd()

'sourceStream.Close()

'ftp.ContentLength = fileContent.Length

'Dim fileBytes() As Byte

'Dim encoding As New System.Text.ASCIIEncoding()

'fileBytes = encoding.GetBytes(fileContent)

'ftp.Credentials = New NetworkCredential(login, pass)

'Dim requestStream As Stream = ftp.GetRequestStream()

'requestStream.Write(fileBytes, 0, fileContent.Length)

'requestStream.Close()

'Dim response As FtpWebResponse = ftp.GetResponse()

'Console.WriteLine("Upload status: {0}", response.StatusDescription)

'response.Close()

''Delete file

'Dim ftp As FtpWebRequest = WebRequest.Create(Url & "/" & UserFile)

'ftp.Method = WebRequestMethods.Ftp.DeleteFile

'ftp.Credentials = New NetworkCredential(Login, Pass)

'Dim response As FtpWebResponse

'Try

' response = ftp.GetResponse

' Console.WriteLine("Delete status: {0}", response.StatusDescription)

' response.Close()

'Catch ex As Exception

' 'Console.WriteLine("Delete status: {0}", response.StatusDescription)

'End Try

'Exit Sub

Dim _Updated As Boolean = True

Try

'Url = "http://ftp.domain.com/folder/"

My.Computer.Network.UploadFile(Application.Startup Path & "\" & UserFile, Url & "/" & UserFile, Login, Pass, False, 30 * 1000, FileIO.UICancelOption.DoNothing)

Catch ex As Exception

_Updated = False

Debug.Print("UPLOAD USERFILE FAIL: " & UserFile)

End Try

End Sub

Jul 19 '06 #4

P: n/a
"Ashok" <ml*****@gmail.comschrieb:
How to download a file from server to client local pc without user
intervention ie without the save as popup window.
'WebClient.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jul 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.