How do implement the binding of WSHttpBinding in Nhydrate?

Dec 28, 2010 at 11:48 PM

Hello.

How do implement the binding of WSHttpBinding in Nhydrate?

Coordinator
Dec 29, 2010 at 2:11 AM

nHydrate is a generated data access layer. It does not have any sort of WCF binding in it. Could you please tell me what you are trying to do?

Dec 29, 2010 at 3:01 AM

Hello.

I did what I said the tutorial ->

http://www.codeproject.com/KB/codegen/nHydrate_InversionControl.aspx

I modified the web.config of the client and WCFProxy and it worked well basicHttpBinding, but I modified to work with WSHttpBinding throws error.

 

<appSettings>
    <add key="ProxyAssembly" value="Acme.Northwind.WCFProxy" />
</appSettings>

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IDataService" 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="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/DataService.svc"
   binding="basicHttpBinding"
   bindingConfiguration="BasicHttpBinding_IDataService"
   contract="IDataService" name="AcmeNorthwind_IDataService" />
</client>
</system.serviceModel>

 

Thanks.

 

Dec 31, 2010 at 12:00 PM

This is the code web.config does not work with WSHttpBinding

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpBinding_IDataService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00"
            sendTimeout="00:01:00" allowCookies="false"
            bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="524288"
            maxReceivedMessageSize="65536" messageEncoding="Text"
            textEncoding="utf-8"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192"
            maxArrayLength="16384" maxBytesPerRead="4096"
            maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None"
              proxyCredentialType="None" realm="">
              <extendedProtectionPolicy policyEnforcement="Never" />
            </transport>
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
   
    <client>
      <endpoint address="http://localhost:2912/DataService.svc"
         binding="wsHttpBinding"
         bindingConfiguration="wsHttpBinding_IDataService"
         contract="IDataService" name="tek.demo.WCFProxy_IDataService" />
    </client>
  </system.serviceModel>