Monthly Archives: February 2010

ArcGIS Server – Services in Browser

My first experiment with ArcGIS Server about a month ago consisted of creating a simple MXD project in ArcMap and turning that into a service using ArcGIS Server Manager. I was then able to display my map in a browser (IE8) on another machine via LAN using the address http://myserver/arcgis/services.

I don’t know what happened. When I try the same now, all I get is:


After reading this thread here, I tried the following:


and got this result:

When I click on Project 1 (my original MXD converted to AGS service), I get to this screen:

And when I then select JSAPI, my map opens up in the browser. — Ok, I have a vague understanding of REST and SOAP, and this appears to be functioning properly (rather than malfunctioning). But why did something change and what? This post on REST vs. SOAP was interesting. I haVe to wonder whether at some point I accidentally changed some sort of setting somewhere because when I try:


I get a lot of XML gobbledeegook. So apparently, the browser is talking to AGS but just can’t display the map using that url. So what happened ? Anyone ?


Leave a comment

Filed under Uncategorized

Getting on with the ArcGIS/ C# Walkthroughs…

The other day, I wasted quite some time trying to follow the ESRI website walkthroughs for getting started with C#/.NET before figuring out I was working with the tutorial for a pre-9.3 version.

I’ve had more luck with the tutorial for 9.3. The other day I was still wondering where to paste my snippets. This time, picking up where I left off, I did not get a similar error. I like to think that I have learned enough C# to make more sense of the code and its structure (i.e. making sense of the bracelet jungle). (But I have to admit I printed out the entire code, and scribbled all over it in ink to really get it.)

The only error I got upon building my solution was:

Error 1: Cannot register assembly <<myproject.dll> – access denied. Please make sure you’re running the application as administrator. Access to the registry key ‘HKEY_CLASSES_ROOT\myproject.dll…. is denied.

This, it appears, has to do with UAC (User Account Control) in Windows 7 (and Vista). What you do is you turn UAC off. And then you run Visual Studio as Administrator (right click the VS icon in the start menu, and select “Run as Admin”).

After I did so, the solution was built without any problems, and I could add my custom button from the Walkthrough project in ArcMap.

1 Comment

Filed under Uncategorized

ArcGIS / .NET Central

I’ve said before that I find the ESRI website confusing and hard to navigate. Splitting all the online help up by versions (e.g. 9.1,9.2., and 9.3) might be comprehensive. But when you’re just looking for a point to start, it causes headaches. Heck, even for 9.3, there are wholly redundant sections of text, hyperlinking you down one-way vicious circles.

Sometimes though you get lucky. So if you’re looking for the one place with good examples for getting started with C# in ArcGIS, go straight to this page in the ArcGIS Resource Center for .NET.

Leave a comment

Filed under Uncategorized

C#/.NET (GIS) Programming – Iron Python

My quest with C# continues. I am going through the book, working out the examples using Visual Office Express 2008, and I have found no more major road blocks.

But I’ve also looked into Iron Python again. This, if you’re not familiar with it, is an Open-Source Python implementation for the .NET framework. If you’re already familiar with Python or like Open Source, you might be interested in this. One way to do so is by using Iron Python Studio, which uses the “core” of Visual Studio in either an isolated (standalone) mode or integrated mode. I did get it working in isolated mode originally but then also installed  Visual Studio for C# on the same machine, and that ended my Iron Python functionality. Trying the integrated mode, I ran into some Win SP1 issues, and got tired of it. Instead, I installed Eclipse with the PyDev plugin that you can use for Iron Python. Here is the PyDev installation guide for Eclipe, and here is a good link to get you started with Iron Python and ASP.NET.

It’s great to see all this “wild growth” of Open Source solutions all over the web. Oftentimes it’s almost overwhelming. Yet, when you run into problems, there’s usually someone who’s had the same problem and has started working on it…

Oh, and to take me back to ArcGIS, it’s blogs like this one, AnotherGISBlog, that help a lot more than the material on the ESRI pages. I don’t understand why there is not a good PDF document from ESRI Press that discusses the .NET/C#/ArcGIS subject. There is some information in Chapter 5, ArcGIS Developer Guide. I might have to come back to it once I have a working knowledge of .NET/C#. As was my experience with Python, familiarizing yourself with the language and simple ArcGIS related examples first, before reading the ESRI guide, i.e. Writing Geoprocessing Scripts with ArcGIS, was easier that starting with the ESRI PDF. I still wish someone would write the definite GIS Programming for ArcGIS manual.


Filed under Uncategorized

Recommended Reading: C# and OOP

I am enjoying Peter Wright’s Visual C# book (see last post). After having read a number of Python books, this is probably the most common sense approach to object oriented programming (classes, objects, methods etc.) yet. So much of C# seems very similar to Python, with a slightly more verbose (convoluted) syntax. But this book is very enjoyable and gives you a quick start with C#.

Leave a comment

Filed under Uncategorized

Help with Visual C# for ArcGIS !

If you’re relatively new to GIS programming like me, you’ll find that finding a good GIS Programming book or manual or online tutorial is nearly impossible. I am not a programmer by training and don’t have a CS degree. As a geologist, I’ve come to GIS from the geo-side. But I would like to pick up enough programming skills to make me a more productive and powerful GIS user/analyst. If that sounds like I want to do merely scripting, maybe so.

I’ve put in some time learning Python using a number of Python books, some better than others, and looking at some online help. But the books cover only Python, and the ArcGIS specific stuff online is very basic, gets your mouth-watering, and then leaves you to your own devices.

When it comes to development with C#, it’s even more difficult. I’ve only glanced at Visual Basic or VBA, and wasn’t encouraged to spend more time since ArcGIS 10 will be the last version to support VBA (and here). But at least there was lots of information on how to get started with VBA, e.g. BoxShapedWorld. With C#, I feel like I’m having to bridge the chasm between the easy-to-follow instruction for VBA and the resources directed at the hardcore-C# developer… hahaha. Well something like that.

I enjoyed the first few chapters of “C# Unleashed“. But when I picked it up again last night to find some help with my problem, I quickly got frustrated because I didn’t feel like part of the intended audience for this text. Fortunately, I also had a copy of Beginning Visual C# 2005 Express Edition. With this one, I felt like diving in. It takes more of a hands-on approach, rather than a let-me-tell-you-everything-and-then-some approach.

My first encounter with C# code was baffling. I decided to print out the code for the project and ended up with four pages! And all the curly braces take some getting used to. As someone who wants to start learning the language while starting to use existing snippets, it would sure help to know how the different parts of the program all work together. That’s exactly what chapters 1 and 2 of Beginning Visual C# 2005 Express Edition are all about. Hopefully this will be a gentler intro to the .NET/C# newbie although, of course, it lacks any reference to or help with ArcGIS.

The ESRI tutorial I started this week is not bad, but again, I didn’t feel like it was addressing my kind of audience – the person with no .NET background. One neat little tutorial can be found here – GIS Lab: Program in ArcGIS using the .NET framework and C#.  I just wish it had been 12 chapters instead of just this one.

I might have to try Geospatial Training’s course: Programming ArcObjects with .NET. The course sounds just like what I need. My only hesitation is that I didn’t enjoy their download for Geoprocessing with Python.


Filed under Uncategorized

“Microsoft’s Creative Destruction” – NYTimes

Here is an interesting article about innovation killing at Microsoft.

Leave a comment

Filed under Uncategorized