laptop and a wrench

Bug

Getting an 'Access Denied' error when trying to use SaveToString function.

Last Published: August 25, 2014 ArcGIS Server (.NET)
Bug ID Number NIM055634
SubmittedMarch 23, 2010
Last ModifiedJune 5, 2024
Applies toArcGIS Server (.NET)
Version found9.3.1
Program languageC#
StatusKnown Limit

Additional Information

10.1 was the last release of the .NET WebADF technology. Client APIs (JavaScript/Flex/Silverlight) are recommended for web application development.

Workaround

Copy the geometry object to a new geometry object.Use the following code: public string SerializeGeometry(IGeometry geom) { XMLSerializer xs = new XMLSerializer(); string xString; IPointCollection oldpnts = (IPointCollection)geom; IPointCollection newpnts = new PolygonClass(); for (int i = 0; i < (oldpnts.PointCount-1); i++ ) { object beforeObject = (System.Object)System.Reflection.Missing.Value; object afterObject = (System.Object)System.Reflection.Missing.Value; IPoint pnt = oldpnts.get_Point(i); newpnts.AddPoint(pnt, ref beforeObject, ref afterObject); } //Converting to XML xString = xs.SaveToString(newpnts, null, null); return xString; }

Steps to Reproduce

Bug ID: NIM055634

Software:

  • ArcGIS Server (.NET)

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options