成员提供程序返回remoteAddress为空

本文关键字:remoteAddress 为空 返回 程序 成员 | 更新日期: 2023-09-27 18:10:41

我们使用专有的单点登录服务远程执行会员呼叫。我们通过VPN连接。

我们得到一个错误:

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

无论VPN是否工作:

堆栈跟踪:

[ArgumentNullException: Value不能为空。]参数名称:remoteAddress]System.ServiceModel.ClientBase"1 . .ctor(String endpointConfigurationName, String remoteAddress) +3235973ProprietaryService.Security.Membership.MembershipServiceProxy。ValidateUser(字符串applicationName,字符串用户名,字符串密码,Int32 maxxinvalidpasswordattempts) +231ProprietaryService.Security.Membership.MembershipProvider。ValidateUser(字符串用户名,字符串密码)+27System.Web.Security.Membership。ValidateUser(String username, String password) +26includes_usercontrols_LoginForm。btnLogin_Click(Object sender, EventArgs e) in loginfo . asx .cs:91System.Web.UI.WebControls.Button。OnClick(EventArgs e) +9553178System.Web.UI.WebControls.Button。RaisePostBackEvent(String eventArgument) +103System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler。RaisePostBackEvent(String eventArgument) +10System.Web.UI.Page。(ipostbackeventandler的sourceControl, String eventArgument) +13System.Web.UI.Page。RaisePostBackEvent(NameValueCollection postData) +35System.Web.UI.Page。ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724'

Web的相关区域。配置:

 <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>

我们可以通过ConnectionStringToRemoteDB1中的凭据远程访问DB。我们被告知MembershipProviderService。MembershipService'和相关的api被设计为从数据库获取远程地址,并将其提供给成员资格提供者。

有没有人看到任何问题的配置在这里尖叫,这将无法工作?这感觉就像缺少了一个配置块,但是通过VPN跨域消费服务使得很难知道问题可能是什么。谢谢你的建议!

成员提供程序返回remoteAddress为空

你得到的错误是因为你的web.config中的这一行:

<endpoint address=""

在例外情况下,它被准确地写为试图创建WCF客户端:

System.ServiceModel.ClientBase"1 . .男星(字符串endpointConfigurationName, String remoteAddress)

不能传递空/空地址