Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
code starts from here

<configuration>
  
    <system.servicemodel>
      <services>
        <service name="CustomerServiceLibrary.CustomerService">

          <endpoint address="http://223.185.194.241:9191/BasicCustomerService" bindingconfiguration="" binding="basicHttpBinding" name="CustomerService_Basic" contract="CustomerServiceLibrary.CustomerService">

          </endpoint>



        </service>

      </services>

    </system.servicemodel>
  </configuration>

 code ends here

getting problem in this exception saying tht binding coinfiguration is not found in system.serviemodel namespace
this is wht exception is showing
System.Configuration.ConfigurationErrorsException was unhandled
Message=The binding at system.serviceModel/bindings/basicHttpBinding does not have a configured binding named 'CustomerService'. This is an invalid value for bindingConfiguration. (C:\WCFPart2\MyConsoleServer\MyConsoleServer\bin\Debug\MyConsoleServer.vshost.exe.config line 8)
Source=System.Configuration
BareMessage=The binding at system.serviceModel/bindings/basicHttpBinding does not have a configured binding named 'CustomerService'. This is an invalid value for bindingConfiguration.
Filename=C:\WCFPart2\MyConsoleServer\MyConsoleServer\bin\Debug\MyConsoleServer.vshost.exe.config
Line=8
StackTrace:
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetSectionFromConfigurationManager(String sectionPath)
at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetConfigurationSection(String sectionPath)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociatedSection(ContextInformation evalContext, String sectionPath)
at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetSection(String sectionPath)
at System.ServiceModel.Configuration.ServicesSection.UnsafeGetSection()
at System.ServiceModel.Description.ConfigLoader.LookupService(String serviceConfigurationName)
at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName)
at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at MyConsoleServer.Program.Main(String[] args) in C:\WCFPart2\MyConsoleServer\MyConsoleServer\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Posted
Updated 22-Apr-13 3:15am
v3

1 solution

The problem here is that your endpoint specifies a binding to use :

binding="basicHttpBinding"

Which you don't have defined (at least not in the snippet you've posted....) - you'll need to add the binding information - something along the lines of:
HTML
<bindings>
   <basichttpbinding>
    <binding name="BasicHttpBinding" closetimeout="00:01:00">
     openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
     allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
     maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
     messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
     useDefaultWebProxy="true">
     <readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
      maxBytesPerRead="4096" maxNameTableCharCount="16384" />
     <security mode="None">
      <transport clientcredentialtype="None" proxycredentialtype="None">
       realm="" />
      <message clientcredentialtype="UserName" algorithmsuite="Default" />
     </transport></security>
    </readerquotas></binding></basichttpbinding></bindings>
 
Share this answer
 

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