Layer.OnInitializationFailed - Protocol Violation WebException

2991
1
Jump to solution
06-27-2013 08:02 AM
Labels (1)
BrianRassier
Occasional Contributor
When using secure ArcGIS Online services, we've been noticing seemingly random cases where the layer initialization fails due to a WebException, noting that "the server committed a protocol violation".  It's not terribly frequent (about 1 out of 20 times) - and it doesn't happen outside of secure ArcGIS Online services.  Has anyone else seen this?  The unhandled exception is below:

System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine    at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e)    at ESRI.ArcGIS.Client.Layer.Initialize()    at ESRI.ArcGIS.Client.FeatureLayer.<Initialize>b__6c(FeatureLayerInfo layerinfo, Exception error)    at ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo.<>c__DisplayClass2.<Get>b__1(Object a, RequestEventArgs b)    at ESRI.ArcGIS.Client.WebRequest.OnComplete(RequestEventArgs args)    at ESRI.ArcGIS.Client.WebRequest.downloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e, Action retryCallback)    at ESRI.ArcGIS.Client.WebRequest.<>c__DisplayClass1d.<BuildClient>b__1b(Object s, DownloadStringCompletedEventArgs e)
0 Kudos
1 Solution

Accepted Solutions
BrianRassier
Occasional Contributor
We found a work-around on this issue.  We had a couple layers that didn't handle the InitializationFailed event.  Once we added a simple event handler, the issue seemed to go away.

View solution in original post

0 Kudos
1 Reply
BrianRassier
Occasional Contributor
We found a work-around on this issue.  We had a couple layers that didn't handle the InitializationFailed event.  Once we added a simple event handler, the issue seemed to go away.
0 Kudos