尝试为文件附加自动命名的数据库 [英] An attempt to attach an auto-named database for file

查看:108
本文介绍了尝试为文件附加自动命名的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我开发了一个ASP.NET 2.0应用程序,其中使用登录控制"登录到该应用程序.

问题是当我尝试通过IIS登录应用程序时(我在IIS中为Particular应用程序创建了Virual Directoy)我无法登录..,但是当我从VS2005运行该应用程序时,我无法运行它..,然后成功登录suuccessfullu并打开所需的页面.

不知道什么是IIS的prblm,即使我尝试使用google仍未获得任何解决方案..,

任何人都可以帮助我..,

我遇到的错误是

尝试为文件C:\ Documents and Settings \ E477165 \ My Documents \ Visual Studio 2005 \ WebSites \ WebSite3 \ App_Data \ aspnetdb.mdf附加自动命名的数据库失败.存在具有相同名称的数据库,或者无法打开指定的文件,或者该文件位于UNC共享上.

Hi ,

I developed an ASP.NET 2.0 application,in that i used Login Control for logging in to the application.

The problem is when i am trying to log in to the application through IIS(I created a Virual Directoy in IIS for the PArticular application) i am not able to login in .., But when i m running the application from VS2005 i m able to run it.., and sucessfullu logged in and the required page is opening.

dont know what was the prblm for IIS , Even i tried google and not yet get any solution..,

any one plz help me..,

the error i am getting is

An attempt to attach an auto-named database for file C:\Documents and Settings\E477165\My Documents\Visual Studio 2005\WebSites\WebSite3\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

推荐答案

检查您的连接字符串,好像您正在使用"AttachDB"或您应该使用Database =
的某些东西
查找 http://connectionstrings.com/ [ ^ ]
Check your connection string, seems like you are using "AttachDB" or some thing whwn you should use Database=

Look up http://connectionstrings.com/[^]


怪异-我在错误消息中搜索并获得了很多点击.您应该尝试解释为什么您认为错误消息用普通英语说的不是导致问题的原因.
Weird - I googled the error message and got a ton of hits. You should try to explain the reasons why you believe that what the error message says in plain english, is not the cause of your problem.


这篇关于尝试为文件附加自动命名的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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