473,651 Members | 2,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Download from Web Folder Fails Based on File Type

(also posted under webdevelopment-inetserver-iis newsgroup, not sure which is
most appropriate)

We have a Windows Forms app that has been successfully running for several
months. Part of the app checks for certain file updates from a web folder at
login time and downloads any component updates that are needed. There are
about 15 files of different types that could be downloaded, including .rtf,
..ppt, .xls, .exe and .mdb extensions.

Now they are making us migrate to a new box with a new address. Only change
I should have to make is the pointer to the web address of the server-based
file. File names themselves have not changed.

Now when the code runs to check for updates and download needed components
from the new location, the program properly identifies which pieces are
needed, but some of the downloads fail with Error (400) Bad Request, while
others succeed as they used to. What I have been able to determine is that
the .exe, .mdb, and .rtf files are downloading successfully, while the .xls
and .ppt files are generating the error.

Following is the VB.NET code that executes the individual downloads
(successfully on the old box, only partially successfully on the new box):

Dim RequestAnnounce ments As System.Net.Http WebRequest =
CType(System.Ne t.WebRequest.Cr eate(cRow.Item( "ItemServerLoca tion") &
cRow.Item("Item ServerFileName" )), System.Net.Http WebRequest)
Dim myCacheAnnounce ments As New System.Net.Cred entialCache
myCacheAnnounce ments.Add(New
Uri("https://our.authenticat ionservernamego eshere.com/"), "Basic", New
System.Net.Netw orkCredential(s trUserID, strUserPassword ))
RequestAnnounce ments.Credentia ls = myCacheAnnounce ments
RequestAnnounce ments.CookieCon tainer = New System.Net.Cook ieContainer
httpresponse = RequestAnnounce ments.GetRespon se()

When this last stmt executes is when the error is thrown (within a Try-Catch
block).

Any idea why some of the files, all from the same folder, are successfully
downloaded while others generate the error?

Thanks for your support!
Nov 23 '05 #1
3 1786
Hello,

You may download the file diretly in IE to see if would work. If it still
didn't work, you can check if there is any configration on the IIS has been
changed and block the download.

Since this group is for webservice. I suggest you may focus on the message
you post in IIS group. Hope youare luck to find someon can help you there.

Luke
Nov 23 '05 #2
Root cause was determined to be spaces in the file names, and not the
associated file type. Microsoft has posted this issue with fixes, and I'm
having our admins check that all patches applied to our old machine have been
applied to the new machine. Interim step of removing the spaces from the
file names has provided a work-around. Thanks!

"[MSFT]" wrote:
Hello,

You may download the file diretly in IE to see if would work. If it still
didn't work, you can check if there is any configration on the IIS has been
changed and block the download.

Since this group is for webservice. I suggest you may focus on the message
you post in IIS group. Hope youare luck to find someon can help you there

Nov 23 '05 #3
Thank you for the update. I am very glad to hear you had have a work around
for the problem.

Luke
Nov 23 '05 #4

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

Similar topics

1
4009
by: Andrew Durstewitz | last post by:
Hi! I am working on a peice of code that will allow a user to download a file located in the users folder. The file is NOT located inside the HTTP PUB so I need to use the FSO to stream it to them. For some reason the code finds the file but the download fails... ERROR: Internet Explorer cannot download downloadpdf.asp?code=OR1EC1 from mirror.***.com
8
6334
by: ad | last post by:
How can I download a file form Server to client?
2
6945
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
1
47440
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8807
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
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...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
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
7299
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...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.