473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

System.Net differences

Greetings.

This problem has cropped up while I was writing a file uploader piece
to a much larger project.

The uploader compiles in both 1.1 and 2.0. In 2.0, the file will
successfully upload; in 1.1, I get a familiar error: "Unable to write
data to the transport connection."

Why would the uploader work in one version of .NET but not the other?
Somewhere along the line, implementation of System.Net.Connection has
been changed.

All my code does is create a new HttpWebRequest using
WebRequest.Create, assign the appropriate headers, open a file stream
to the file, then write the output of that stream to the input of the
HttpWebRequest.

Anyone have any resources on the topic?

Thanks,
Ross

Jul 1 '08 #1
4 1030
On Jul 1, 5:07*pm, Ross <rosshink...@gmail.comwrote:

<snip>
All my code does is create a new HttpWebRequest using
WebRequest.Create, assign the appropriate headers, open a file stream
to the file, then write the output of that stream to the input of the
HttpWebRequest.

Anyone have any resources on the topic?
I don't, but if you show us your code (preferably in the form of a
short but complete program that demonstrates the problem) we may well
be able to spot the bug.

Jon
Jul 1 '08 #2
On Jul 1, 11:33*am, "Jon Skeet [C# MVP]" <sk...@pobox.comwrote:
On Jul 1, 5:07*pm, Ross <rosshink...@gmail.comwrote:

<snip>
All my code does is create a new HttpWebRequest using
WebRequest.Create, assign the appropriate headers, open a file stream
to the file, then write the output of that stream to the input of the
HttpWebRequest.
Anyone have any resources on the topic?

I don't, but if you show us your code (preferably in the form of a
short but complete program that demonstrates the problem) we may well
be able to spot the bug.

Jon
I'm not sure it will matter... Apparently all of our locations have
the 2.0 framework and I can upgrade the entire project to 2.0... it's
still aggravating when our friends in Redmond do something without
documenting it (or at least making the change documentation hard to
find).

At any rate, I think I've found the original example that I've modeled
(read: shamelessly plagiarized) my work after:
http://www.c-sharpcorner.com/UploadF...otNetBugs.aspx

Thanks.
-Ross
Jul 1 '08 #3
Ross <ro*********@gmail.comwrote:
I'm not sure it will matter... Apparently all of our locations have
the 2.0 framework and I can upgrade the entire project to 2.0... it's
still aggravating when our friends in Redmond do something without
documenting it (or at least making the change documentation hard to
find).
Well, it could well be that your code previously worked but wasn't
guaranteed to, and they made a change which wouldn't affect anyone with
genuinely correct code. However, it's hard to say without seeing the
exact code.
At any rate, I think I've found the original example that I've modeled
(read: shamelessly plagiarized) my work after:
http://www.c-sharpcorner.com/UploadF.../DotNetBugs120
62005230632PM/DotNetBugs.aspx
Well, a short but complete example would still make life a lot simpler
- otherwise we don't know whether you introduced the bug, or what.

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon_skeet
C# in Depth: http://csharpindepth.com
Jul 1 '08 #4
On Jul 1, 2:18*pm, Jon Skeet [C# MVP] <sk...@pobox.comwrote:
Ross <rosshink...@gmail.comwrote:
I'm not sure it will matter... Apparently all of our locations have
the 2.0 framework and I can upgrade the entire project to 2.0... it's
still aggravating when our friends in Redmond do something without
documenting it (or at least making the change documentation hard to
find).

Well, it could well be that your code previously worked but wasn't
guaranteed to, and they made a change which wouldn't affect anyone with
genuinely correct code. However, it's hard to say without seeing the
exact code.
At any rate, I think I've found the original example that I've modeled
(read: shamelessly plagiarized) my work after:
http://www.c-sharpcorner.com/UploadF.../DotNetBugs120
62005230632PM/DotNetBugs.aspx

Well, a short but complete example would still make life a lot simpler
- otherwise we don't know whether you introduced the bug, or what.

--
Jon Skeet - <sk...@pobox.com>
Web site:http://www.pobox.com/~skeet*
Blog:http://www.msmvps.com/jon_skeet
C# in Depth:http://csharpindepth.com
You can download the complete snippet at that link, I'm fairly
certain.

The only things I modified were some return values - the project
expects the total number of bytes transferred back. (Our original
library, written in C++, used wininet to accomplish this, so I tried
to model the C# version a little more closely to that. I prefer my
code changes to be of minimal impact as far as method definitions
go.) I also tossed in some debug logging, just in case.

I'll put together a condensed example later today that exhibits the
same behavior. I didn't have the moment yesterday... at work, the
only guarantee I have is more work, and my internet at home has been
on the fritz.

-Ross

Jul 2 '08 #5

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

Similar topics

4
by: Pram | last post by:
I am curious why did Microsoft write System.DateTime as a structure instead of a class? Maybe for backward compatibilty with any existing old code? FYI, one of the differences between...
10
by: Frank | last post by:
Hi, I am hoping to find out the differences between the System.Net.Mail and System.Web.Mail. Can some nice folks post the differences; or some urls which show the differences? Great Thanks...
2
by: shaji | last post by:
HI can anyone explain me (or direct me to a link) the differences in the system libraries in .net 1.1 and .net 2.0? What are the differences in GAC and Rebase between these two versions? Thanks in...
2
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi Guys, I have a real serious problem that stoped me doing any progress in my project. in one of my webpages I have a wizard of more then 13 pages and in every page some Ajax controls,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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,...
0
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...

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.