I am using a web grid that was crashing and I was wondering why the error
wasn't being logged. After some investigation I found it is throwing an
exception
System.ArgumentException was unhandled by user code
Message="'�', hexadecimal value 0x01, is an invalid character."
Source="System.Xml"
And the value of the string being written (I am using Infragistics
UltraWebGrid)
ChangedCells�UltraWebGrid1rc_9_1�zz�UltraWebGrid1rc_9_2�zz�ActiveCell�Ultra
WebGrid1rc_9_2
Died on [assembly: Elmah.Scc("$Id: HttpValuesCollection.cs 25 2007-05-04
23:24:03Z azizatif $")] line 146
writer.WriteEndElement();
---------------------------------------------------------------------------
Exception Details
System.ArgumentException was unhandled by user code
Message="'�', hexadecimal value 0x01, is an invalid character."
Source="System.Xml"
StackTrace:
at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch,
Char* pDst, Boolean entitize)
at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char*
pSrc, Char* pSrcEnd)
at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text)
at System.Xml.XmlWellFormedWriter.WriteString(String text)
at System.Xml.XmlWriter.WriteAttributeString(String localName,
String value)
at Elmah.HttpValuesCollection.Elmah.IXmlExportable.ToXml(XmlWriter
writer)
at Elmah.Error.WriteCollection(XmlWriter writer, String name,
NameValueCollection collection)
at Elmah.Error.WriteInnerXml(XmlWriter writer)
at Elmah.Error.ToXml(XmlWriter writer)
at Elmah.SqlErrorLog.Log(Error error)
at WebSettings.DataOperation.UpdateXmlByValueDescription(DataSet
ds, String xml) in e:\Userdata\sameera\Dev2.7
\App_Code\Settings\DataOperation.cs:line 433
at WebSettings.subLocationList.Update() in
e:\Userdata\sameera\Dev2.7\Settings\subLocationList.aspx.cs:line 480
at WebSettings.subLocationList.btnSave_Click(Object sender,
EventArgs e) in e:\Userdata\sameera\Dev2.7
\Settings\subLocationList.aspx.cs:line 113
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument)
at
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Ra
isePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
---------------------------------------------------------------------------
Call stack
[External Code]
Elmah.DLL!Elmah.HttpValuesCollection.Elmah.IXmlExportable.ToXml
(System.Xml.XmlWriter writer = {System.Xml.XmlWellFormedWriter}) Line 146
C#
> Elmah.DLL!Elmah.Error.WriteCollection(System.Xml.XmlWriter writer
= {System.Xml.XmlWellFormedWriter}, string name = "form",
System.Collections.Specialized.NameValueCollection collection =
{Elmah.HttpValuesCollection}) Line 488 C#
Elmah.DLL!Elmah.Error.WriteInnerXml(System.Xml.XmlWriter writer =
{System.Xml.XmlWellFormedWriter}) Line 475 + 0x11 bytes C#
Elmah.DLL!Elmah.Error.ToXml(System.Xml.XmlWriter writer =
{System.Xml.XmlWellFormedWriter}) Line 439 C#
Elmah.DLL!Elmah.SqlErrorLog.Log(Elmah.Error error = {Access to the
path 'E:\Userdata\sameera\Dev2.7\Configuration\LocationList.xml' is
denied.}) Line 170 C#
App_SubCode_Settings.ebplpfnq.dll!
WebSettings.DataOperation.UpdateXmlByValueDescription(System.Data.DataSet
ds = {System.Data.DataSet}, string xml = "LocationList.xml") Line 433 +
0x30 bytes C#
App_Web_xvi5k5qk.dll!WebSettings.subLocationList.Update() Line 480
+ 0x12 bytes C#
App_Web_xvi5k5qk.dll!WebSettings.subLocationList.btnSave_Click
(object sender = {Text = "<img src='../Common/images/icon_save.gif'
border=\"0\">Save "}, System.EventArgs e = {System.EventArgs}) Line 113 +
0x7 bytes C#
[External Code]