Problem: Getting exception while browsing my newly added web method in Iweb-CF

Jul 8, 2008 at 8:23 AM
I added a new web method in Iweb-CF..It complied without errors. When i browse DNN the service addresss is shown but when I click on the service address following exception is thrown

The binding at system.serviceModel/bindings/mexHttpBinding does not have a configured binding named 'ws2007HttpBinding'. This is an invalid value for bindingConfiguration.

My web.config looks like

<?xml version="1.0"?>
<configuration>
    <system.web>
        <!--<httpRuntime maxRequestLength="2097151" />-->
        <webServices>
        </webServices>
        <webControls clientScriptsLocation="/aspnet_client/{0}/{1}/" />
        <httpRuntime executionTimeout="1500" maxRequestLength="512000" />
    </system.web>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="basicHttpBinding" />
                <binding name="mtomHttpBinding" receiveTimeout="00:25:00" sendTimeout="00:25:00" maxBufferSize="524288000" maxReceivedMessageSize="524288000" messageEncoding="Mtom">
                    <readerQuotas maxArrayLength="524288000" />
                </binding>
            </basicHttpBinding>
            <ws2007HttpBinding>
                <binding name="ws2007HttpBinding">
                    <security mode="None">
                        <transport clientCredentialType="None" />
                        <message clientCredentialType="UserName" />
                    </security>
                </binding>
            </ws2007HttpBinding>
            <mexHttpBinding>
                <binding name="mexHttpBinding" />
            </mexHttpBinding>
        </bindings>
        <behaviors>
            <serviceBehaviors>
                <behavior name="DefaultBehavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        <services>
            <service behaviorConfiguration="DefaultBehavior" name="DotNetNuke.Modules.IWebCF.CoreService">
                <endpoint address="IComponent" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IComponent" contract="System.ComponentModel.IComponent" />
                <endpoint address="IDisposable" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IDisposable" contract="System.IDisposable" />
                <endpoint address="IParserAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IParserAccessor" contract="System.Web.UI.IParserAccessor" />
                <endpoint address="IUrlResolutionService" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IUrlResolutionService" contract="System.Web.UI.IUrlResolutionService" />
                <endpoint address="IDataBindingsAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IDataBindingsAccessor" contract="System.Web.UI.IDataBindingsAccessor" />
                <endpoint address="IControlBuilderAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IControlBuilderAccessor" contract="System.Web.UI.IControlBuilderAccessor" />
                <endpoint address="IControlDesignerAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IControlDesignerAccessor" contract="System.Web.UI.IControlDesignerAccessor" />
                <endpoint address="IExpressionsAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IExpressionsAccessor" contract="System.Web.UI.IExpressionsAccessor" />
                <endpoint address="INamingContainer" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="INamingContainer" contract="System.Web.UI.INamingContainer" />
                <endpoint address="IFilterResolutionService" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IFilterResolutionService" contract="System.Web.UI.IFilterResolutionService" />
                <endpoint address="IAttributeAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IAttributeAccessor" contract="System.Web.UI.IAttributeAccessor" />
                <endpoint address="INonBindingContainer" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="INonBindingContainer" contract="System.Web.UI.INonBindingContainer" />
                <endpoint address="IUserControlDesignerAccessor" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IUserControlDesignerAccessor" contract="System.Web.UI.IUserControlDesignerAccessor" />
                <endpoint binding="ws2007HttpBinding" bindingConfiguration="ws2007HttpBinding" name="CoreService" contract="DotNetNuke.Modules.IWebCF.IWebCoreService" />
                <endpoint address="IWebFileManager" binding="ws2007HttpBinding" bindingConfiguration="ws2007HttpBinding" name="IWebFileManager" contract="DotNetNuke.Modules.IWebCF.IWebFileManager" />
                <endpoint address="IWebFileTransferManager" binding="basicHttpBinding" bindingConfiguration="mtomHttpBinding" name="IWebFileTransferManager" contract="DotNetNuke.Modules.IWebCF.IWebFileTransferManager" />
                <endpoint address="IWebPortalManager" binding="ws2007HttpBinding" bindingConfiguration="ws2007HttpBinding" name="IWebPortalManager" contract="DotNetNuke.Modules.IWebCF.IWebPortalManager" />
                <endpoint address="IWebUserManager" binding="ws2007HttpBinding" bindingConfiguration="ws2007HttpBinding" name="IWebUserManager" contract="DotNetNuke.Modules.IWebCF.IWebUserManager" />
            </service>
        </services>
    </system.serviceModel>
</configuration>

CAn anyone help me in this..
Coordinator
Jul 21, 2008 at 5:14 AM
It appears that your configuration is incorrect. You have specified a binding of mexHttpBinding with a configuration name of ws2007HttpBinding for some of your endpoints:
<endpoint address="IComponent" binding="mexHttpBinding" bindingConfiguration="ws2007HttpBinding" name="IComponent" contract="System.ComponentModel.IComponent" />

This will cause a conflict in binding type and binding configuration it should match the type and configuration name like this one:
<endpoint binding="ws2007HttpBinding" bindingConfiguration="ws2007HttpBinding" name="CoreService" contract="DotNetNuke.Modules.IWebCF.IWebCoreService" />


If you change the binding in the to ws2007HttpBinding then the name is valid, otherwise you could change the configuration name to mexHttpBinding. Either option should be valid.

I hope this helps.