Visual Studio服务器资源管理器添加数据连接(从App_Data附加mdf文件) [英] Visual Studio Server Explorer Add Data Connection (Attach mdf file from App_Data)

查看:153
本文介绍了Visual Studio服务器资源管理器添加数据连接(从App_Data附加mdf文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在用AP.NET开发购物车. 2天前,我在"SQL SERVER 2008 R2"中创建了一个数据库.它创建成功,一切正常.然后,我将名为"ESTORE"的数据库复制到我项目的App_Data中.但是,现在我想在服务器资源管理器=>数据连接=>添加数据连接"中添加它.每次它给我一个错误,例如尝试为文件C:\ Users \ cYpH3R x3r0 \ My Documents \ Visual Studio 2010 \ Websites \ New \ App_Data \ ESTORE.mdf附加一个自动命名的数据库失败.存在具有相同名称的数据库,或者无法打开指定的文件,或者该数据库位于UNC共享上.

这里给出了链接,它最能描述我的问题.
http://i1066.photobucket.com/albums/u401/sherry1232/errorpng.png

抱歉,如果这个问题听起来很丑,我是ASP.NET和SQL Server的新手(最近从PHP切换)

Hello guys
I am developing a shopping cart in AP.NET. 2 days ago i created a database in "SQL SERVER 2008 R2". It was created successfully and everything went fine. I then copied that Database named "ESTORE" to the App_Data of my Project. But now i want to add this in "Server Explorer => Data Connections => Add Data Connection". and everytime it gives me an error like an attempt to attach an auto-named database for file C:\Users\cYpH3R x3r0\My Documents\Visual Studio 2010\Websites\New\App_Data\ESTORE.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Link is given here, that describes my problem best.
http://i1066.photobucket.com/albums/u401/sherry1232/errorpng.png

Sorry if that questions sounds ugly, i am new to ASP.NET and SQL Server (Recently Switched from PHP)

推荐答案

使用的数据连接,因为Coz App_Data文件夹具有更高的级别安全,并且更难以访问
used data connection instead, coz App_Data folder has higher security and is more difficult to access


这篇关于Visual Studio服务器资源管理器添加数据连接(从App_Data附加mdf文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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