无法连接到命名的共享LocalDB实例

roc*_*cky 2 iis localdb

我花了几个小时没有成功.任何帮助appriciated:

我创建了LocalDB实例

sqllocaldb create test
Run Code Online (Sandbox Code Playgroud)

我开始那个例子

sqllocaldb start test
Run Code Online (Sandbox Code Playgroud)

我与拥有原始实例的同一用户帐户共享该实例

sqllocaldb share "domain\user" test testShared
Run Code Online (Sandbox Code Playgroud)

两个实例都处于"运行"状态.

我启动MS SQL Management studio并尝试连接到实例.结果:

我可以使用命名管道连接到两个实例 - 好的.

我能够连接到(localdb)\ test - 确定.

我无法连接到(localdb)\.\ testShared - 不行.

错误信息:

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) (Microsoft SQL Server, Error: 2)

有任何想法吗?我试过4台不同的电脑.它在其中两个上正常工作.3个计算机连接到域(因此它可能与域环境无关).

在SQL配置管理器中 - 启用所有协议.

我需要实现的 - 根据与IIS APPPOOL\ASP.NET v4.0帐户共享LocalDB实例.

Krz*_*zyk 12

根据您描述的确切步骤,您需要做的就是重新启动实例.共享它之后需要它,以便它使用共享进程分配给它的已知名称来侦听公共管道.