如何使用的LocalDB到本地IIS的Windows 7部署ASP.NET MVC 4应用程序?

问题描述:

当我尝试使用本地IIS的Windows 7和Visual Studio 2013年运行我的ASP.NET MVC 4应用程序,我碰到下面的错误当应用程序试图连接到的LocalDB \ V11.0

When I try to run my ASP.NET MVC 4 application using Local IIS on Windows 7 with Visual Studio 2013. I run into the following error when the application tries to connect to localDB\v11.0

在/应用程序中的服务器错误。

Server Error in '/' Application.

时出现与网络相关的或特定于实例的错误,而   建立SQL Server的连接。服务器是不是   找到或无法访问。验证实例名称是否正确   和SQL Server配置为允许远程连接。   (提供者:SQL网络接口,错误:50 - 本地数据库运行时   发生了错误。无法创建一个自动实例。请参阅Windows   应用程序事件日志错误的详细信息。 )

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: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details. )

2的事件日志

而试图访问的LocalDB实例时发生意外错误   注册表配置。请参阅Windows应用程序事件日志   错误的详细信息。

Unexpected error occurred while trying to access the LocalDB instance registry configuration. See the Windows Application event log for error details.

无法获取本地应用程序数据路径。最大的可能是用户配置文件   未加载。如果是的LocalDB IIS下运行,确保   信息加载启用当前用户。

Cannot get a local application data path. Most probably a user profile is not loaded. If LocalDB is executed under IIS, make sure that profile loading is enabled for the current user.

大多数解决方案我在网上找到引用这篇文章:http://blogs.msdn.com/b/sqlex$p$pss/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx

Most solutions I found online references this post: http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx

我所描述的情况和我的情况与看到的唯一区别是,所描述的错误code为0,而我的错误code为50。但是,所提出的解决方案并没有为我工作。

The only difference I see between the described situation and my situation is that the described error code is 0 whereas my error code is 50. However, the proposed solution does not work for me.

我不能让过去的这个错误,即使我设置修改setProfileEnvironment为真,我花了数小时的时间摆弄不同的中processModel参数和应用程序池。

I cannot get past this error even if I set modify setProfileEnvironment to true and I've spent hours of time playing around with different processModel parameters and application pools.

我也患上了同样的问题,但有这么小的解决方案,它只是走在IIS服务器上,而不是应用程序池从中运行应用程序,并提前应用程序池设置,我们会得到一个过程模型下有身份默认情况下是应用程序池标识选项只是将其更改为本地系统和你做

I was also suffering from same problem but there is so small solution for it just go in iis server than to application pool from which you application is running and in advance setting of application pool we will get the option of Process Model under which there is identity which is by default application pool identity just change it to Local System and your done

并记得把App_Data文件夹中的IIS服务器的WWW文件夹