Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a WCF ,ITS working properly on my laptop ,but when i put it under IIS OF my Desktop ,its put error explain above.
web.config file is as below
HTML
<configuration>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
	<httpRuntime maxRequestLength="1000000"  targetFramework="4.0"/>
  </system.web>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="LargeDataBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="Service" behaviorConfiguration="service_behavior">
        <endpoint address="" binding="webHttpBinding" behaviorConfiguration="web" contract="IService"/>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="service_behavior">
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https"/>
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>

this service is being connected DB TO android app
ERROR IS ON BELOW line
HTML
8:     <httpRuntime maxRequestLength="1000000"  targetFramework="4.0"/>
   9:   </system.web>
  10:   <system.serviceModel>
Posted

Hi,

you have syntax errors in the system.web section of your config.

Try the following:
1) Close your compilation element
2) Remove the targetFramework attribute from the httpRuntime

i.e.:
HTML
<system.web>
  <compilation debug="true" targetFramework="4.0" />
  <httpRuntime maxRequestLength="1000000" />
</system.web>


... hope it helps.
 
Share this answer
 
v2
here is the answer ,i left one of my taq open that is way i am facing that problem
HTML
<compilation debug="true" targetframework="4.0" />
   <httpruntime maxrequestlength="1000000" targetframework="4.0" />
 
Share this answer
 
Comments
hypermellow 16-Jun-15 4:44am    
That's still not correct, the targetFramework attribute is not valid for the httpRuntime element - (https://msdn.microsoft.com/en-gb/library/e1f13641%28v=vs.100%29.aspx).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900