2
我在CRM 2013 Online(沙箱)插件中使用外部Web服務時遇到了一些問題,我的問題是「EnvironmentSecurity」。我嘗試做相同的控制檯,一切運行正常......我所說的Web服務這樣的:使用來自MS Dynamics CRM 2013的外部Web服務Online Online Plug-in
NetworkCredential myCred = new NetworkCredential();
myCred.Domain = "dom";
myCred.UserName = "user";
myCred.Password = "pass";
CredentialCache credsCache = new CredentialCache();
credsCache.Add(new Uri(webAddress), "Basic", myCred);
HttpWebRequest http = (HttpWebRequest)HttpWebRequest.Create(webAddress);
http.PreAuthenticate = false;
http.UseDefaultCredentials = true;
HttpWebResponse response2 = (HttpWebResponse)http.GetResponse();
的錯誤是這樣的:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
請問您可以分享您嘗試撥打的完整URI,也可以分享方法類型 – Mani
是的,這是「http://myServer.com:9999/CustomWS/Account.asmx/IsAgencia?accountid='id」 「我不能告訴你真正的網址,對於安全抱歉,:S thx! – Alexis