|
POST
|
I am close to getting this using RestSharp but I am stuck with an NTLM authentication issue. I get a 401 for a response and notice in fiddler there is no authentication header. Any ideas?
string strdescr = "WillowTestfromSL";
string strRespFormat = "pjson";
RestRequest request = new RestRequest("http://myserver/arcgis/rest/services/GPTools/WildfireUpload/GPServer/uploads/upload", Method.POST);
//Get the file stream
byte[] bytes = null;
BinaryReader br = new BinaryReader(fileStream);
bytes = br.ReadBytes((int)numBytes);
//add parameters
request.AddFile("file", bytes,strFile,"application/x-zip-compressed");
request.AddParameter("desription", strdescr);
request.AddParameter("f", strRespFormat);
//calling server with restClient
RestClient restClient = new RestClient();
restClient.ExecuteAsync(request, (response) =>
{
if (response.StatusCode == HttpStatusCode.OK)
{
//upload successfull
MessageBox.Show("Upload completed succesfully...\n" + response.Content);
}
else
{
//error ocured during upload
MessageBox.Show(response.StatusCode + "\n" + response.StatusDescription);
}
});
... View more
12-21-2012
07:00 AM
|
0
|
0
|
690
|
|
POST
|
I am trying to utilize the new functionality in 10.1 that allows you to upload a file as part of a geoprocessing task. Does anytone have any examples on how to upload a file using C#. I have been hacking around with and and can't get it to work. Thanks..
... View more
12-20-2012
10:49 AM
|
0
|
3
|
2651
|
|
POST
|
Thanks for the reply. i was able to get this working by creating the mapping in a script.
Create FieldMappings object and load the target dataset
#
fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(WildFire_Table_Target)
inputfields = [field.name for field in arcpy.ListFields(shpPath) if not field.required]
for inputfield in inputfields:
# Iterate through each FieldMap in the FieldMappings
#
for i in range(fieldmappings.fieldCount):
fieldmap = fieldmappings.getFieldMap(i)
#arcpy.AddMessage(fieldmap.getInputFieldName(0))
# If the field name from the target dataset matches to a validated input field name
#
if fieldmap.getInputFieldName(0) == inputfield.replace("", ""):
# Add the input field to the FieldMap and replace the old FieldMap with the new
#
fieldmap.addInputField(shpPath, inputfield)
fieldmappings.replaceFieldMap(i, fieldmap)
break
... View more
12-18-2012
07:37 AM
|
0
|
0
|
3763
|
|
POST
|
I am trying to create a service that allows a user to upload a zip file that contains a shape file, unzip it, and finally append to an existing GDB Feature Class. The fields in the shape file do not match the FC so I need to performa field mapping. However, since the input is a zip file I do not have the capabilty to set up the field mapping in the model. So when I run this it adds the elements of the shape file but all the attributes are blank because the missing mapping. Is there any way around this? [ATTACH=CONFIG]19948[/ATTACH]
... View more
12-14-2012
09:52 AM
|
0
|
25
|
8544
|
|
POST
|
Hi, Why would you need to use the Print add-in when the Print tool is the core functionality of the Viewer? Try using this tool with a sample printing service to see if it works for you: http://servicesbeta2.esri.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task Thanks for the reply. The print tool is what I am using. I call it an add-in because, "The Print Tool is a production-ready add-in that allows users of the ArcGIS Viewer for Silverlight to print their maps.". I have configured the tool to use my service as well as the sample service located at http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task with the same results.
... View more
12-12-2012
05:50 AM
|
0
|
0
|
559
|
|
POST
|
When trying to use the new (3.0) print add-in with my export web map service hosted on my local server I am having requests fail when certain layers are turned on. The layer I have issues with is a map service layer that I am hosting on the same server as the export service. Any ideas? I do not understand why it would say unable to connect to the map server as the arcgis account should have access to all the services and underlying data on that server. Error executing tool.: Layer "HOPolicies InForce": Unable to connect to map server at http://myserver/arcgis/rest/services/Entities/InForce/MapServer. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task).
... View more
12-11-2012
11:32 AM
|
1
|
2
|
770
|
|
POST
|
Hi All. I am using field aliases on a layer i am hosting and the pop up for that windows displays those alias' how I expect. I have an add-in i created that performs a spatial query on that layer and returns the results back as a new layer in the map. The pop-ups and the attribute table on this new layer do not have the correct alias values. Looking at Fiddler i see the correct alias values are being sent back but for whatever reason they are not being acknowledged in my application when creating the new layer from the query results. I attached a screenshot of the configure screen for the new layer. [ATTACH=CONFIG]19825[/ATTACH] Here is a snippet of the query response from Fiddler: {"displayFieldName":"NAME","fieldAliases":{"ACCOUNT_NO":"Account #","POLICY_NO":"Policy #","NAME":"Name","RES_PREM_ADDRESS":"Address",
... View more
12-10-2012
08:01 AM
|
0
|
7
|
5306
|
|
POST
|
I also had the same issue as described in this thread. After discussing with ESRI support we determined the issue was using the port number 6080 in the connection string. Once I removed that I was able to publish without any issue. Connection details are documenting here in the 10.1 Help Guide.
... View more
11-29-2012
10:36 AM
|
0
|
0
|
2981
|
|
POST
|
I had the same issue on a brand new server configuration. I wiped everything out and tried again following the exact same steps without any further issues. Very strange..
... View more
11-29-2012
10:27 AM
|
0
|
0
|
969
|
|
POST
|
Patrick- Have you had a chance to see if the slowness issues have been resolved with SP1?
... View more
11-29-2012
09:58 AM
|
0
|
0
|
3033
|
|
POST
|
There appears to be an issue with the Surface Profile sample. I am getting a 404 not found in fiddler when submitting a request using the sample. GET http://sampleserver2b.arcgisonline.com/arcgisoutput/_ags_profile_jf4fa67727cd84d4facc24ec19d9b3393_1.png
... View more
11-20-2012
04:41 AM
|
0
|
0
|
1036
|
|
POST
|
I was thinking it would be nice if the viewer had the ability to add a favorite icon to the website and the ability to change the title as well. I am using the following lines in the index.htm page to do so. It would just be nicer to be able to do this in the viewer.
<head>
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<title>Test Map</title>
[ATTACH=CONFIG]18615[/ATTACH]
... View more
10-22-2012
06:16 AM
|
0
|
0
|
1584
|
|
POST
|
We recently stood up a 10.1 server and are now looking to add an additional server as a failover in a Hot/Cold setup. I am wondering what is the best method to keep these servers in sync. I have been thinking about using DFS to accomplish this. Is anyone utilizing a Hot/Cold setup like this? Any thoughts or suggestions on implementing a setup like this? Thanks, Brian
... View more
10-17-2012
08:43 AM
|
0
|
2
|
988
|
|
POST
|
You should have an xml file called sites.xml in the C:\inetpub\wwwroot\Builder\App_Data directory. That should show you all of the sites you see in your builder application. Below is a sample of what the contents of that file should look like. I have never tried it but you may be able add a site to the list. You would have to expiriment with the ID to what you can get away with there. Hopefully it works for you.
<?xml version="1.0" encoding="utf-8"?>
<Sites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Site>
<ID>5d2c60425257476d9e352fafc1e31bd0</ID>
<Name>Demo Map</Name>
<Url>http://RI130WS122:80/Apps/DemoMap</Url>
<PhysicalPath>c:\inetpub\wwwroot\Apps\DemoMap</PhysicalPath>
<IsHostedOnIIS>true</IsHostedOnIIS>
<IISHost xsi:nil="true" />
<IISPort>80</IISPort>
<IISPath xsi:nil="true" />
<Description />
</Site>
</Sites>
... View more
10-16-2012
11:21 AM
|
0
|
0
|
974
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 03-12-2025 11:01 AM | |
| 3 | 01-08-2025 09:26 AM | |
| 1 | 01-08-2025 07:19 AM | |
| 1 | 12-06-2024 04:52 AM | |
| 2 | 03-19-2024 04:36 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|