确定 IIS 5 的 IIS 用户
我正在为 Web 应用程序编写基于 Wix 的安装程序,并希望对其安装的文件夹设置权限,以便 IIS 可以访问它们。
IIS 6 和 7 分别使用 IIS_WPG
和 IIS_USRS
,IIS 5 使用 IUSR_COMPUTER NAME
。但是,如果用户更改了计算机名称,则使用当前计算机名称设置权限将失败。
有没有一种方法可以以编程方式确定 IIS 5 使用的用户帐户,而不是仅仅假设它是 IUSR_COMPUTERNAME
?
I'm writing a Wix-based setup for a web application and would like to set permissions on the folders it installs so that IIS can access them.
IIS 6 and 7 use IIS_WPG
and IIS_USRS
respectively, and IIS 5 uses IUSR_COMPUTER NAME
. If the user has changed their machine name however, setting permissions using the current computer name fails.
Is there a way of programmatically determining the user account being used by IIS 5 rather than just assuming it will be IUSR_COMPUTERNAME
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我这样做(不要假装提供最佳实践解决方案) - 这是一个直接 CA,它设置您稍后可以使用的属性:
其中 GetAccountDomain 方法定义如下:
希望这会有所帮助。
I'm doing it like this (don't pretend to offer the best practice solution) - that's an immediate CA which sets the properties you can use later:
where the GetAccountDomain method is defined like this:
Hope this helps.