2012-07-13 50 views
0

我有WCF服務在本地機器上運行,以及在這裏:現在錯誤託管在GoDaddy的WCF服務,它正在其他託管

http://aor.weenggs.com/service.svc 

,我想在GoDaddy的託管環境,在這裏運行相同的服務:

http://pacpservice.dgulf.net/service.svc 

我收到錯誤:

InvalidOperationException: IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.]
System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint, AuthenticationSchemes supportedSchemes) +365757
System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage, String standardEndpointKind) +836
System.ServiceModel.Web.WebServiceHost.OnOpening() +244
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +274
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +206
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +651

我試圖聯繫支持b隊但他們並沒有真正回答可以幫助我解決問題的問題。

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <system.web> 
     <customErrors mode="Off" /> 
     <compilation debug="true" targetFramework="4.0"> 
      <assemblies> 
       <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
       <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
       <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
      </assemblies> 
      <buildProviders> 
       <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" /> 
      </buildProviders> 
     </compilation> 
    </system.web> 
    <system.serviceModel> 
     <behaviors> 
      <serviceBehaviors> 
       <behavior> 
        <serviceMetadata httpGetEnabled="true" /> 
        <serviceDebug includeExceptionDetailInFaults="true" /> 
       </behavior> 
      </serviceBehaviors> 
     </behaviors> 
     <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
    <system.webServer> 
     <modules runAllManagedModulesForAllRequests="true" /> 
     <directoryBrowse enabled="true" /> 
    </system.webServer> 
</configuration> 

我想,這需要一些設置在他們身邊的IIS。我試圖設置我的目錄使用「設置應用程序根」複選框選中/未選中,但沒有任何工作。

GoDaddy screen for IIS management

誰能幫我設置此功能?

+1

你收到什麼錯誤? – abatishchev 2012-07-13 07:34:18

+0

檢查http://pacpservice.dgulf.net/service.svc它顯示我在該頁面上的錯誤..我可以編輯任何你建議.. IIS指定身份驗證方案'基本,匿名',但僅綁定支持完全一個認證方案的規範。有效的認證方案是摘要,協商,NTLM,基本或匿名。更改IIS設置,以便只使用單個身份驗證方案。 – hriziya 2012-07-13 07:36:38

+2

我投票結束這個問題作爲題外話,因爲這應該針對Godaddy客戶支持。 – 2016-08-22 03:38:38

回答

1

由於在錯誤中它看起來在您的應用程序的IIS上啓用了基本身份驗證和匿名身份驗證,您是否可以要求他們爲您禁用基本身份驗證,如果您不需要它的話。

+0

我可以從web.config中完成嗎? – hriziya 2012-07-13 09:12:07

+1

nope,必須在IIS上完成 - >身份驗證 – 2012-07-13 09:41:03

+0

非常感謝!有效! :-) – hriziya 2012-07-13 19:29:54

0

你如何定義你的wcf服務使用哪個綁定?我認爲這可能是你遇到的問題的一個因素。

+0

你能告訴我,我需要在哪裏定義?如何 ? – hriziya 2012-07-13 09:11:40