Windows 2003、IIS6 Web服务登录故障排除

发布于 2024-07-09 14:20:52 字数 784 浏览 6 评论 0原文

环境:

运行 IIS6 的 win2003 提供调用 delphi 代码的 asp 页面。

Delphi 代码联系需要登录的 c# webservice (login.asmx)。 Web服务日志显示登录成功。 调试结果显示 Context.User.Identity.IsAuthenticated 返回 true

登录后,delphi 代码会仔细检查是否仍然经过身份验证。 Webservice 返回 false -> Context.User.Identity.IsAuthenticated 返回 false

我们的猜测:在 IIS6 凭据(网络服务?)下运行的 delphi 代码收到的身份验证 cookie 不会保存到磁盘,因此登录会丢失。

Filemon 显示'C:\WINDOWS\Temp\Temporary Internet Files' 访问被拒绝。 授予 IIS6 用户对该文件夹的管理权限可以解决问题,但这是不可接受的,因为 cookie 在默认情况下应该起作用。

IIS5 兼容模式下运行 IIS6 可以解决问题,但也不是首选

想要的解决方案:问题的确切原因和配置中可能的最小修改(不授予 IUSR 管理员权限)一个选项)

Environment:

win2003 running IIS6 serving asp pages that call delphi code.

Delphi code contacts a c# webservice for which it needs to login (login.asmx). Webservice logs show login is successful. Debug results show that Context.User.Identity.IsAuthenticated returns true.

After login, delphi code doublechecks if it is still authenticated. Webservice returns false -> Context.User.Identity.IsAuthenticated returns false.

Our guess: authentication cookie received by delphi code running under IIS6 credentials (network service?) does not get saved to disk, so login is lost.

Filemon shows 'C:\WINDOWS\Temp\Temporary Internet Files' access denied. Giving IIS6 user admin rights on that folder fixes the problem, but is not acceptable since cookies should work by default.

Running IIS6 in IIS5 compatibility mode fixes the problem, but is also not preferred

Wanted solution: exact cause of problem and smallest modification possible in configuration (giving admin rights to IUSR is not an option)

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

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

发布评论

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

评论(2

装迷糊 2024-07-16 14:20:52

默认情况下,Cookie 确实有效,但您必须有地方存储它们。 如果您不想授予对它们存储的正常位置的访问权限,那么您将需要设置另一个可以授予权限的目录,并将其设置为 IIS6 用户的 Internet 缓存。

Cookies do work by default, but you have to have somewhere to store them. If you don't want to give access to the normal place where they are stored, then you will need to set up another directory that you can give rights to and set it up as the internet cache for the IIS6 user.

年华零落成诗 2024-07-16 14:20:52

鉴于对于此类问题,您有相当多的潜在问题,一些快速资源可能会有所帮助,请参阅 这个

IIS5IIS6 之间的一个重要区别是,Windows 2003 通过 SP1 更新进行了重大安全锁定。 有很多东西适用于Windows 2000,但在2003中却行不通(也不应该如此——它们为各种恶作剧打开了大门)。 尝试追踪 IIS6 锁定内容的所有位置可能具有挑战性,相反,我会使用上述资源来追踪人们在使用 IIS6 时遇到的常见问题。

A couple quick resources that may help, given that for this type of problem you have a fairly large number of potential issues, see this.

One important difference between IIS5 and IIS6 is that Windows 2003 underwent a significant security lockdown with the SP1 update. There are a very large number of things that worked for Windows 2000 that just will not in 2003 (and should not have - they opened the door to all sorts of shenanigans). Trying to track down all the places where IIS6 locked stuff down might be challenging, instead I would use the above resource to track down the common issues people are running into with IIS6.

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