0

我正在尝试使用随 Windows 7 安装的 VMWare Fusion 在 MAC 上创建 ASP .NET 用户身份验证提供程序。我创建了名为 CustomerOrders 的 SQLExpress 数据库,并在 Visual Studio 2010 的服务器资源管理器中连接到数据库。

当我尝试使用网站管理工具时,我收到此错误:在应用程序配置中找不到连接名称“ApplicationServices”或连接字符串为空。(\vmware-host\shared 文件夹\documents\visual studio 2010\Projects\CustomerOrders\CustomerOrders\web.config)

我想不通的是我需要在 Web.Config 中使用的连接字符串,以便为在 VMWare Fusion 环境中运行的该项目设置 ASP .NET 身份验证提供程序。

我的本地数据库的连接字符串是:Data Source=WIN-NOABML9MSVB\sqlexpress;Initial Catalog=CustomerOrders;Integrated Security=True

4

1 回答 1

0

首先,确保您在 web.config 中指定了连接字符串

<connectionStrings>
   <add name="ApplicationServices" 
        connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=CustomerOrders;Integrated Security=True"
        providerName="System.Data.SqlClient" />
</connectionStrings>

(请注意,我使用 .\SQLEXPRESS 而不是计算机名,以确保我使用本地命名实例)

然后,如果您还没有这样做,请确保您创建了CustomerOrders数据库并运行模式工具来创建您需要的数据库对象

于 2012-05-28T23:41:36.217 回答