当我创建一个设置和安装后我得到以下错误Plzzz帮助我 [英] When I Create A Set Up And After Installation I Got Following Error Plzzz Help Me

查看:74
本文介绍了当我创建一个设置和安装后我得到以下错误Plzzz帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试 附加自动命名的数据库  for   file  
E:\ 默认公司名称\ Cloth Invenotry \ Garment.mdf失败。
数据库 同名存在 指定 file 无法打开 it 位于 UNC分享。

(在基于winodow的应用程序中)

解决方案

当测试导入到IIS7.5并在收到错误后我总是更改下一个测试的数据库名称 - 即我从myDB01开始,第二次尝试我称之为myDB02等。



我总是选择不包含App_Data文件夹的选项,我总是添加一个custum脚本作为如下:



创建用户[SomeUserName]



登录[IIS APPPOOL \DefaultAppPool]



GO



EXEC sp_addrolemember db_datareader','SomeUserName'



GO



经过30次测试后我终于可以加载了它进入IIS7.5没有错误。最终工作的目标数据库的连接字符串是:



数据源= localhost\SQLExpress;初始目录= MyDatabaseName;用户ID = SomeUserName';集成安全性= SSPI;持久性安全信息=错误



我在web.debug.config中进行Web转换的连接字符串是:



Data Source = localhost\SQLExpress; Initial Catalog = MyDatabaseName; Trusted_Connection = Yes; Persist Security Info = False



我希望这会有所帮助

an attempt to attach an auto-named database for file
E:\ Default Company Name \Cloth Invenotry \Garment.mdf failed .
A database with the same name exists or specified file cannot be opened or it is located on UNC share.

(in winodow based application )

解决方案

When testing the import into IIS7.5 and after getting an error I always changed the database name for the next test - ie I started off with myDB01 and on the second attempt I called it myDB02 etc.

I always selected the option not to include the App_Data folder and I always added a custum script as follows:

CREATE USER [SomeUserName]

FOR LOGIN [IIS APPPOOL\DefaultAppPool]

GO

EXEC sp_addrolemember 'db_datareader', 'SomeUserName'

GO

After testing 30 times I finally was able to load it into IIS7.5 without errors. The connection string for the destination database that finally worked was:

Data Source=localhost\SQLExpress;Initial Catalog=MyDatabaseName;User ID=SomeUserName' ;Integrated Security=SSPI;Persist Security Info=False

And the connection string that I put into the web.debug.config for web transformation was:

Data Source=localhost\SQLExpress;Initial Catalog=MyDatabaseName;Trusted_Connection=Yes;Persist Security Info=False

I hope this helps.


这篇关于当我创建一个设置和安装后我得到以下错误Plzzz帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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