我有一个相当奇怪的问题。 首先,我想提一下,下面的代码在内部部署时没有问题,即在本地内部网中。
我们将一些Cubes推送到Azure,我尝试在我的应用程序中执行以下操作:
using (Server s = new Server())
{
s.Connect(cubeConnectionString);
Database db = s.Databases.FindByName(cubeName);
db.Model.RequestRefresh(RefreshType.Full);
db.Model.SaveChanges();
}
所以我尝试使用Azure连接字符串。 失败了:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: user_realm_discovery_failed: User realm discovery failed
---> System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpWebRequestWrapper.<GetResponseSyncOrAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
我通过谷歌搜索了解它与我公司使用的代理有关。好的。我添加到app config:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy
usesystemdefault="true"
proxyaddress="http://proxy:8080"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
所以会发生什么事情才有效,多维数据集已经处理但现在的问题是
的调用db.Model.SaveChanges()
不再返回并且只是挂起,最终会抛出超时异常。
当我查看Analysis Service时,多维数据集已成功完成处理。所以我想这与所涉及的代理有关。
在家中没有代理的测试设置中,一切正常,功能确实正常返回。
那么你有什么想法如何处理这个?