关于ArcGIS Identity ......
在VS.Net里开发ArcGIS Web项目时,要求用户验证信息,有2种方法:
1. 在Web.Config内明码输入用户信息,形如:<identity impersonate ="true" userName ="fareast\v-sufanj" password ="aaaaaaa"/>
2. 第一种方法显然不太安全,那么可以这样做:
右击“解决方案”,打开“Add ArcGIS Identity......”(如下图)
记得将“Encrypt identity in web.config”勾上,点“OK”后那么在Web.Config页将增加如下信息:
<identity configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>O4ToP2xqjgQAAAAAAl/G+70v6ftWRxCz/zdrtn7tssJg92uosXxgs6dIK2F8uQI</CipherValue>
</CipherData>
</EncryptedData>
</identity>
同时你会发现有此提示:“configProtectionProvider" attribute is not decleared; "EncryptedData" is not contained in the "identity ". ;不过项目能编译通过,也不影响使用!具体原理没搞明白!呵
特别注意:如果用户是域帐号,那么在上图中最下面文本框中须输入的域名(如本例),这与登录ArcGIS Server Manager的信息一致(如下图)若非域帐号则直接输入连接机器名!
1. 在Web.Config内明码输入用户信息,形如:<identity impersonate ="true" userName ="fareast\v-sufanj" password ="aaaaaaa"/>
2. 第一种方法显然不太安全,那么可以这样做:
右击“解决方案”,打开“Add ArcGIS Identity......”(如下图)
记得将“Encrypt identity in web.config”勾上,点“OK”后那么在Web.Config页将增加如下信息:
<identity configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>O4ToP2xqjgQAAAAAAl/G+70v6ftWRxCz/zdrtn7tssJg92uosXxgs6dIK2F8uQI</CipherValue>
</CipherData>
</EncryptedData>
</identity>
同时你会发现有此提示:“configProtectionProvider" attribute is not decleared; "EncryptedData" is not contained in the "identity ". ;不过项目能编译通过,也不影响使用!具体原理没搞明白!呵
特别注意:如果用户是域帐号,那么在上图中最下面文本框中须输入的域名(如本例),这与登录ArcGIS Server Manager的信息一致(如下图)若非域帐号则直接输入连接机器名!