472,802 Members | 1,201 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

win2k3 sp1 causes System.Net.WebClient.OpenRead to throw WebExcept

Hi

I've installed win2k3 sp1 on a machine where an openRead on any given file
was previously working. After installation, I get a webException as follows...

..message "An exception occurred during a webclient request"
.._Hresult = "-2146233079"
.._COMPlusExceptionCode ="-532459699"

Sorry I don't have the whole error, but this seems to be the only pertinent
info it contained.

If I remove the service pack, the problem goes away.

The request doesn't show up in the IIS logs, nor is it seen by a http proxy
such as fiddler.

Is this something to do with the changed com+ security with sp1 ? and if so,
how would I turn this off ?

If there is a better place to post this question, then please let me know
where.

Thanks in advance for any help.

Nov 22 '05 #1
11 7041
Hi

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #2
Hi,

I would like to confirm if the Windows 2003 is working on the server or
client? Do you mean that the Service Pack 1 was applied to the server side,
so OpenRead from the client stopped working?

If so, is that reproed if you change to another server also with SP1
applied? It would be helpful if you can provide me with the whole call
stack here. Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #3
Hi Kevin

Sorry for the delay in getting back to you.

I have win2k3 on both server and client.
I have two servers where i see the problem. One with SP1 installed, and one
without.
The problem seems to be with the sp1 on the client. If the client has sp1
installed then the OpenRead produces the error. If you then uninstall sp1 on
the client, the problem goes away.

Hope this helps.

Thanks for helping with this issue.

"Kevin Yu [MSFT]" wrote:
Hi,

I would like to confirm if the Windows 2003 is working on the server or
client? Do you mean that the Service Pack 1 was applied to the server side,
so OpenRead from the client stopped working?

If so, is that reproed if you change to another server also with SP1
applied? It would be helpful if you can provide me with the whole call
stack here. Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #4
Hi,

Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us

http://support.microsoft.com/default...;OfferProPhone

If this is a product issue, they will assist you free of charge. Thanks for
your understanding.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #5
Hi again.

I think before i take this further, i'll create a little test app that does
nothing but an OpenRead on a file, and see if that app gets the same error
when run on a client PC with win2k3 and sp1.

If it works as expected, then the problem must be caused by some additional
'thing' that my real world app is doing that the simple test app isn't doing.

I'll post the results here anyway, just for the record.

"Kevin Yu [MSFT]" wrote:
Hi,

Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us

http://support.microsoft.com/default...;OfferProPhone

If this is a product issue, they will assist you free of charge. Thanks for
your understanding.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #6
Hi,

Yes, I agree with you. Please feel free to let me know, if your test code
works as expected. Then we can try to analyze the other parts of the code.
Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #7
OK, will do.

It may take me a day or two to get to it. :-(

I'll post the results here.

Thanks again for you help.
"Kevin Yu [MSFT]" wrote:
Hi,

Yes, I agree with you. Please feel free to let me know, if your test code
works as expected. Then we can try to analyze the other parts of the code.
Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #8
You're welcome, please post to this thread after a day or two, and I will
follow it up.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #9
Hello,

I'm writing a small mining application in c#, and it happens to me too. I
have XP SP2, with all the updates. WebClient throws an
ArgumentOutOfRangeException: non-negative number required and then complains
about parameter count in System.IO.FileStream.Write. It happens while using
WebClient.DownloadFile.

Any thoughts?
Nov 22 '05 #10
OK, I think I've gotten to the bottom of this issue.

I building myself a little test application.

using System;
using System.Net;
using System.IO;
namespace OpenReadTestApp
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
System.Net.WebClient webClient = new System.Net.WebClient();
string fullName = "http://10.2.5.210/Components/Config.Default.Xml";
Console.WriteLine( "fetching stream for : "+fullName);
Stream s = webClient.OpenRead(fullName);
Console.WriteLine( "OK" );
Console.ReadLine();

}
catch( Exception e )
{
Console.WriteLine( e );
Console.ReadLine();
}
}
}
}
This works fine when run from on a win2k3 client ( launching the app via
href ) with win2k3 sp1 or not, which i wasn't expecting.

My app was still throwing the following error, which suggested a problem
around configuration settings.

System.Net.WebException: An Exception occurred during a WebClient request.
--> System.NullReferenceException : Object reference not set to an instance
of an object.
at System.Configuration.DefaultConfigurationSystem..c tor()
at System.Configuration.ConfigurationSettings.EnsureC onfigurationSystem()
at System.Configuration.ConfigurationSettings.GetConf ig(Sring sectionName)
at System.Net.WebRequest.get_PrefixList()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.Openead(String address)
--- End of inner exception stack trace ---
at System.Net.WebClient.OpenRead(String address)
at Softix.Platform.Utils.Config.OpenRelativeFileName( String fileName)

Turns out, due to some problem earlier in development, we'd stopped using
the app config file, and had hit some problem with win2k boxes,
whereby we were getting an error with some service pack combinations if the
app.config file wasn't present.

The workaround had been to add the following line early in the application
startup.
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "");

We'd subsequently started to use the app.config file, and without noticeable
problem, even though we'd left the above line in the code.

Seems a win2k3 client, with sp1, throws an error when doing an open read if
you have set the app_config_file to "", whether you have an app.config file
present or not.

Without sp1, the app carries on regardless, without any noticeable impact,
though i wonder if its actually reading the app.config file correctly.
Note, we are only using the app.config file to set the codebase so that IIS
doesn't do excessive probing for .exe and app.config file in various
locations, which is a whole different story. I'll have to do more testing to
ascertain if things are working properly for all circumstances, but i think
that they will be now.

Anyway, problem solved. If i remove
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", ""); the application works
correctly from any win2k3 client
whether it has sp1 or not.

Thanks for your time.

"Kevin Yu [MSFT]" wrote:
You're welcome, please post to this thread after a day or two, and I will
follow it up.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #11
It was nice to hear that you have had the problem resolved.

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 22 '05 #12

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

Similar topics

5
by: Seymen Ertas | last post by:
Hi, I don't know if this is the correct place to post this but i am having a little problem with the OpenRead function of the WebClient. Below is the code i am trying to get it to work: ...
0
by: Helen Abell | last post by:
Hi, I am trying to use a .Net WebClient object to read data from a url, but I am getting the following error: System.Net.HttpWebRequest.CheckFinalStatus()...
0
by: JohnBatte | last post by:
I have an UpdateDownloader class I'm working on to download software updates from a file server and report download progress to the user interface. It all works quite well, but I wish I could resume...
0
by: michael | last post by:
So I have a fairly large VB.Net application, lots of objects, lots of yucky OLEDB code. One day I started converting some Singles to Decimals because I wanted to make some calculations as precise...
11
by: ptass | last post by:
Hi I've installed win2k3 sp1 on a machine where an openRead on any given file was previously working. After installation, I get a webException as follows... ..message "An exception occurred...
1
by: Tim Mulholland | last post by:
I have an application that uses an external C(?) Dll and it seems like after I make a specific call to that dll the application will crash at a random call to the dll in the future. It sometimes...
0
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two...
6
by: Able | last post by:
Dear friends I have some drawing commands in the Form1_paint event. It works pretty well. The drawing gets redrawn when the window is resized. It gets redrawn after I minizie the window and...
2
by: google | last post by:
I statically link the Synopsys Milkyway C-API library ("MDA") into my C++ application. When my C++ application throws an exception, it seg faults instead. The details of my environment are:...
0
by: Mike | last post by:
Hi, I have a collection object bound to a data grid, after I remove an item from the collection, the minute I click on the datagrid I get an error saying the specified argument was out of the...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.