"连接字符串指定本地SQL Server防爆preSS例如&QUOT ;,只是它不 [英] "The connection string specifies a local Sql Server Express instance", Except it Doesn't

查看:301
本文介绍了"连接字符串指定本地SQL Server防爆preSS例如&QUOT ;,只是它不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想部署一个asp.net应用程序使用一个SQL Server实例的ApplicationServices会员数据库服务器。

问题是,我收到说

错误

  

连接字符串指定本地SQL Server防爆preSS实例
  使用应用程序App_Data目录中的数据库位置


我得到这个错误,当我最初试图部署 ASPNETDB.MDF 本身与应用程序。

我得到这个错误,当我再放弃了这个计划,并决定做一个的web.config 转换,以便在调试我用的是防爆preSS数据库,但在释放连接字符串去到SQL Server。

我再次得到这个错误,当我决定出于好奇从code删除对前preSS数据库中的所有引用,所以有可能是没有可能的方式事情要寻找防爆preSS数据库。没有运气。

有没有人对此有什么想法?我已删除,每次重新安装在IIS网站,并指出,没有任何的App_Data正在部署之中,没有提及在web.config中的.mdf文件 - 无济于事。它仍然认为有一个连接字符串,告诉它寻找一个SQL Server防爆preSS数据库:/

编辑:下面是我使用的连接字符串。 pretty的标准,我想,但我总能是错误的。

 数据源= HERP;初始目录= DERP;集成安全性= TRUE


解决方案

能否错误指从的machine.config 文件的默认连接字符串( LocalSqlServer 一个)?这可能会发生,考虑到默认成员资格提供程序使用此连接字符串


  

下面的默认成员资格元素在配置
  machine.config文件[...]:


  
  

<&籍GT; 结果
  <供应商> 结果
  <添加名称=AspNetSqlMembershipProvider[...] 结果
  的connectionStringName =LocalSqlServer这个[...]


I'm trying to deploy an asp.net application to a server using a SQL Server instance for the ApplicationServices membership database.

The problem is, I'm getting an error that says

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory

I got this error when I initially tried to deploy the aspnetdb.mdf itself with the application.

I got this error when I then scrapped that plan and decided to do a web.config transform so that in Debug I use the Express database, but on Release the connection string goes to SQL Server.

I got this error again when I decided out of curiosity to remove all references to the express database from the code, so there could be no possible way anything would be looking for the Express database. No luck.

Does anyone have any ideas about this? I have deleted and re-installed the web site in IIS each time, noting that there is no App_Data being deployed and no mention of the .mdf file in web.config - to no avail. It still thinks there's a connection string telling it to look for a SQL Server Express database :/

Edit: Here's the connection string I'm using. Pretty standard, I think, but I could always be wrong.

Data source=HERP;Initial Catalog=DERP;Integrated Security=True

解决方案

Could the error refer to the default connection string from the machine.config file (the LocalSqlServer one)? This could be happening, considering that the default membership provider uses this connection string:

The following default membership element is configured in the Machine.config file [...]:

<membership>
<providers>
<add name="AspNetSqlMembershipProvider" [...]
connectionStringName="LocalSqlServer" [...]

这篇关于&QUOT;连接字符串指定本地SQL Server防爆preSS例如&QUOT ;,只是它不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆