0

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!

Jeremy
  • 285
  • 3
  • 14

1 Answers1

1

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.

Piotr Stapp
  • 19,392
  • 11
  • 68
  • 116
  • so that is something we requested from them. we even went into their DB and dug out the URL for the Membership Provider. We tried adding it inline with that endpoint address, as well as adding a Service Reference to the URL. Neither resolved the issue. Additionally, when requested directly, we were told that the environment specific settings come from their Remote DB. Trying to confirm that the lack of an 'End Point Address' is the only issue, if anyone sees anything else in there that jumps out as being of issue please let us know. – Jeremy Apr 24 '13 at 19:24
  • So what error you have got when you fill endpoint address? As I understand your code ProprietaryMembershipAPIName1 connect somewhere remote to this endpoint address. As it is empty it cannot connect – Piotr Stapp Apr 24 '13 at 19:32
  • Unfortunately the same error whether we fill the end point address or connect directly to the Membership Provider svc URL. This leads us to speculate that the APIs are dealing with the remote connection incorrectly. Any other thoughts that perhaps went overlooked on our end? – Jeremy Apr 24 '13 at 19:43
  • The same stack trace? Try to debug code to check parameters in client base. – Piotr Stapp Apr 24 '13 at 20:01
  • Yes. I just double checked by doing a text compare between three copy-pasted text files of the stack trace under the different conditions: Without URL, With URL, With Service Reference. – Jeremy Apr 24 '13 at 20:17
  • Thanks for all the help! So after lots of back and forth, the Service provider provided a series of dll assemblies, which eventually made it start working. I think we got 5-6 dependencies in before we got it working. – Jeremy Apr 25 '13 at 19:13