Hey guys,I'm attempting to use a FeatureLayer with a proxy, and I'm having some problems. Currently, I'm using the 2.0 public beta API, and I think the issues I'm seeing might be related to a bug, or bugs, in the API code.If I specify that a FeatureLayer should use a proxy, like this:<esri:FeatureLayer ID="MyFeatureLayer"
DisableClientCaching="True"
Url="http://localhost/ArcGIS/rest/services/MyMapService/FeatureServer/0"
ProxyUrl="http://localhost/MySLApp/proxy.ashx"
Mode="OnDemand"
AutoSave="False"
Color="Blue"
OnDemandCacheSize="500"
OutFields="NAME,IDENTIFIER,DLVRY_ADD"
InitializationFailed="Layer_InitializationFailed"
Initialized="Layer_Initialized">
I will receive the following exception, that I can capture in the layer's InitializationFailed event:System.Net.WebException: The remote server returned an error: NotFound. --->
System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
I spent a little time poking around with Firebug, and found out the following:1) Things like tiled layers request the proxy page at http://localhost/MySLApp/proxy.ashx?<theUrlItWants>
The FeatureLayer, however, requests the proxy page at http://localhost/MySLApp/proxy.ashx<theUrlItWants>
during initialization - the key difference being the missing "?".2) Post-initialization, the FeatureLayer goes back to requesting the proxy page at http://localhost/MySLApp/proxy.ashx?<theUrlItWants>
The "?" is there where it should be - this time.3) The FeatureLayer, unlike other map services, won't let me use a relative path to the proxy page. If I try using a relative path (say, "../proxy.ashx") I receive an exception claiming the URI kind can't be determined. I'm forced to specify an absolute path, along with the protocol.It could very well be the case that this is resolved in the 2.0 RC API - but the download link appears broken, so I can't find out. As it stands right now, however, I can't think of any way to make this work. I could do something like use a proxy URL of http://localhost/MySLApp/proxy.ashx?
(adding the "?" to the end) - but that makes any of the requests that come after layer initialization bomb. (Which is what led me to believe that it's probably just a bug in the FeatureLayer's initialization - or something that occurs internally near the time of initialization, anyways.)Does anyone from ESRI have any information that could help in this situation?Thanks!Brooks