我正在尝试使用随Windows7一起安装的VMWare融合在MAC上创建ASP.NET用户身份验证提供程序。我已经创建了名为CustomerOrders的SQLExpress数据库,并在Visual Studio2010的服务器资源管理器中连接到数据库。
当我尝试使用网站管理工具时,我收到此错误:在应用程序配置中找不到连接名称'ApplicationServices‘,或者连接字符串为空。(\vmware-host\shared folders\documents\visual studio 2010\Projects\CustomerOrders\CustomerOrders\web.config)
我不能确定的是我需要在Web.Config中使用的连接字符串,以便为在VMWare融合环境中运行的此项目设置ASP身份验证提供程序。
到本地数据库的连接字符串是: Data Source=WIN-NOABML9MSVB\sqlexpress;Initial Catalog=CustomerOrders;Integrated Security=True
发布于 2012-05-29 07:41:36
首先,确保您有connection string specified in your web.config
<connectionStrings>
<add name="ApplicationServices"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=CustomerOrders;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>(请注意,我使用.\SQLEXPRESS而不是计算机名称,以确保使用本地命名实例)
然后,如果您还没有这样做,make sure you create the CustomerOrders database and run the schema tool to create the database objects you need。
https://stackoverflow.com/questions/10779817
复制相似问题