Need help with WCF server side web.config error

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<configuration></configuration><configsections></configsections><sectiongroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </sectiongroup><sectiongroup
name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </sectiongroup><section allowDefinition="MachineToApplication" name="scriptResourceHandler" requirePermission="false"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </section><sectiongroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </sectiongroup><section allowDefinition="Everywhere" name="jsonSerialization" requirePermission="false" type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </section><section allowDefinition="MachineToApplication" name="profileService" requirePermission="false" type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </section><section allowDefinition="MachineToApplication" name="authenticationService" requirePermission="false" type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </section><section allowDefinition="MachineToApplication" name="roleService" requirePermission="false" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </section></sectiongroup><//sectiongroup></sectiongroup><//sectiongroup></sectiongroup><//sectiongroup></configsections><//configsections><appsettings></appsettings><add key="UserName" value="administrator </add><add
key="Password" value="optimaxx </add><add key="DBName" value="KENNY </add><add key="PurgeLogFileDays" value="30 </add></appsettings><//appsettings><connectionstrings></connectionstrings><system.web></system.web><httpruntime executionTimeout="110" maxRequestLength="524288 </httpruntime><compilation
debug="true" explicit="true" strict="false </compilation><assemblies></assemblies><add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 </add><add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35 </add></assemblies><//assemblies></compilation><//compilation><pages></pages><namespaces></namespaces><clear></clear><add namespace="System </add><add namespace="System.Collections </add><add namespace="System.Collections.Specialized </add><add
namespace="System.Configuration </add><add namespace="System.Text </add><add namespace="System.Text.RegularExpressions </add><add namespace="System.Linq </add><add namespace="System.Web </add><add namespace="System.Web.Caching </add><add namespace="System.Web.SessionState </add><add
namespace="System.Web.Security </add><add namespace="System.Web.Profile </add><add namespace="System.Web.UI </add><add namespace="System.Web.UI.WebControls </add><add namespace="System.Web.UI.WebControls.WebParts </add><add namespace="System.Web.UI.HtmlControls </add></namespaces><//namespaces><controls></controls><add
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.UI" tagPrefix="asp </add></controls><//controls></pages><//pages><authentication mode="Windows </authentication><httphandlers></httphandlers><remove
path="*.asmx" verb="* </remove><add path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" verb="* </add><add path="*_AppService.axd"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" verb="* </add><add path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" verb="GET,HEAD </add></httphandlers><//httphandlers><httpmodules></httpmodules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </add></httpmodules><//httpmodules></system.web><//system.web><system.codedom></system.codedom><compilers></compilers><compiler extension=".vb" language="vb;vbs;visualbasic;vbscript" type="Microsoft.VisualBasic.VBCodeProvider,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4 </compiler><provideroption name="CompilerVersion" value="v3.5 </provideroption><provideroption name="OptionInfer" value="true </provideroption><provideroption name="WarnAsError"
value="false </provideroption></compiler><//compiler></compilers><//compilers></system.codedom><//system.codedom><system.webserver></system.webserver><validation validateIntegratedModeConfiguration="false </validation><modules></modules><add name="ScriptModule"
preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 </add></modules><//modules><handlers></handlers><remove name="WebServiceHandlerFactory-Integrated </remove><add
name="ScriptHandlerFactory" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" verb="* </add><add name="ScriptHandlerFactoryAppServices"
path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" verb="* </add><add name="ScriptResource" path="ScriptResource.axd"
preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" verb="GET,HEAD </add></handlers><//handlers></system.webserver><//system.webserver><system.servicemodel></system.servicemodel><services></services><service
behaviorConfiguration="OptiWeb.RetrieveBehavior" name="OptiWeb.OptiWeb </service><endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpConfiguration" contract="OptiWeb.IOptiWeb </endpoint><identity></identity><dns value="localhost </dns></identity><//identity></endpoint><//endpoint><endpoint
address="mex" binding="mexHttpBinding" contract="IMetadataExchange </endpoint></service><//service></services><//services><bindings></bindings><webhttpbinding></webhttpbinding><binding bypassProxyOnLocal="true" maxReceivedMessageSize="2147483647" name="WSHttpConfiguration"
useDefaultWebProxy="true </binding><readerquotas maxArrayLength="2147483647 </readerquotas></binding><//binding></webhttpbinding><//webhttpbinding></bindings><//bindings><behaviors></behaviors><servicebehaviors></servicebehaviors><behavior name="OptiWeb.RetrieveBehavior </behavior><servicemetadata
httpGetEnabled="true </servicemetadata><servicedebug includeExceptionDetailInFaults="false </servicedebug></behavior><//behavior></servicebehaviors><//servicebehaviors></behaviors><//behaviors></system.servicemodel><//system.servicemodel></configuration><//configuration>
I am trying to increase the maxReceivedMessageSize and the maxArrayLength of the server side web.config and getting the

following error.

<br/>
Line 129: <services><br/>
Line 130: <service behaviorConfiguration="OptiWeb.RetrieveBehavior" name="OptiWeb.OptiWeb <br/>
Line 131: <endpoint address="" binding="wsHttpBinding" contract="OptiWeb.IOptiWeb" bindingConfiguration

="WSHttpConfiguration <br/>
Line 132: <identity><br/>
Line 133: <dns value="localhost" />


here the the full server side web.config. any help will be appreciated.

<pre class="prettyprint <?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"
allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
<!-- Database Keys -->
<add key="UserName" value="administrator"/>
<add key="Password" value="optimaxx"/>
<add key="DBName" value="KENNY"/>
<add key="PurgeLogFileDays" value="30"/>
</appSettings>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<httpRuntime executionTimeout ="110" maxRequestLength ="524288"/>
<compilation debug="true" strict="false" explicit="true
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Linq"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd"
preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<system.serviceModel>
<services>
<service behaviorConfiguration="OptiWeb.RetrieveBehavior" name="OptiWeb.OptiWeb
<endpoint address="" binding="wsHttpBinding" contract="OptiWeb.IOptiWeb" bindingConfiguration ="WSHttpConfiguration
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="WSHttpConfiguration" bypassProxyOnLocal ="true" useDefaultWebProxy ="true"
maxReceivedMessageSize ="2147483647
<readerQuotas maxArrayLength ="2147483647"/>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="OptiWeb.RetrieveBehavior
<!-- To avoid disclosing metadata information, set the value below to false and remove
the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>[/code]
<br/>

View the full article
 
Back
Top