异常处理:Cannot attach the file as database 'membership'.
Cannot attach the file 'D:\GitHome\cae\CAE\App_Data\membership.mdf' as database 'membership'.
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: Cannot attach the file 'D:\GitHome\cae\CAE\App_Data\membership.mdf' as database 'membersh
ip'.
解决方法,打开vs2013的sql对象资源管理器,
删除(LocalDb)\v11.0服务器下面已经存在的数据库
(LocalDb)\v11.0如果不存在,就先添加,,再删除它下面的数据库
异常处理:Cannot attach the file as database 'membership'.的更多相关文章
- Cannot attach the file as database 'membership'.
Cannot attach the file 'D:\GitHome\cae\CAE\App_Data\membership.mdf' as database 'membership'. 说明: 执行 ...
- EF架构~Cannot attach the file as database
回到目录 Cannot attach the file as database这个异常是在EF的code frist里经常出现的,解决方法很简单,只要重新启动一下V11实例即可. CMD> sq ...
- Cannot attach the file as database
Cannot attach the file as database这个异常是在EF的code frist里经常出现的,解决方法很简单,只要重新启动一下V11实例即可. CMD> sqlloca ...
- Cannot attach the file ‘{0}' as database '{1}'
EF使用CodeFirst,当使用localDB时,删除mdf文件,会报“Cannot attach the file ‘{0}' as database '{1}'”错误. 解决方法如下: 1.打开 ...
- SQL SERVER – Attach mdf file without ldf file in Database
Background Story: One of my friends recently called up and asked me if I had spare time to look at h ...
- Cannot attach the file “MvcMovie.mdf” as database “aspnet-MvcMovie”
今天在微软开发人员官网上学习asp.net mvc5入门的时候,遇到一个棘手的问题,我是按照教程一步一步操作的,但期间遇到一个自己觉得莫名其妙的问题,教程中也没有提到这个, 在添加新字段这一章节,跟着 ...
- update-database时出现Cannot attach the file
在进行Migrations时,如果直接删除了Db文件,在使用update-database时会出现Cannot attach the file发问题 解决方案:
- Attach file to database
D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA databaseName.mdf databaseName.l ...
- Logging - MVC Using Log4net Save to File and Database
第一步:创建Config文件夹和log4net.config 第二步:在log4net.confg黏贴以下配置 <?xml version="1.0" encoding=&q ...
随机推荐
- 多边形之战(bzoj 2927)
Description 多边形之战是一个双人游戏.游戏在一个有n个顶点的凸多边形上进行,这个凸多边形的n-3条对角线将多边形分成n-2个三角形,这n-3条对角线在多边形的顶点相交.三角形中的一个被染成 ...
- hdu1072(bfs)
#include<iostream> #include<queue> #include<cstring> using namespace std; int a[10 ...
- [bzoj2780][Spoj8093]Sevenk Love Oimaster_广义后缀自动机
Sevenk Love Oimaster bzoj-2780 Spoj-8093 题目大意:给定$n$个大串和$m$次询问,每次给出一个字符串$s$询问在多少个大串中出现过. 注释:$1\le n\l ...
- Substrings--poj1226(字符串)
Description You are given a number of case-sensitive strings of alphabetic characters, find the larg ...
- Borg Maze-POJ3026(bfs+最小生成树)
http://poj.org/problem?id=3026 如果一个一个普通搜处理不好的话会超时 可以连到一块搜 我觉得这个方法特别好 #include<stdio.h> #inclu ...
- google --SwitchyOmega and switchysharp ***
https://github.com/FelisCatus https://chrome.google.com/webstore/search/Proxy%20SwitchySharp%20?hl=z ...
- chapter1:using neural nets to recognize handwritten digits
two important types of artificial neuron :the perceptron and the sigmoid neuron Perceptrons 感知机的输入个数 ...
- Nerv --- React IE8 兼容方案
创建项目 创建一个目录,使用npm快速初始化 $ mkdir my-project && npm init -y 安装依赖 安装webpack以及babel $ npm install ...
- ZOJ 3228 Searching the String (AC自己主动机)
题目链接:Searching the String 解析:给一个长串.给n个不同种类的短串.问分别在能重叠下或者不能重叠下短串在长串中出现的次数. 能重叠的已经是最简单的AC自己主动机模板题了. 不能 ...
- phpexcel不能输出中文
问题描写叙述:在使用phpexcel时,假设在单元格中填充中文内容,会导致输出单元格为空的情况,甚至连中文的字符(?!等)都无法识别. 产生原因:从网上查是utf-8的问题 解决方法:能够用iconv ...