arcgis js 4.x加载地图服务跨域配置(.Net方式)

1.配置DotNet文件下的proxy文件

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
             mustMatch="true" xmlns="proxy.xsd">
    <serverUrls>
        <serverUrl url="http://ip:port/arcgis/rest/services"
                   matchAll="true"/>
    </serverUrls>
</ProxyConfig>

<!-- See https://github.com/Esri/resource-proxy for more information -->
 

2.在开发前端页面配置:

"esri/core/urlUtils"

urlUtils

 urlUtils.addProxyRule({
                urlPrefix: "http://ip:port",     
                proxyUrl: "http://localhost/DotNet/proxy.ashx"
            })

相关推荐

  1. arcgis js 4.x地图服务配置(.Net方式

    2024-01-19 11:18:05       52 阅读
  2. cesiumlab切片通过arcgisjs

    2024-01-19 11:18:05       55 阅读
  3. C# ASP.NET MVC 配置 访问

    2024-01-19 11:18:05       47 阅读
  4. ASP.NET的WebServiceCORS问题解决方案

    2024-01-19 11:18:05       26 阅读
  5. ASP.NET的WebServiceCORS问题解决方案

    2024-01-19 11:18:05       34 阅读
  6. .net core webapi

    2024-01-19 11:18:05       34 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-19 11:18:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-19 11:18:05       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-19 11:18:05       82 阅读
  4. Python语言-面向对象

    2024-01-19 11:18:05       91 阅读

热门阅读

  1. 【CSS】垂直居中的四种实现方式

    2024-01-19 11:18:05       56 阅读
  2. 离线安装python2的MySQLdb

    2024-01-19 11:18:05       51 阅读
  3. LeetCode解法汇总2171. 拿出最少数目的魔法豆

    2024-01-19 11:18:05       50 阅读
  4. 网络工程师:软件编程基础知识面试题(九)

    2024-01-19 11:18:05       50 阅读
  5. Python爬虫案例分享

    2024-01-19 11:18:05       55 阅读
  6. 前端为什么要使用枚举?(优化``if-else``版)

    2024-01-19 11:18:05       50 阅读
  7. kafka入门(八):副本

    2024-01-19 11:18:05       48 阅读
  8. Python:正则表达式之re.group()用法

    2024-01-19 11:18:05       51 阅读
  9. postgreSQL之grant

    2024-01-19 11:18:05       45 阅读
  10. linux安装Zookeeper的详细步骤

    2024-01-19 11:18:05       56 阅读