1

在 IIS Express 中一切正常,但是当我调试到本地 IIS 时,尝试在应用程序中使用 WCF(如下所列)时出现错误,浏览器显示,但 VS 没有。

[Window Title]
Visual Studio Just-In-Time Debugger

[Main Instruction]
An unhandled exception ('Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Invoke operation 'Login' failed. The remote server returned an error: NotFound. ---> System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.WebDomainClient`1.EndInvokeCore(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainClient.EndInvoke(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.InvokeOperation.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass30`1.<InvokeOperation>b__2c(Object )     
') occurred in iexplore.exe [856].

The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?

[V] View process details  [Yes, debug iexplore.exe] [No, cancel debugging]

[Expanded Information]
Process Name: C:\Program Files (x86)\Internet Explorer\iexplore.exe
User Name: Armanx64PC\Armanx64 [Elevated]
4

1 回答 1

2

我有解决办法。我的头,它的工作方式很奇怪......

因此,您需要转到控制面板 - 程序和功能 - 打开或关闭功能,并且您必须在此处启用所有WCF 服务树(如果您不及早检查,也请检查 ASP.NET)。

于 2012-06-26T01:38:13.243 回答