Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Hello i have some questions and i hope if you could answer me please

1-can I connect to the GEOData server without using arcSDE? If yes what is the different classes Or interfaces I can use to extract my fields from the geodata

2-when I use any method from serverContext I always get an error and I don’t know why ,what I have to do to fix the problem .

private void cmdSolve_Click(object sender, System.EventArgs e) { this.Cursor = Cursors.WaitCursor;

        IServerContext serverContext = null;

            // Get ServerContext and NAServer
            serverContext = GetMapServerContext();
            INAServer naServer = GetNAServer(serverContext);

            // Get SolverParams
            INAServerSolverParams solverParams = naServer.GetSolverParameters(cboNALayers.Text) as INAServerSolverParams;

            // Set Solver params
            SetINASolverSettings(solverParams as INASolverSettings);
            SetServerSolverParams(solverParams as INAServerSolverParams, serverContext);

            // Load Locations
            LoadLocations(solverParams, serverContext);

            //Solve the Route
            INAServerSolverResults solverResults = null;
            solverResults = naServer.Solve(solverParams);

            //Get NAServer results in the tab controls
            OutputResults(solverParams, solverResults);
        catch (Exception exception)
            MessageBox.Show(exception.Message, "An error has occurred");

i have just arcgis server and visual studio 2008 c# thx for ur help :)

share|improve this question
what line do you get an error (exception) on and what is the message of the exception? –  Kirk Kuykendall May 18 '11 at 23:03
"Object reference not set to an instance of an object" –  hana hana May 19 '11 at 9:50
on which line? –  Kirk Kuykendall May 19 '11 at 13:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.