IIS/Sharepoint GAC 上的 DLL 缓存问题

发布于 2024-09-25 09:37:30 字数 951 浏览 0 评论 0原文

我们有一些共享点站点,它们使用我们为自定义内容(包括身份验证和授权)开发的各种用户控件。在其中一个网站上,当管理员创建新用户时,它会创建一个具有最小长度字符数的密码,保存用户信息并向用户的电子邮件地址发送一封电子邮件。一切都很好,直到......公司刚刚颁布了一项新政策,即所有用户必须使用 10 个字符的最小长度密码,而不是之前的 8 个字符。该值位于静态类的程序集中,因此我们可以执行类似的操作

//Assembly 1 defines rules and logic

public static class AccountRules
{
    public static int PasswordMinimumLength = 10;
}


//Assembly 2 calls references Assembly 1

Status CreateUser(User u)
{
    if (u.Password == null)
    {
        u.Password = GeneratePassword();
    }

    return DAL.SaveUser(User);

}


string CreatePassword()
{
   string pass = "";
   for (int i = 0; i < AccountRules.PasswordMimimumLength; i++)
   {
      pass += RandomChar();
   }
}

我们更新了包含此常量的程序集,重建依赖站点并将控件发布到开发服务器。现在我创建了一个新帐户,它仍然是 8 个字符的密码!我用反射器检查了程序集,常数长度为 10。我从 GAC 中删除了该程序集,然后重新安装了新的程序集(最少 10 个字符),但仍然生成 8 个字符的密码。我们在 IIS 中重新启动了站点,但没有成功,共享点应用程序池、整个 IIS 实例、物理框和仍然是 8 个字符的密码。发生这种情况的 dll 可能缓存在哪里?我在这件事上抓狂了。预先感谢各位上帝般的专家的帮助。

We have a handful of sharepoint sites that uses various UserControls we have developed for custom stuff including authentication and authorization. On one of these sites when a new user is created by an admin it creates a password of this minumum length number of characters, saves the user info and sends an email to the users email address. All was well until.... Corporate just handed down a new policy that all users must use a 10 character minumum length password vs the previous 8. This valus is in an assembly in a static class so we can do something like

//Assembly 1 defines rules and logic

public static class AccountRules
{
    public static int PasswordMinimumLength = 10;
}


//Assembly 2 calls references Assembly 1

Status CreateUser(User u)
{
    if (u.Password == null)
    {
        u.Password = GeneratePassword();
    }

    return DAL.SaveUser(User);

}


string CreatePassword()
{
   string pass = "";
   for (int i = 0; i < AccountRules.PasswordMimimumLength; i++)
   {
      pass += RandomChar();
   }
}

We updated the assembly that contains this constant, rebuild dependent sites and published controls to the dev servers. Now I create a new account and its still making 8 character passwords! I check the assembly with reflector and the constant length is 10. I removed this assembly from the GAC and reinstalled the new one with the 10 charater minumum and still generating 8 char passwords. We restarted the site in IIS with no luck, the sharepoint app pool, the entire IIS instance, the physical box and still 8 character passwords. Where else is the dll possibly cached that this is happening? I'm ripping my hair out on this one. Thanks in advance for any help from you god-like experts.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谁对谁错谁最难过 2024-10-02 09:37:30

您可以采取一些措施来帮助尝试追踪此问题。

  1. 确保它没有复制到本地应用程序的 /bin 文件夹
  2. 使用 Fusion Log Viewer 查看实际绑定的内容

Fusion Log Viewer 很可能会为您提供所需的内容。

You have a few things that you can do to help try to track this down.

  1. Make sure that it isn't copied locally to the /bin folder of your application
  2. Use Fusion Log Viewer to see what is actually being bound

More than likely the Fusion Log Viewer will get you what you need.

凉月流沐 2024-10-02 09:37:30

我不确定您的身份验证系统的定制程度到底如何。通常我希望在成员定义内的 web.config 中找到最小密码长度限制。如果您使用某种会员模式,那么这就是我要检查的第一个地方。 (简而言之:也许它不是你的 DLL 定义的最小密码长度,即使有人在那里放了一个常量!)

I'm not sure exactly how customised your authentication system is. Usually I would expect the find the minimum password length restriction in the web.config inside the membership definition. If you're using some sort of membership model, then thats the first place I would check. (In a nutshell: Maybe its not your DLL defining the minimum password length even though someone has put a constant there!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文