简体   繁体   English

WCF自定义验证器

[英]WCF Custom Validator

While setting up a CustomValidator I'm getting the following error: 设置CustomValidator时,出现以下错误:

Could not load file or assembly 'Ringo.Authentication' or one of its dependencies. 无法加载文件或程序集“ Ringo.Authentication”或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
using Ringo.Utilities;


namespace Ringo.Authentication
{
public class CustomUserNameValidator : UserNamePasswordValidator
{
    public override void Validate(string Username, string Password)
    {
        Accounts account = new Accounts();

        if (account.CheckUserAccount(Username, Password))
        {
            return;
        }

        throw new SecurityTokenException("Accout is Invalid");
    }
}
}


      <serviceCredentials >
        <userNameAuthentication userNamePasswordValidationMode="Custom"  customUserNamePasswordValidatorType="Ringo.Authentication.CustomUserNameValidator, Ringo.Authentication"/>
      </serviceCredentials>

Any help would be great thanks! 任何帮助将非常感谢!

The Following: 下列:

<serviceCredentials >
    <userNameAuthentication userNamePasswordValidationMode="Custom"  customUserNamePasswordValidatorType="Ringo.Authentication.CustomUserNameValidator, **Ringo.Authentication**"/>
  </serviceCredentials>

Should Be: 应该:

      <serviceCredentials >
        <userNameAuthentication userNamePasswordValidationMode="Custom"  customUserNamePasswordValidatorType="Ringo.Authentication.CustomUserNameValidator, **Ringo**"/>
      </serviceCredentials>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF自定义验证器:如何从自定义验证器初始化“用户”对象 - WCF Custom Validator: How to initialize a “User” object from custom validator 使用存储库数据库的WCF自定义用户名和密码验证程序c# - WCF Custom Username and Password Validator using a Repository Database c# WCF的企业库6验证:自定义验证器错误消息 - Enterprise Library 6 Validation for WCF: Custom Validator Error Message 使用自定义验证程序的wcf消息层安全性用户名身份验证 - wcf message layer security username authentication with custom validator 从WCF架构验证器返回自定义响应 - Throw back custom response from WCF Schema Validator WCF自定义用户名验证器:为什么这段代码被认为是不安全的? - WCF Custom Username Validator: Why is this code considered so unsecure? WCF 身份验证:自定义用户名和密码验证器 asp.net - WCF Authentication: Custom Username and Password Validator asp.net WCF身份验证自定义用户名和密码验证程序,适用于多个用 - WCF authentication custom username and password validator for multiple users WCF成员资格提供者与自定义服务授权管理员w。 自定义用户名验证器 - WCF membership provider versus custom service authorization manager w. custom username validator 如何避免使用WCF自定义绑定和自定义验证程序对每个服务调用进行证书验证 - How to avoid cert validation on every service call with a WCF custom binding and a custom validator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM