c# - 使用 Windows 身份验证的 NHibernate 模拟

标签 c# nhibernate sql-server-2008 impersonation

WCF 服务在 NT AUTHORITY\NETWORK SERVICE 帐户下运行,请求被其他帐户(在数据库上是管理员)模拟,但 NHibernate 抛出异常:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

有什么想法吗?

最佳答案

NHibernate 与该问题无关。这是模仿设置问题。 The solution could be found here .

关于c# - 使用 Windows 身份验证的 NHibernate 模拟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6019631/

相关文章:

如果在 WHERE 子句中使用函数,sql 查询时间从 1 秒跳到 1 分钟以上

c# - 在表单中的 tabcontrol 中与用户控件进行通信

nhibernate - 为什么 `PreCollectionUpdateEvent`不插入修改后的集合?

sql - 从 SQL 数据库中删除元组

c# - 如何将 DistinctRootEntityResultTransformer 应用于 NHibernate 中的所有查询

NHibernate:构建 session 工厂是否涉及连接到数据库?

sql-server-2008 - 从sql server中的记录中选择上个月的第一天

c# - Docx内容替换

c# - 如何借助数据集生成数据访问层

c# - 如何找到最小协变类型以使两种类型之间最合适?