惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
博客园 - 叶小钗
S
SegmentFault 最新的问题
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
L
Lohrmann on Cybersecurity
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
J
Java Code Geeks
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 三生石上(FineUI控件)
Attack and Defense Labs
Attack and Defense Labs
AI
AI
The Cloudflare Blog
T
Tailwind CSS Blog
S
Schneier on Security
爱范儿
爱范儿
PCI Perspectives
PCI Perspectives
Stack Overflow Blog
Stack Overflow Blog
S
Secure Thoughts
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
V2EX - 技术
V2EX - 技术
S
Securelist
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Help Net Security
Help Net Security
C
Cisco Blogs
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
K
Kaspersky official blog
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - Candyxiaoqiang

使用 ADO.NET 访问 Oracle 9i 存储过程(转) 使用 ADO.NET 和 Oracle 进行高级数据访问 (转自) HttpRequest, HttpRuntime, AppDomain and friends() 在showModalDialog窗体里,单击服务端Button产生新页面解决方法 - Candyxiaoqiang - 博客园 asp.net按钮 button的onclick事件 与oncommand 事件的区别 汇总 SQL 连接字符串的说明(转) JavaScript相关资料( 收集中.......) - Candyxiaoqiang - 博客园 Visual Studio常用小技巧 觉得不错 转一下 Web开发中用的工具(不断更新) C#实现Web文件上传的两种方法 (转) document,event javascript中常用对象介绍 带中文说明的 (转) ASP.Net实现将Word转换PDF格式 (转自:思绪随风~~~) 用C#实现生成PDF文档和将WORD转换为PDF (转自海东的技术资料) C# 拆分word(根据标题或书签拆分) (转自zrx401558287) 完成类似QQ邮箱中‘HTML方式查看’功能查看Office文件 (转自zellzhang) 如何:将文档发送到打印机(转) 利用.net替换Word的内容(从数据库中取数据来替换word里面的书签)(转) 在IIS上启用Gzip压缩(HTTP压缩) (转自子秋的博客) VS2005 直接调试网页不能显示
如何采用Local方式连接到ArcGIS Server(转)
Candyxiaoqiang · 2009-05-16 · via 博客园 - Candyxiaoqiang

原文出自:http://blog.csdn.net/junmail/archive/2008/05/14/2444436.aspx

如何采用Local方式连接到ArcGIS Server

在使用ArcGIS Server ArcObjects API的时候,一般都需要首先以local方式连接到GIS Server,那么在9.2版本中有两个类可以连接到GIS Server。一个是ESRI.ArcGIS.Server.GISServerConnectionClass类,另一个是ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection类。

ESRI.ArcGIS.Server.GISServerConnectionClass类是对COM类封装以后的.NET类,在连接GIS Server时没有显式的指定用户,那么连接GIS Server是使用的是什么用户呢?其实是使用的web应用的用户,如果在web.config中有identity的节点,那么就是它了。连接的代码如下:

[C#]
ESRI.ArcGIS.Server.GISServerConnectionClass gisconnection;
gisconnection = new ESRI.ArcGIS.Server.GISServerConnectionClass();
gisconnection.Connect("servername");
ESRI.ArcGIS.Server.IServerObjectManager som = gisconnection.ServerObjectManager;

ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection类是一个纯粹的.NET类,其实整个ESRI.ArcGIS.ADF.Connection类库中的类都是.NET类。我们在连接server时最好使用AGSServerConnection。这个类需要显式的指定身份信息,用法如下:

[C#]
ESRI.ArcGIS.ADF.Identity identity = new ESRI.ArcGIS.ADF.Identity("user", "passwd", "domain");
ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsconnection;
agsconnection = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("hostname", identity);
agsconnection.Connect();
IServerObjectManager som = agsconnection.ServerObjectManager;