Friday, June 25, 2004

These last days, I had a frustrating problem on a Windows Server 2003 with BizTalk Server 2004 installed.
I also had a asp.net web application which read an XML file.

In the web page, I have the following code :

private void Page_Load(object sender, System.EventArgs e)
{
  DataSet dsContexts;
  dsContexts = new DataSet();
  dsContexts.ReadXml("http://localhost/WebApplication1/Domains.xml");
}

The load of that XML file caused an exception to be raised and the following message appeared :

Specified argument was out of the range of valid values. Parameter name: The specified value must be greater than 0.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument
was out of the range of valid values. Parameter name: The specified value
must be greater than 0.

Source Error:

Line 21:       DataSet dsContexts;
Line 22:       dsContexts = new DataSet();
Line 23:       dsContexts.ReadXml("http://localhost/WebApplication1/Domains.xml");
Line 24:     }
Line 25:

[ArgumentOutOfRangeException: Specified argument was out of the range of
valid values.
Parameter name: The specified value must be greater than 0.]
   System.Net.ServicePoint.set_ConnectionLimit(Int32 value) +60
   System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +282
   System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +94
   System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type
ofObjectToReturn) +55
   System.Xml.XmlTextReader.CreateScanner() +384
   System.Xml.XmlTextReader.Init() +23
   System.Xml.XmlTextReader.Read() +530
   System.Xml.XmlReader.MoveToContent() +75
   System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving) +145
   System.Data.DataSet.ReadXml(String fileName) +63
   WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\\inetpub\\wwwroot\\webapplication1\\webform1.aspx.cs:23
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

This error occured only with BizTalk installed, so I posted a question in the microsoft.public.biztalk.general newsgroup. Very big thanks to Vladimir Tchalkov for his answer.

The final word of this story, is that the HotFix 831575 which was installed on the server is in cause. In fact, this hotfix is not recommended to be installed by Microsoft. But, it was installed through Windows Update !!!!!

I just uninstalled this hotfix and it is now working well. !

Some links :

http://support.microsoft.com/default.aspx?scid=kb;en-us;831575

http://www.dotnet247.com/247reference/msgs/51/255188.aspx