2011-11-28 4 views
1

현재 현재 작성중인 웹 서비스가 현재 스택되어 있습니다. 로컬에서 테스트 할 때 모두 잘 작동하지만 웹 서버에 배포하려고하면 다음 오류가 발생합니다.웹 서비스 구성이 스택 됨

URI '... 내 웹 서비스 URI를 요청하는 동안 오류가 발생했습니다. .... '. 이것은 적절한 크로스 도메인 정책이없는 크로스 도메인 방식으로 서비스에 액세스하려고 시도하거나 SOAP 서비스에 적합하지 않은 정책으로 인해 발생할 수 있습니다. 도메인 간 정책 파일을 게시하고 SOAP 관련 HTTP 헤더를 보낼 수 있도록하려면 서비스 소유자에게 문의해야 할 수 있습니다. 이 오류는 InternalsVisibleToAttribute 특성을 사용하지 않고 웹 서비스 프록시에서 내부 형식을 사용하는 경우에도 발생할 수 있습니다. 자세한 내용은 내부 예외를 참조하십시오.

여기 내 웹 설정입니다.

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
    </configSections> 
    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"> 
    </modules> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <security> 
     <requestFiltering> 
     <requestLimits maxAllowedContentLength="2000000000" /> 
     </requestFiltering> 
    </security> 
    </system.webServer> 
    <connectionStrings> 
    <add name="........" providerName="System.Data.SqlClient" /> 
    </connectionStrings> 
    <appSettings> 
    <!-- Testing --> 
    <add key="DataConnectionString" value="..........." /> 
    </appSettings> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0"> 
     <buildProviders> 
     <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
     </buildProviders> 
    </compilation> 
    <httpRuntime executionTimeout="1200" maxRequestLength="2000000" /> 
    </system.web> 
    <system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="Service1"> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <dataContractSerializer maxItemsInObjectGraph="2000000000" /> 
     </behavior> 
     <behavior name=""> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     <behavior name="nextSPOTServiceBehavior"> 
      <serviceMetadata httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <dataContractSerializer maxItemsInObjectGraph="2000000000" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="SecureBasic" closeTimeout="00:10:00" 
       openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" 
       maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> 
      <security mode="Transport" /> 
      <readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/> 
     </binding> 
     <binding name="BasicHttpBinding_IDownloadManagerService" closeTimeout="00:10:00" 
      openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" 
      maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> 
      <security mode="Transport" /> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <services> 
     <service behaviorConfiguration="nextSPOTServiceBehavior" name="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.DownloadManagerService"> 
     <endpoint binding="basicHttpBinding" bindingConfiguration="SecureBasic" name="basicHttpSecure" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" /> 
     <!--<endpoint binding="basicHttpBinding" bindingConfiguration="" name="basicHttp" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" />--> 
     <!--<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDownloadManagerService" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" /> 
     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />--> 
     </service> 
    </services > 
    </system.serviceModel> 
</configuration> 

클라이언트 액세스 정책

<?xml version="1.0" encoding="utf-8" ?> 
<access-policy> 
    <cross-domain-access> 
    <policy> 
     <allow-from http-request-headers="*"> 
     <domain uri="http://*"/> 
     <domain uri="https://*"/> 
     </allow-from> 
     <grant-to> 
     <resource path="/" include-subpaths="true"/> 
     </grant-to> 
    </policy> 
    </cross-domain-access> 
</access-policy> 

크로스 도메인 정책

이것은 당신이없는 곳에서 웹 서비스에 액세스하기 위해 실버를 사용하려고 할 때 당신이 얻을 오류 같은 소리
<?xml version="1.0"?> 
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-  policy.dtd"> 
<cross-domain-policy> 
    <allow-http-request-headers-from domain="*" headers="*"/> 
</cross-domain-policy> 
+0

내부 예외가 있습니까? 이 오류는 그것이하는 것처럼 보입니다. –

답변

1

호스팅. 이 경우 clientaccesspolicy.xml을 웹 응용 프로그램 폴더에 추가해야합니다.

MSDN 실버 라이트 애플리케이션을위한 크로스 도메인 액세스를 허용하는 조항.

+0

안녕하세요, 죄송합니다. clientaccesspolicy 및 크로스 도메인 정책을 포함했지만 오류가 계속 발생했다는 사실을 잊어 버렸습니다. –

관련 문제