关于用ATL写的COM(ASP调用的)一个奇怪的问题

Fzyan 2003-08-21 08:41:39
初次用VC中的ATL写COM组件(ActiveX Server Component),遇到一个奇怪的问题。

COM在系统中注册后,在ASP页面中调用,必须得在IIS中设置这个页面所在目录的目录访问权限, 而且还得设定的比较高的权限(超级管理员级别)才能运行。如果用默认的那个用户IUSR_..还不行,有没有什么办法不要这样呢,因为设定了目录的访问权限,其他用户访问的时候都得输入用户和密码,就是开始设定的那个。这样很不安全。

iusr_是IIS的默认的执行帐号,但是这个帐号不能执行那个写的COM,只有admin权限的才可以。
但是对于每个用户访问页面的时候都要输入admin权限的帐号,对系统来说是多么的不安全。

更具体的情况是这样的。这个实际是和我们自己系统的一个在web方面的接口,这个COM把我们自己系统内部定义的内部通讯和访问数据库的函数操作封装起来了,需要调用其他几个封装了系统一些公共接口的dll,但是这些dll不是COM。
我想就是因为这个引起的。

...全文
24 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weseen 2003-08-22
  • 打赏
  • 举报
回复
我也遇到这样的问题,不过有很多种解决方法,这个方法最简单实用:
======================================================================
IIS has one small problem. when the rights of the IUSR_<<machine_name>> changes, IIS doesn't seem to refresh these in its database. So, what happens is, even after the rights of these accounts have been modified on the domain controller, IIS continues with thse settings. So, when actual authentication happens with the domain server, it fails. I think that's what has happened in ur case also. what u could do is, go to Intyernet Services Manager. Go to Default Web Site properties -> Directory Security -> Anonymous Access User Account section. Select an account different from IUSR_<<machine_name>> and click on apply to close the properties box. Again open the same box and use the browse button to select IUSR_<<machine_name>> as the account to be used for anonymous access. Stop ur IIS services and start them once. This shd solve ur problem. Good Luck !!!
===============================================================================

这篇原文出自:http://www.experts-exchange.com/Web/Web_Languages/Q_20366335.html
Fzyan 2003-08-22
  • 打赏
  • 举报
回复
顶一顶。谢谢。

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧