Question

We are using a proprietary Single Sign On Service to remotely do Membership calls. We connect via a VPN.

We are getting en error at:

Service.Web.Security.Membership.ValidateUser(username, password);

Regardless of whether the VPN is working or not:

Stack Trace:

[ArgumentNullException: Value cannot be null. Parameter name: remoteAddress] System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName, String remoteAddress) +3235973 ProprietaryService.Security.Membership.MembershipServiceProxy.ValidateUser(String applicationName, String username, String password, Int32 maxInvalidPasswordAttempts) +231 ProprietaryService.Security.Membership.MembershipProvider.ValidateUser(String username, String password) +27 System.Web.Security.Membership.ValidateUser(String username, String password) +26 includes_usercontrols_LoginForm.btnLogin_Click(Object sender, EventArgs e) in LoginForm.ascx.cs:91 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9553178 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724'

The pertinent area of the Web.Config:

 <system.web>
        <membership defaultProvider="MembershipProvider">
            <providers>
                <clear />
                <add name="MembershipProvider"
                     type="ProprietaryMembershipAPIName1, ProprietaryMembershipAPIName2"
                     connectionStringName="ConnectionStringToRemoteDB1" enablePasswordRetrieval="false" enablePasswordReset="true"
                     requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5"
                     minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
                     applicationName="RemoteAppName" />
            </providers>
        </membership>
    </service.web>
    <system.serviceModel>
        <bindings>
    <netTcpBinding>
                <binding name="MembershipProvider_NetTcpBinding" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
            hostNameComparisonMode="StrongWildcard" listenBacklog="10"
            maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
            maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
<client>
            <endpoint address=""
                binding="netTcpBinding" bindingConfiguration="Membership_NetTcpBinding"
                contract="MembershipProviderService.MembershipService" name="Membership_NetTcpBinding" >

            </endpoint>
</client>

We can remotely access the DB via the credentials in the ConnectionStringToRemoteDB1 just fine. We are told that the 'MembershipProviderService.MembershipService' and associated APIs are designed to go and get the Remote Address from the Database and serve it up to the Membership Provider.

Does anybody see any issues with the configuration in here that screams that this would not work? This feels like there is a config piece missing, but consuming services across domains by way of VPN makes it difficult to know what the issue might be. Thanks for any suggestions in advance!

Was it helpful?

Solution

The error you have got is because of this line in your web.config:

<endpoint address=""

In exception it is exactly written that it is trying to create WCF client:

System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName, String remoteAddress)

And you cannot pass empty/null address.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top