我创建了一个 Windows Azure 项目作为Worker Role ..它有一个简单的 WCF 服务。当我在本地系统上运行它时,Compute Emulator会给我以下错误...
我安装了最新的 Azure SDK 工具包。请告诉我为什么会发生此错误。
在 Microsoft.WindowsAzure.Diagnostics.ControlChannel.GetControlContainer() [诊断]:获得互斥锁 【诊断】信息:C:\Users\kashif\AppData\Local\dftmp\Resources\85b2b7f8-61ec-499d-a473-b39674855c21\directory\DiagnosticStore\Monitor [诊断] 信息:C:\Users\kashif\Downloads\WCFWorkerRole\WCFWorkerRole\WCFWorkerRole\csx\Debug\roles\WCFWorker\diagnostics\x64\monitor\MonAgentHost.exe -LocalPath "C:\Users\kashif\AppData\Local \dftmp\Resources\85b2b7f8-61ec-499d-a473-b39674855c21\directory\DiagnosticStore\Monitor"-StaticConfigFile "C:\Users\kashif\AppData\Local\dftmp\Resources\85b2b7f8-61ec-499d-a473-b39674855c21\directory \DiagnosticStore\Monitor\Configuration\mastaticconfig.xml" -ConfigFile "C:\Users\kashif\AppData\Local\dftmp\Resources\85b2b7f8-61ec-499d-a473-b39674855c21\directory\DiagnosticStore\Monitor\Configuration\maconfig.xml " -ShutDownEvent WADDM-ShutDown-f615698470fe491ea136287908faa42c -InitializedEvent WADM-StartUp-f615698470fe491ea136287908faa42c -parent 11516 -events [MonAgentHost] 输出:当发出 WADDM-ShutDown-f615698470fe491ea136287908faa42c 信号时,代理将退出。 [MonAgentHost] 输出:代理初始化后将发出 WADM-StartUp-f615698470fe491ea136287908faa42c 信号。 [MonAgentHost] 输出:注册为事件消费者。 [MonAgentHost] 输出:当父进程 11516 退出时,代理将退出。 [MonAgentHost] 输出:监控代理已启动 [诊断]:创建配置通道服务器 [诊断]:启动配置通道轮询 [运行时] 角色入口点。已完成 OnStart() [运行时] 角色入口点。调用运行() 信息:WCFWorker 入口点调用 信息:工作 信息:工作 [MonAgentHost] 错误:MA 事件:2012-06-04T13:40:32.487Z [MonAgentHost] 错误:2 [MonAgentHost] 错误:11292 [MonAgentHost] 错误:7264 [MonAgentHost] 错误:NetTransport [MonAgentHost] 错误:0 [MonAgentHost] 错误:x:\btsdx\215\services\monitoring\shared\nettransport\src\netutils.cpp [MonAgentHost] 错误:OpenHttpSession [MonAgentHost] 错误:749 [MonAgentHost] 错误:0 [MonAgentHost] 错误:2f94 [MonAgentHost] 错误: [MonAgentHost] 错误:WinHttpGetProxyForUrl(http://127.0.0.1) 失败 ERROR_WINHTTP_AUTODETECTION_FAILED (12180) [MonAgentHost] 错误:MA 事件:2012-06-04T13:40:32.504Z [MonAgentHost] 错误:2 [MonAgentHost] 错误:11292 [MonAgentHost] 错误:7264 [MonAgentHost] 错误:NetTransport [MonAgentHost] 错误:0 [MonAgentHost] 错误:x:\btsdx\215\services\monitoring\shared\nettransport\src\xblobconnection.cpp [MonAgentHost] 错误:XBlobConnection::SendBytesRequestAndGetHttpStatus [MonAgentHost] 错误:1980 [MonAgentHost] 错误:ffffffff80050006
工人角色 OnStart:
ServicePointManager.DefaultConnectionLimit = 12;
ServiceHost host;
IPEndPoint ip = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["port"].IPEndpoint;
Uri baseAddress = new Uri(String.Format("http://{0}/MyService", ip));
try { host = new ServiceHost(typeof(MessengerService), baseAddress); host.Open(); }
catch (Exception ex) { Trace.WriteLine(ex.Message, "Error"); throw; }
return base.OnStart();