【发布时间】:2017-09-29 22:17:12
【问题描述】:
我的场景是:我有 3 台单独的机器用于域控制器 (Windows 2008)、SQL Server 2008 和 IIS (Windows 7)。
我正在使用 SQL Server 触发器(删除、更新、插入)维护表日志,
通过将suser_name() 设置为默认值,例如:
- 表 1:TrNo Bigint、TrDate 日期时间、CDate 作为日期时间
- Table1_Log:TrNo Bigint、TrDate Datetime、CDate as datetime、AuditUser Varchar(100) 默认 suser_name()
每当用户更新任何记录时,它都会维护其日志表。我的问题是它总是在配置为 IIS 的日志表中显示相同的 ComputerName。
我在 IIS 中做了什么:
Application -
Anonymous Authentication - Disabled
ASP.Net Impersonation - Disabled
Basic Authentication - Disabled
Form Authentication - Disabled
Windows Authentication - Enabled
Application Pools -
Default Application Pool
Identity - Network Services
--------------------------------------------------------------
现在,当我运行该应用程序时,它会显示一个 Windows 对话框,其中用户输入了他的 Domain\UserName,当我编辑任何记录时,它会将我的计算机名称保存到 AuditUser 列(即:suser_name())。
我想保存在 Windows 对话框中输入的实际用户名。 suser_name()
谢谢
【问题讨论】:
标签: asp.net sql-server-2008 iis-7