esrijay

Identity Manager

Discussion created by esrijay on Dec 26, 2012
Below is my layout.js.
I've added the identity manager and secured my feature service and I'm not getting prompted for creditials.  The feature services doesn't show or draw.  I'm at version 2.8.  If I flip over to 3.2 none of my layers draw in I.E version 9.0.8112 but they do in Mozilla.  Either way I don't see the login dialog for the sercured service.

Am I missing something?  Do I need to be at 3.2?  Does I.E. 9.0.8112 support 3.2?

THanks
J



           dojo.require("esri.map");
      dojo.require("esri.arcgis.utils");
      dojo.require("esri.IdentityManager");
      dojo.require("dijit.layout.TabContainer")
      dojo.require("esri.dijit.editing.Editor-all");
      dojo.require("esri.dijit.BasemapGallery");
      dojo.require("dijit.Tooltip");
      dojo.require("esri.dijit.Legend");
      dojo.require("dijit.form.CheckBox");
      dojo.require("esri.tasks.locator");
      dojo.require("dojo.number");
      dojo.require("dojox.grid.DataGrid"); //Find task - data table grid
      dojo.require("dojo.data.ItemFileReadStore"); //Find Task
      dojo.require("esri.tasks.find"); //find task
      dojo.require("esri.tasks.query"); //query task
      dojo.require("esri.SnappingManager");

    var map;
    var editorSettings;
    var map;
    var basemapGallery;
    var bingKey = 'AiTi9z8-SSO1SqTeqHIhX2FOOe41v74qv_NIuw4JBnoyWwmybvT5uaFt8HSzIvgN';
    var legendLayers = [];
    //for layer list
    var visible = [];
    var Baselayers;
    var mapLayers = [];  //array of layers in client map - for feature layers to map
    var locator;
    var findTask; //Find Task
    var findParams; //Find Task
    var grid; //Find Task
    var store; //Find Task
    var queryTask; //Query Task
    var query;  //Query Task

 
      function init() {
       
        dojo.connect(grid, "onRowClick", onRowClickHandler); //FIND TASK
       // dojo.connect(gridsup, "onRowClick", onRowClickHandler); //FIND TASK
//        
    //hide grid on startup
    esri.hide(dojo.byId("grid"));  //Grid for Signs
    esri.hide(dojo.byId("gridsup")); //Grid for supports
       
        //snapping is enabled for this sample - change the tooltip to reflect this
        esri.bundle.toolbars.draw.start = esri.bundle.toolbars.draw.start +  "<br/>Press <b>CTRL</b> to enable snapping";
        esri.bundle.toolbars.draw.addPoint = esri.bundle.toolbars.draw.addPoint +  "<br/>Press <b>CTRL</b> to enable snapping";
           
        //This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to  
        //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic
        //for details on setting up a proxy page.
        esri.config.defaults.io.proxyUrl = "/proxypage_net/proxy.ashx";

        //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications
        esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

        var extent = new esri.geometry.Extent({     
        "xmin": -13048964.9158736,
    "ymin": 3906979.12225891,
    "xmax": -13008585.9918137,
    "ymax": 3922872.31483902,
          "spatialReference": {
            "wkid": 102100
          }
        });
       
     
        map = new esri.Map("map", {
          extent: extent,
      logo:false
          
        });
        
        //Create Basemap Gallery
        createBasemapGallery();
        
        dojo.connect(map, "onLoad", function() {
          //resize the map when the browser resizes
        dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
        });
        
        
        dojo.connect(map, "onLayersAddResult", initEditing);
        
        
        //Add the topographic layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service    
         var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://myserver/ArcGIS/rest/services/Imagery_102100/MapServer");
         map.addLayer(basemap);

    
           
           Baselayers = new esri.layers.ArcGISDynamicMapServiceLayer
          ("http://myserver/ArcGIS/rest/services/BaseLayers_102100/MapServer",{"opacity":0.5});
         
        // legendLayers.push({layer:Baselayers,title:"Baselayers"});
         map.addLayer(Baselayers);
         
         legendLayers.push({layer:Baselayers,title:'Base Layers'});
               //for layer list
    if (Baselayers.loaded) {
          buildLayerList(Baselayers);
          
        }
        else {
          dojo.connect(Baselayers, "onLoad", buildLayerList);
        }
          //end code for layerlist                       
        
        
        
        var editSigns = new esri.layers.FeatureLayer("http://myserver/ArcGIS/rest/services/Signs/FeatureServer/0", {
          mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
          outFields: ["*"]     
        });
        
         mapLayers.push(editSigns);

       
               
         var editSignSupports = new esri.layers.FeatureLayer("http://myserver/ArcGIS/rest/services/Signs/FeatureServer/1", {
          mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
          outFields: ["*"]     
        });
        
        mapLayers.push(editSignSupports);
        legendLayers.push({layer:editSignSupports,title:'SignSupport'});
        
        legendLayers.push({layer:editSigns,title:'Signs'});
        

//############################Add for out of the box legend ######################///


   
        dojo.connect(map,'onLayersAddResult',function(results){
          var legend = new esri.dijit.Legend({
            map:map,
            layerInfos:legendLayers
          },"legendDiv");
          legend.startup();
        });
        
//############################end Add for out of the box legend ######################///                
                     
              
              
    map.addLayers([editSignSupports, editSigns]);
//        map.addLayers([operationsPointLayer, operationsPolygonLayer, operationsLineLayer]);
     
        
      //  dojo.byId("title") = test;//response.itemInfo.item.title;
       // dojo.byId("dataSource") = <p> Test </>;

    //locator = new esri.tasks.Locator("http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer");
      locator = new esri.tasks.Locator("http://myserver/ArcGIS/rest/services/AddressLoc102100/GeocodeServer");
        dojo.connect(locator, "onAddressToLocationsComplete", showResults);
       

      //  map.infoWindow.resize(200,125);
           
           
           //************************FIND TASK for SIGNS *********************************************
           
           //Create Find Task using the URL of the map service to search
        findTask = new esri.tasks.FindTask("http://myserver/ArcGIS/rest/services/Signs/MapServer/");
   // findTask = new esri.tasks.FindTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/TaxParcelQuery/MapServer/");
        //Create the find parameters
        findParams = new esri.tasks.FindParameters();
        findParams.returnGeometry = true;
        findParams.layerIds = [0];
       // findParams.searchFields = ["SIGNTYPE"];
      //    findParams.searchFields = ["OWNERNME1","OWNERNME2"];
        findParams.searchFields = ["DATEINST","SIGNCATEGORY","SIGNTYPE","DIRFACES","SUBSTRMAT","BACKGRDMAT","SIGNSIZE","SIGNMEMO","HEIGHT","SUPPORTID"];
        findParams.outSpatialReference = map.spatialReference;
        //*****************************FIND TASK *******************************************************************************
           
           
           
           
    //**************************Sign QUERY TASK ***************************************////
   // build query
        queryTask = new esri.tasks.QueryTask("http://myserver/ArcGIS/rest/services/Signs/MapServer/0");
        //dojo.connect(queryTask, "onComplete", showResults);

        //build query filter
        query = new esri.tasks.Query();
        query.returnGeometry = true;
       // query.outFields = ["FACILITYID","DATEINST","SIGNCATEGORY","SIGNTYPE","DIRFACES","SUBSTRMAT","BACKGRDMAT","SIGNSIZE","SIGNMEMO","HEIGHT","SUPPORTID","OBJECTID"];
        query.outFields = ["*"];
        query.outSpatialReference = map.spatialReference;         
    //************************** END Sign QUERY TASK ***************************************////       
         
                  
    //**************************Support QUERY TASK ***************************************////
   // build query
        queryTaskSupport = new esri.tasks.QueryTask("http://myserver/ArcGIS/rest/services/Signs/MapServer/1");
       
        //build query filter
        querySupport = new esri.tasks.Query();
        querySupport.returnGeometry = true;
        querySupport.outFields = ["*"];
        querySupport.outSpatialReference = map.spatialReference;

      

Outcomes