2012-06-26 203 views
1

所有在IIS Express中都很好用,但是當我調試到本地IIS時,在嘗試在應用程序中使用WCF(下面列出)時顯示錯誤,但是VS不顯示。WCF RIA服務4004錯誤

[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] 

回答

2

我有解決方案。我的頭,它的作品很奇怪...

所以,你需要去控制面板 - 程序和功能 - 打開或關閉功能,並且你必須啓用全部 WCF服務樹(也檢查ASP.NET也,如果你不早點檢查)。

+2

這很荒謬,爲什麼在安裝IIS和ASP.Net時默認安裝這些條目,謝謝微軟。 – MartynJones87

+0

很多任務,更多的解決方案。 ASP.NET託管不是主要的WinServer任務 - 另請參閱有關SQL Server,Active Directory和其他信息。 –

+0

發佈後2年,我得到了同樣的錯誤。你能準確的告訴我哪些服務?我沒有看到任何WCF服務... –