configuration - ASP.NET Web API : Project requires SQL Server Express

标签 configuration asp.net-web-api sql-server-express

我在 VS 2010 下创建了一个 Web API 项目。 当我切换到 VS 2012 后,我总是收到警告:

The Web project 'xxx' requires SQL Server Express, whcih is not installed on this computer. [...]

我不想安装此 SQL Server Express。我使用 IIS 进行调试。 如何禁用此依赖项?

我在我的 web.config 中也注意到了这一点:

<connectionStrings>
    <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|[...].mdf;Initial Catalog=[...];Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
  </connectionStrings>

谁创造了这个?我可以删除这个吗?

最佳答案

将连接字符串“Data Source=.\SQLEXPRESS”的这一部分更改为

“数据源=localhost\SQLEXPRESS”

关于configuration - ASP.NET Web API : Project requires SQL Server Express,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13699921/

相关文章:

asp.net-web-api - AutoFac 与 Web Api,仍在寻找无参数构造函数

javascript - 如何在 AngularJS 应用程序中预览 PDF 文件?

asp.net - 有没有办法以编程方式将 blob/富文本备忘录存储为 rtf,而不是数据库?

json - 从 WebApi 获取 "No action was found"

c# - 使用 SQL Server Express 在 SqlCmd 中运行 SQL 脚本

c# - 如何从 SQL 数据库添加组合框项目?

java - 复杂的 MapReduce 配置场景

PHP 未加载配置文件

configuration - 如何在 Zend Framework 2 应用程序中的模块的 getConfig() 中使用 global.php/local.php 配置?

apache - 除了创建符号链接(symbolic link)之外,a2ensite 还能做什么?