Stacked up with web service configuration

Posted by Allan Chua on Stack Overflow See other posts from Stack Overflow or by Allan Chua
Published on 2011-11-28T01:44:17Z Indexed on 2011/11/28 1:50 UTC
Read the original article Hit count: 226

Filed under:
|
|

I'm currently stacked with the web service that im creating right now. when Testing it in local it all works fine but when I try to deploy it to the web server it throws me the following error

An error occurred while trying to make a request to URI '...my web service URI here....'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

here is my web config.

<?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>

© Stack Overflow or respective owner

Related posts about c#

Related posts about wcf