Showing posts with label ESRI. Show all posts
Showing posts with label ESRI. Show all posts

Sunday, December 21, 2008

Control "CONTROL_NAME" or type "CONTROL_TYPE" must be placed inside a form tag with runat=server

today morning i was migrating an Arcgis server application from 9.2 to 9.3 where i had some custom made tools in the toolbar, one of the tools is rebinding a gridview control and refreshing it. but i was getting a strange following message Control "FPLegend_CGresults" or type "Gridview" must be placed inside a form tag with runat=server.



the first moment i thought that esri changed the way we do callbacks but google a bit i found out the solution but im not convinced with the error since i have my control within a form tag with runat=server.

still invistigating into it but here is how you can fix the problem:

in you default.aspx <@ page..> add the following attribute EnableEventValidation="false"

in your default.aspx.cs override the following VerifyRenderingInServerForm() function like this

public override void VerifyRenderingInServerForm(Control control)
{
//base.VerifyRenderingInServerForm(control);
//
}


hope this helps others

Wednesday, December 17, 2008

Features Disappear after a specific scale ??

here comes the ESRI fun, i have a published which has some invisible layers, at runtime im changing the definition query on different layers, everything works fine but i have noticed yesterday that when i zoom in, the features disappear, BUT not everywhere, in some two areas only.

im still investigating the problem, but still with no luck.

i'll updating on this issue.

UPDATE:

tried all the possibilities with no luck so what i though i would do is to create a new mxd with the same layers and it worked after that. so remember, when you find illogical reason solve it in the illogical way ;)

Friday, December 12, 2008

ESRI StreetMap Mobile (ArcLogistics Navigator) on a Pocket PC 2003

Last August, i have developed a a navigation application with routing functionality but it was made to run on a ruggedized (xplore) pc with windows xp tablet edition. a couple o days a ago, i got a pocket pc 2003 so i thought i would try to migrate my application to run on the pocket pc, well during the migration, i faced many problem,

  1. you need to register smmobile.dll on the device.
  2. picturebox.CreateGraphics() function doesn't work on the .NET CF.
  3. you need to migrate ur all ur custome made controls and dlls to work with the device.
  4. IMapDocument.GetRouter() returns an Exception "Unable to obtain server's security context" with ErrorCode: -2147220991
many are in the way i pretty sure, i will reporting back with the solutions once im done, but its not a pleasent experience at all since that StreetMap Mobile is not anymore included in the EDN and its now is included in the special services & the samples are in C# windows applications.

wish me luck

UPDATE:

You need to register smmobile.dll on the device:
for this, actually it was not straight forward, i had to experiment and brain storm, first of all, SM help doesn't show show anything about programming on mobile devices and all the examples are done for VB.NET, to register a smmobile.dll com, you need the regsvrce.exe which is made for mobile devices, you just need to upload it to the device and and run it from the device and it will ask you for the full path of the dll you want to register.

the second part of this process is the smmobile.dll, well the one which you find in the C:\Program Files\StreetMapMobile\bin when install it doesn't register, and it shows an error "LoadLibrary [filepath] failed GetLastError Returns c1" well, digging more into this i found out that the dll is not compiled for mobile devices and you need to re-compile the dll for a mobile device ?? ehmm ehmm, there is now way to get that unless you get the source ?? right !!. i started looking around and i found the installation for the ESRI Navigator sample but that was C:\Program Files\StreetMapMobile\SampleApps\WM5_PocketPC\ESRINavigator.CAB, i extracted it and i was searching in the files and i saw a file named like this "smmobile.058" so i thought that this is for sure the file, i changed its extension to .dll and uploaded it to the device and BANG, it registered. here are the links for regsvrce.exe and smmobile.dll


picturebox.CreateGraphics() function doesn't work on the .NET CF:

the Control.CreateGraphics() is supported in .NET CF 3.5 only and any version prior to that, need to override the paint method of the control, look at this discussion here.

you need to migrate ur all ur custome made controls and dlls to work with the device.

if you have developed a class library or a control library, you need to redevelop the same for the same device in order to work with your project, and believe me, it is not the same ?? you will amazed that many functions are not available in the CF where you have to find workaround for example, i had a panel with double buffering enabled usercontrol, and now i can't enable double buffering anymore !!

Thursday, December 11, 2008

"SERVICE_NAME.MapServer.cfg could not be started" Error Message

last week, we have a kind of distributed installation of a ArcGIS Server 9.3, one SOM and a SOC on another machine, no load balance or anything else, the installation was very smooth,

the SOC machine was intstalled and added to as a host to the SOM and it was publishing like a charm, then we thought of adding the a local SOC to the server, and then the fun started !!

after adding the Local SOC we are getting this message "SERVICE_NAME.MapServer.cfg could not be started" message made us feel really happy, solving this prblems took nearly 1.5 days experimneting and re-installation but WE "FORGOT" to take a look at the log.

the next day early in the morning, i took a look at the log and it was something silly,

when you install a SOC only on a standalone machine, it doesn't create "arcgisserver" that has the "arcgiscache" , "arcgisoutput" , and "arcgisjobs" and i really dunno why, it should create all this by it self and set the permissions

we created these things manually and everyhing worked after that, well i hope that this might be usefull to everyone else, something to note that if you ever get this message then the folder might be there but with a permission set to ArcGISSOC local account.

i hope it helps others

Wednesday, December 10, 2008

"Cannot open map cache" A Good Start

yesterday night, 4 hours trying to deploy a very simple ArcGIS Mobile application on my Pocket PC 2003 but with no luck, the path of the cache is right and specified in the mapcache "storage" well, i found out that im not the only one who is in this trouble,

http://forums.esri.com/Thread.asp?c=206&f=2274&t=231067
http://forums.esri.com/Thread.asp?c=206&f=2295&t=218141
http://forums.esri.com/Thread.asp?c=206&f=2274&t=256129
http://forums.esri.com/Thread.asp?c=206&f=2295&t=223604

the strange thing is that when you debug the application, it works well and you get the cache like a charm, but when i deploy the application through a .CAB created through "Smart Device CAB Project" i get the lovely "Cannot open map cache". im investigating more into this and i will report back.