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 / January 2006

Tip: Looking for answers? Try searching our database.

HTTP/ASMX Message Receive Failure: System.Xml.XmlException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vecozo@online.nospam - 03 Jan 2006 19:50 GMT
Hi,

Quite frequently we receive the error below in our event logs. I have some
problem interpreting it. As I understand, one of our clients sends us an
errornous request.

Although this should result in an error send back to the client, I do not
see why this should result in an unhandled(?) exception. This leads me to
believe that the underlying error is more problematic. Would anyone be able
to shed some light on this message?

Regards,
Martijn Kaag

Signature

______________________________
www.VECOZO.nl

Event Type:    Error
Event Source:    Microsoft WSE 2.0
Event Category:    None
Event ID:    0
Date:        3-1-2006
Time:        17:20:55
User:        N/A
Computer:    WBS_SERVER03
Description:
HTTP/ASMX Message Receive Failure: System.Xml.XmlException: There is an
invalid character in the given encoding. Line 12, position 147.
  at System.Xml.XmlScanner.GetChars(Byte[] srcBuffer, Int32& srcOffset,
Int32 srcLen, Char[] destBuffer, Int32 destOffset, Boolean zeroedOut)
  at System.Xml.XmlScanner.Read()
  at System.Xml.XmlScanner.ScanContent()
  at System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()
  at System.Xml.XmlTextReader.Read()
  at Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read()
  at System.Xml.XmlLoader.LoadCurrentNode()
  at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
  at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace)
  at System.Xml.XmlDocument.Load(XmlReader reader)
  at Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
  at
Microsoft.Web.Services2.Messaging.SoapPlainFormatter.Microsoft.Web.Services2.Messaging.ISoapFormatter.Deserialize(Stream stream)
  at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Steven Cheng[MSFT] - 04 Jan 2006 06:50 GMT
Hi Martijn,

Welcome to MSDN newsgroup.
From your description, you're encountering some XmlException when running
an ASP.NET webservice.  Based on the exception message and call stack you
provided, seems there has been something incorrect with the string
characters in the webservice request message...  

Is the problem always occuring when calling a particular webmethod in the
service, also is this webmethod take some string parameters?  If so, I'd
suggest you try simplified the webmethod and test with some static string
values to see whether you can reproduce the problem, if so you can post the
method to us so that we can also perform some test locally...   Based on my
experience, such problem is likely due to some certain unencoded content
passed through webservice string parameter ....

If there're anything I didn't get or any other finding, please feel free to
post here.

Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
Thread-Topic: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
thread-index: AcYQnuO0FK/AiBpVSHKGqhCa7uDM+g==
X-WBNR-Posting-Host: 193.108.210.227
From: "=?Utf-8?B?dmVjb3pvQG9ubGluZS5ub3NwYW0=?=" <vecozo@online.nospam>
Subject: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
Date: Tue, 3 Jan 2006 11:50:03 -0800
Lines: 52
Message-ID: <0ED2195C-EBAC-4237-A018-30A4B7561E4D@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
    charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.webservices.enhancements:8026
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements

Hi,

Quite frequently we receive the error below in our event logs. I have some
problem interpreting it. As I understand, one of our clients sends us an
errornous request.

Although this should result in an error send back to the client, I do not
see why this should result in an unhandled(?) exception. This leads me to
believe that the underlying error is more problematic. Would anyone be able
to shed some light on this message?

Regards,
Martijn Kaag

Signature

______________________________
www.VECOZO.nl

Event Type:    Error
Event Source:    Microsoft WSE 2.0
Event Category:    None
Event ID:    0
Date:        3-1-2006
Time:        17:20:55
User:        N/A
Computer:    WBS_SERVER03
Description:
HTTP/ASMX Message Receive Failure: System.Xml.XmlException: There is an
invalid character in the given encoding. Line 12, position 147.
  at System.Xml.XmlScanner.GetChars(Byte[] srcBuffer, Int32& srcOffset,
Int32 srcLen, Char[] destBuffer, Int32 destOffset, Boolean zeroedOut)
  at System.Xml.XmlScanner.Read()
  at System.Xml.XmlScanner.ScanContent()
  at System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()
  at System.Xml.XmlTextReader.Read()
  at Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read()
  at System.Xml.XmlLoader.LoadCurrentNode()
  at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
  at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace)
  at System.Xml.XmlDocument.Load(XmlReader reader)
  at Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
  at
Microsoft.Web.Services2.Messaging.SoapPlainFormatter.Microsoft.Web.Services2
.Messaging.ISoapFormatter.Deserialize(Stream stream)
  at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
verMessage message)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

vecozo@online.nospam - 04 Jan 2006 11:02 GMT
Hi Steven,

The error actually occurs in a production environment where we expose 5
different webservices (about 50 methods) and call dozens of external
webservices. In most cases it seems to work fine: if it would fail always for
one service we would see thousands of errors a day; not around 25.

From the stack trace it is not clear which of our webservices causes the
problem. Moreover, the exception is not captured in one of our
Global.asax_OnError handlers so we cannot identify the method by looking at
the EventSource.

Any suggestions how to track down this issue?

Regards,
Martijn Kaag

______________________________
www.VECOZO.nl

> Hi Martijn,
>
[quoted text clipped - 62 lines]
> Regards,
> Martijn Kaag
Steven Cheng[MSFT] - 05 Jan 2006 05:54 GMT
Thanks for your response Martijin,

So this character parsing problem is also within one of those webservices
that suffering memory issue?  Seems the context is very complex ...  As for
global.asax, it is the targeting asp.net web page application rather than
asp.net webservice....   Webservcie's unhancled exceptions won't be
routered to it.  If we need to capture asp.net webservice exceptions in a
central handler, we can consider building a soapExtension to do the work:
(SoapExtension can be configured per application or per webmethod...)

££Exception Injection Using a Custom SOAP Extension
http://www.dotnetslackers.com/Web_Application/re-13644_Exception_Injection_U
sing_a_Custom_SOAP_Extension.aspx

Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
Thread-Topic: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
thread-index: AcYRHkp3OkvgcOZ2SeGBX4vnvGl5vA==
X-WBNR-Posting-Host: 84.117.15.17
From: "=?Utf-8?B?dmVjb3pvQG9ubGluZS5ub3NwYW0=?=" <vecozo@online.nospam>
References:  <0ED2195C-EBAC-4237-A018-30A4B7561E4D@microsoft.com>
<5ULk8sPEGHA.1236@TK2MSFTNGXA02.phx.gbl>
Subject: RE: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
Date: Wed, 4 Jan 2006 03:02:02 -0800
Lines: 134
Message-ID: <D6ED5F5D-CD7D-44AF-9CC2-7F4628E570F4@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
    charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.webservices.enhancements:8037
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements

Hi Steven,

The error actually occurs in a production environment where we expose 5
different webservices (about 50 methods) and call dozens of external
webservices. In most cases it seems to work fine: if it would fail always
for
one service we would see thousands of errors a day; not around 25.

From the stack trace it is not clear which of our webservices causes the
problem. Moreover, the exception is not captured in one of our
Global.asax_OnError handlers so we cannot identify the method by looking at
the EventSource.

Any suggestions how to track down this issue?

Regards,
Martijn Kaag

______________________________
www.VECOZO.nl

"Steven Cheng[MSFT]" wrote:

> Hi Martijn,
>
[quoted text clipped - 62 lines]
> Regards,
> Martijn Kaag

Microsoft.Web.Services2.Messaging.SoapPlainFormatter.Microsoft.Web.Services2
> .Messaging.ISoapFormatter.Deserialize(Stream stream)
>    at

Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
> verMessage message)
>
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp
vecozo@online.nospam - 05 Jan 2006 19:21 GMT
Hi Steven,

It is indeed a complex context and it is one that keep me awake for a while
now. (Thats why I refer to a global.asax in a webservice context.. :s)

We'll await the judgment of one of your college's who is hopefully looking
at the dumpfile as we speak.

Thanx for your detailed responses!

Martijn Kaag

______________________________
www.VECOZO.nl

> Thanks for your response Martijin,
>
[quoted text clipped - 156 lines]
> > For more information, see Help and Support Center at
> > http://go.microsoft.com/fwlink/events
Steven Cheng[MSFT] - 06 Jan 2006 01:58 GMT
Thanks for your followup.

Hope you'll soon get the issue figured out...

Anyway, please feel free to post here if there're anything else we can help.

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
Thread-Topic: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
thread-index: AcYSLSsfXJvc4G2/RAilCsTolqeOVA==
X-WBNR-Posting-Host: 193.108.210.227
From: "=?Utf-8?B?dmVjb3pvQG9ubGluZS5ub3NwYW0=?=" <vecozo@online.nospam>
References:  <0ED2195C-EBAC-4237-A018-30A4B7561E4D@microsoft.com>
<5ULk8sPEGHA.1236@TK2MSFTNGXA02.phx.gbl>
<D6ED5F5D-CD7D-44AF-9CC2-7F4628E570F4@microsoft.com>
<luJjSybEGHA.2660@TK2MSFTNGXA02.phx.gbl>
Subject: RE: HTTP/ASMX Message Receive Failure: System.Xml.XmlException
Date: Thu, 5 Jan 2006 11:21:03 -0800
Lines: 218
Message-ID: <0B352FE3-42BE-4286-893F-BFC5A7C70ACF@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
    charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.webservices.enhancements:8054
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements

Hi Steven,

It is indeed a complex context and it is one that keep me awake for a while
now. (Thats why I refer to a global.asax in a webservice context.. :s)

We'll await the judgment of one of your college's who is hopefully looking
at the dumpfile as we speak.

Thanx for your detailed responses!

Martijn Kaag

______________________________
www.VECOZO.nl

"Steven Cheng[MSFT]" wrote:

> Thanks for your response Martijin,
>
[quoted text clipped - 7 lines]
>
> ££Exception Injection Using a Custom SOAP Extension

http://www.dotnetslackers.com/Web_Application/re-13644_Exception_Injection_U
> sing_a_Custom_SOAP_Extension.aspx
>
[quoted text clipped - 132 lines]
> >    at Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
> >    at

Microsoft.Web.Services2.Messaging.SoapPlainFormatter.Microsoft.Web.Services2
> > .Messaging.ISoapFormatter.Deserialize(Stream stream)
> >    at

Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
> > verMessage message)
> >
> > For more information, see Help and Support Center at
> > http://go.microsoft.com/fwlink/events

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.