|
POST
|
I see that you are adding Query Parameters.....are there Edit parameters for editing?
... View more
05-10-2021
10:10 AM
|
0
|
0
|
3848
|
|
POST
|
Are there parameters for Editing? I see your example shows Query Parameters but what about if I need to edit this?
... View more
05-10-2021
10:09 AM
|
0
|
0
|
10691
|
|
POST
|
I got it with this....I went another route and got a Token for the service....I will simply apply that to the Service when I call it to satisfy the Credentials needed. // GET TOKEN
public String GetToken()
{
string result = null;
try
{
string gpUrl = "https://xxxx.xxxx.xxxx.gov/arcgis/tokens/generateToken?username=User&password=U$er&expiration=15&f=json";
string reqString = gpUrl;
HttpWebRequest req = WebRequest.Create(new Uri(reqString)) as HttpWebRequest;
req.Method = "POST";
req.ContentType = "application/json";
// Encode the parameters as form data:
byte[] formData = UTF8Encoding.UTF8.GetBytes(reqString);
//req.contentLength = formData.Length;
// Send the request:
using (Stream post = req.GetRequestStream())
{
post.Write(formData, 0, formData.Length);
}
// Pick up the response:
//string result = null;
using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse)
{
StreamReader reader =
new StreamReader(resp.GetResponseStream());
result = reader.ReadToEnd();
Console.WriteLine(result.ToString());
}
return result;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
result = ex.Message;
return result;
}
}
... View more
05-07-2021
07:45 AM
|
0
|
0
|
1571
|
|
POST
|
Can I do something like this exmaple? BUT I NEED C# https://developers.arcgis.com/documentation/mapping-apis-and-services/security/application-credentials/
... View more
05-07-2021
06:10 AM
|
0
|
1
|
1572
|
|
POST
|
In my Web.config I have the URL referenced <setting name="deletePoints_Dev" serializeAs="String">
<value>https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Testing/GPToolEditor/FeatureServer/0</value>
</setting> When I go to use this GP Tool I do this public Boolean DeleteAllPointsFromTable()
{
try
{
string whereClause = "OBJECTID>-1";
string gpUrl = deletePoints_Dev;
if (production) gpUrl = deletePoints_Prod;
string reqString = gpUrl + "/deleteFeatures?where=" + whereClause; BUT I am going to lok down this GP Tool URL like a Feature Service. Where in this workflow would I add the Proxy to bypass this authentication? WHERE do I put this Proxy Rule? HOW do I write this in C# urlUtils.addProxyRule({
urlPrefix: "https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Testing/GPToolEditor/FeatureServer/0",
proxyUrl: "https://xxxx.xxxx.xxxx.gov/DotNet/proxy.ashx"
});
... View more
05-06-2021
02:05 PM
|
0
|
2
|
1613
|
|
POST
|
In JavaScript I am adding a proxy rule as such....
urlUtils.addProxyRule({
urlPrefix: "https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Testing/Test/FeatureServer/0",
proxyUrl: "https://xxxx.xxxx.xxxx.gov/DotNet/proxy.ashx"
}); But I have a .Net app that I need to call a GP Service from C# BUT I want to run it through the proxy so Credentials are not needed.... How would I modify this code to work in C# so I can use it to bypass credentials on a secured GP Service urlUtils.addProxyRule({
urlPrefix: "https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Testing/Test/GP_TOOL/",
proxyUrl: "https://xxxx.xxxx.xxxx.gov/DotNet/proxy.ashx"
});
... View more
05-06-2021
01:55 PM
|
0
|
3
|
1637
|
|
POST
|
I got it.... <serverUrl url="https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Test/Test/FeatureServer/0"
matchAll="true" username="User" password="U$er"
tokenServiceUrl="https://xxxx.xxxx.xxxx.gov/arcgis/tokens/" /> urlUtils.addProxyRule({
urlPrefix: "https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Testing/Test/FeatureServer/0",
proxyUrl: "https://xxxx.xxxx.xxxx.gov/DotNet/proxy.ashx"
}); window.ServiceTest = new FeatureLayer("https://xxxx.xxxx.xxx.gov/arcgis/rest/services/Testing/Test/FeatureServer/0", {
mode: FeatureLayer.MODE_SNAPSHOT,
id: "ServiceTest",
opacity: .4,
visible: true,
outFields:["*"]
});
legendLayers4.push({ layer: ServiceTest, title: 'Test' });
... View more
05-06-2021
01:48 PM
|
0
|
0
|
982
|
|
POST
|
I have the DotNet Proxy installed and working for url="https://route.arcgis.com/" like in the example. I am now trying to do this for a Feature Service in my App...but not working it keeps asking me for Credentials... I am not sure if I need to define the URL all the way to the index number or what.... Do I need to define the Feature Service in the JS (part 3 below) differently to accept the token? ANY HELP would be appreciated. I created a Function that works for the first two and then tried to add my Feature Service Do I need to define this URL to the index number???? /FeatureService/0/ window.jsWidgets = function(){
//SET UP PROXY RULE FOR ROUTING AND TRAFFIC
// https://community.esri.com/groups/technical-support/blog/2015/04/07/setting-up-a-proxy/
urlUtils.addProxyRule({
urlPrefix: "route.arcgis.com",
proxyUrl: "https://xxxx.xxx.xxx.gov/DotNet/proxy.ashx"
});
urlUtils.addProxyRule({
urlPrefix: "traffic.arcgis.com",
proxyUrl: "https://xxxx.xxx.xxx.gov/DotNet/proxy.ashx"
});
urlUtils.addProxyRule({
urlPrefix: "https://xxxx.xxx.xxx.gov/arcgis/rest/services/Something/",
proxyUrl: "https://xxxx.xxx.xxx.gov/DotNet/proxy.ashx"
});
} Then in my proxy.config I added this DO I need to define this URL to the index number???? /FeatureService/0/ <serverUrl url="https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Something/"
matchAll="true" username="User" password="U$er" tokenServiceUrl="https://xxxx.xxxx.xxxx.gov/arcgis/tokens/"/> This is how I have the Feature Service in my JS Do I need to reference a Token number or something? window.ServiceTest = new FeatureLayer("https://xxxx.xxxx.xxxx.gov/arcgis/rest/services/Something/ServiceName/FeatureServer/0", {
mode: FeatureLayer.MODE_SNAPSHOT,
id: "ServiceTest",
opacity: .4,
visible: true,
outFields:["*"]
});
legendLayers4.push({ layer: ServiceTest, title: 'NWTL Test' });
... View more
05-06-2021
12:52 PM
|
0
|
1
|
995
|
|
POST
|
If I try and ping the DotNet proxy on LocalHost this is what I get... If I use the name of my domain I get this
... View more
05-05-2021
11:48 AM
|
0
|
1
|
1052
|
|
POST
|
OK now I can get here by running on the local server But if I click the proxy.ashx I get the error below...is this normal or is it broken?
... View more
05-05-2021
08:32 AM
|
0
|
2
|
1070
|
|
POST
|
OK I did this Open IIS Manager. In the Features view, double-click Directory Browsing. On the Directory Browsing page, in the Actions pane, click Enable. Now I am getting this error
... View more
05-05-2021
08:28 AM
|
0
|
3
|
1071
|
|
POST
|
I just downloaded the DotNet Proxy from https://github.com/Esri/resource-proxy NOTE: I just grabbed the DotNet Folder I placed the DotNet folder in my Websites Folder on my Web Server In IIS I created an Application and gave it DotNet name and pointed to the folder location above I Created an application pool V4.0 and pointed it to the DotNet application I left the proxy.config to its default On that same server I try and navigate to the application and get this Thoughts?
... View more
05-05-2021
08:17 AM
|
0
|
4
|
1075
|
|
POST
|
Ah Man....I feel like a fool....The line I was using was in multiple segments....I was choosing the incorrect Feature Class when I was running the geoprocessing tool... All good....geeze
... View more
04-22-2021
01:27 PM
|
1
|
0
|
2395
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|