Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

Download from Web Folder Fails Based on File Type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JDRaven - 04 May 2005 22:41 GMT
(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 RequestAnnouncements As System.Net.HttpWebRequest =
CType(System.Net.WebRequest.Create(cRow.Item("ItemServerLocation") &
cRow.Item("ItemServerFileName")), System.Net.HttpWebRequest)
Dim myCacheAnnouncements As New System.Net.CredentialCache
myCacheAnnouncements.Add(New
Uri("https://our.authenticationservernamegoeshere.com/"), "Basic", New
System.Net.NetworkCredential(strUserID, strUserPassword))
RequestAnnouncements.Credentials = myCacheAnnouncements
RequestAnnouncements.CookieContainer = New System.Net.CookieContainer
httpresponse = RequestAnnouncements.GetResponse()

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!
[MSFT] - 05 May 2005 03:13 GMT
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
JDRaven - 05 May 2005 07:28 GMT
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!

> Hello,
>
[quoted text clipped - 4 lines]
> 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
[MSFT] - 06 May 2005 02:48 GMT
Thank you for the update. I am very glad to hear you had have a work around
for the problem.

Luke

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.