473,671 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Downloading .exes with WebClient.Downl oadFile

I'm having a problem using the System.Net.WebC lient to download .exes from a web server. I'm testing everything on localhost, and the same code works fine with all other types of file. I even tried renaming the .exe extension of the file in question to .exe2, and that worked! Is there a security setting that doesn't let me download executables (the only error message I get is a timeout)? If so, is there a way to override it... I'm making a tool to update my software product over the Internet, and being able to download .exes is essential

Any suggestions, please?
Nov 22 '05 #1
18 4580
Hi James,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 22 '05 #2
Hi James,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 22 '05 #3
Hello,

Thanks for your post. As I understand, the problem you are facing is it
fails to download .exe fils by using WebClient. Please correct me if there
is any misunderstandin g. I think more information is needed before moving
forward:

1. Could you download the file in Internet Explorer?

2. What's the error/exception message do you receive when it fails to
download?

3. Do you connect the Web Server via proxy?

I look forward to your reply. Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #4
Hello,

Thanks for your post. As I understand, the problem you are facing is it
fails to download .exe fils by using WebClient. Please correct me if there
is any misunderstandin g. I think more information is needed before moving
forward:

1. Could you download the file in Internet Explorer?

2. What's the error/exception message do you receive when it fails to
download?

3. Do you connect the Web Server via proxy?

I look forward to your reply. Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #5
Check to see if the server allows you to download exe types. It may be
blocking downloads of executables.

"James" <ja*********@ne wsgroups.nospam > wrote in message
news:7F******** *************** ***********@mic rosoft.com...
I'm having a problem using the System.Net.WebC lient to download .exes from a web server. I'm testing everything on localhost, and the same code works
fine with all other types of file. I even tried renaming the .exe extension
of the file in question to .exe2, and that worked! Is there a security
setting that doesn't let me download executables (the only error message I
get is a timeout)? If so, is there a way to override it... I'm making a tool
to update my software product over the Internet, and being able to download
..exes is essential!
Any suggestions, please?

Nov 22 '05 #6
Check to see if the server allows you to download exe types. It may be
blocking downloads of executables.

"James" <ja*********@ne wsgroups.nospam > wrote in message
news:7F******** *************** ***********@mic rosoft.com...
I'm having a problem using the System.Net.WebC lient to download .exes from a web server. I'm testing everything on localhost, and the same code works
fine with all other types of file. I even tried renaming the .exe extension
of the file in question to .exe2, and that worked! Is there a security
setting that doesn't let me download executables (the only error message I
get is a timeout)? If so, is there a way to override it... I'm making a tool
to update my software product over the Internet, and being able to download
..exes is essential!
Any suggestions, please?

Nov 22 '05 #7
Thanks for your help... in response to your queries

1) No, I couldn't download the file in Internet Explorer. The progress bar at the bottom-right moved extremely slowly, and finally an error page showed: "CGI Timeout: The specified CGI application exceeded the allowed time for processing. The server has deleted the process". For all other files, there was no problem. It can't be file size either, as the .exe is only 340kb, and as I said renaming the extension works fine

2) When it fails to download and error handling is disabled, I receive a "timeout" message, after a long time in which the program does not respond

3) I don't really know what proxy is, I'm afraid! I am connecting through a wireless network in my home, which I set up myself and has no security features that I know of. I've checked through the IE security settings, and have found no applicable restrictions

Hope this helps..

James.
Nov 22 '05 #8
Thanks for your help... in response to your queries

1) No, I couldn't download the file in Internet Explorer. The progress bar at the bottom-right moved extremely slowly, and finally an error page showed: "CGI Timeout: The specified CGI application exceeded the allowed time for processing. The server has deleted the process". For all other files, there was no problem. It can't be file size either, as the .exe is only 340kb, and as I said renaming the extension works fine

2) When it fails to download and error handling is disabled, I receive a "timeout" message, after a long time in which the program does not respond

3) I don't really know what proxy is, I'm afraid! I am connecting through a wireless network in my home, which I set up myself and has no security features that I know of. I've checked through the IE security settings, and have found no applicable restrictions

Hope this helps..

James.
Nov 22 '05 #9
And I've just found something else! Every time I try to download the file, either in Internet Explorer or my program, it starts (and does not close) a new process which is visible in the Task Manager. This process has the same name as my file ("TMI Management.exe" ). If I close this process before the usual timeout error occurs, I receive the following error: "CGI Error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: [blank]". It occurred to me that the computer may be trying to run, rather than download, the file. But I can't download notepad.exe either, so it's not specifically my application

Please advise

James.
Nov 22 '05 #10

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

Similar topics

1
326
by: James | last post by:
I'm having a problem using the System.Net.WebClient to download .exes from a web server. I'm testing everything on localhost, and the same code works fine with all other types of file. I even tried renaming the .exe extension of the file in question to .exe2, and that worked! Is there a security setting that doesn't let me download executables (the only error message I get is a timeout)? If so, is there a way to override it... I'm making a tool...
4
1258
by: Dino Buljubasic | last post by:
How can I download an image from a web server provided I have the url of image (i.e. http://mypictures.com/pics/picture01.jpg) ? Thank you
8
9009
by: DEWright_CA | last post by:
Why does WebClient.DownloadFile loose my completed path? Ok, I have a function in my app then when my button is clicked it checks to see if the files come from a local drive or a http address. The portion of the code that pulls from the drive works great, but when the http address is active it changes the originating path to my C:\Windows\System32 folder instead of the proper path. I keep the path as a field on my form so I am certain...
1
4972
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=test.pdf");
5
1684
by: roland.groenvynck | last post by:
I try to build my first web form application with C#. I want to program the downloading of a file to the client . Therefore I can use WebClient.DownloadFile (url, filepath ); I would like that the user is able to select the directory(on his machine) with a kind of a control ? How can I do that? many thanks for helping me
1
6288
by: vin.dor | last post by:
Dear All, I am using WebClient in my Visual Studio .Net 2003 project to download an image from the Internet. The following is my function: C# Code: public static bool downloadFile(string URL, ref string fileName) { bool result = true;
1
1683
by: apondu | last post by:
Hi, I am new to web services and i am facing a problem. I am interested in downloading some file from internet and use it for furthur processing For eg. i have a file at a the following URL and i want to download that file in the web service which i am coding and use it for furthur. In normal window application i can achieve this by the following code
1
1520
by: apondu | last post by:
Hi, I am new to web services and i am facing a problem. I am interested in downloading some file from internet and use it for furthur processing For eg. i have a file at a the following URL and i want to download that file in the web service which i am coding and use it for furthur. In normal window application i can achieve this by the following code
8
9515
by: =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post by:
WebClient.DownloadFile I am using the WebClient.DownloadFile function to download a file from server to a local client. When I execute the below code, file is created in server and not in client. What am I doing wrong?
1
1342
by: manjuk | last post by:
Hello Problem: I need to download files from an FTP site while moving very fast. I expect connection problems during downloads. If a file is half downloaded and there is a connection glitch, then the file needs to be downloaded fully once again. Likewise, different actions have to be taken based on the error. How to handle error cases using WebClient.DownloadFile? Or are there any other better APIs? --- sample code --- WebClient...
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7437
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6229
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4225
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.