错误:50 - 发生本地数据库运行时错误 [英] error: 50 - Local Database Runtime error occurred

查看:432
本文介绍了错误:50 - 发生本地数据库运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写C#作为一种业余爱好,最近决定开始学习的插件和ASP.NET出局,以扩大我的技能。不过,我最近一直与SQL的LocalDB(2014年)问题和WingtipToys由 asp.net 。

I program C# as a hobby and recently decided to start learning the ins and outs of ASP.NET as to expand my skill set. However, I recently been having issues with SQL LocalDB (2014) and the "WingtipToys" project provided by asp.net.

正如标题所说,我得到这个错误:错误:50 - 发生本地数据库运行时错误(图片提供)

As stated in the title, I get this error: error: 50 - Local Database Runtime error occurred (picture provided)

在这里输入的形象描述

我曾尝试以下解决方案来纠正这个问题:
-Installed SQL Server的防爆preSS 2014年,而不是仅仅的LocalDB

I have tried the following solutions to rectify this problem: -Installed SQL Server Express 2014 rather than just the LocalDB

-Restarting服务

-Restarting the service

- 创建通过命令行另一个本地分贝

-Creating another local db through the command line

在我的连接字符串 - 使用MSQLLocalDB <添加名称=WingtipToys的connectionString =数据源=(的LocalDB)\\ MSSQLLocalDB; AttachDbFilename = | DataDirectory目录| \\ wingtiptoys.mdf;集成安全性= TRUE 的providerName =System.Data.SqlClient的/方式>

-using MSQLLocalDB in my connection string <add name="WingtipToys" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\wingtiptoys.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />.

-Adding

<add name="ASP.NET v4.0" autoStart="true" managedRuntimeVersion="v4.0"     managedPipelineMode="Integrated">
<processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />


到对ApplicationHost.config。我找不到任何地方,要么,我的电脑上快速搜索变成了这样:
为了安全起见,我把它添加到所有的人。不过,这并不影响什么。我周围的一派希望看看别人的失踪,但好像我是唯一一个与此特定问题。

to the applicationhost.config. I could not find it anywhere either, a quick search on my computer turns this up: just to be safe, I added it to all of them. However, this did not affect anything. I googled around looking to see if anyone else's was missing, but it seems as though I am the only one with this specific issue.

-Checked,看看 SQL Server代理(SQLEX preSS)正在运行。 (这是)

-Checked to see if SQL Server Agent (SQLEXPRESS) was running. (it was)

有我丢失的东西?我不明白为什么我不断地得到,即使我已经尝试了所有列出的解决方案,这个错误。我看着在事件查看器,但它并没有给我任何信息超出服务器给了我。

Is there something I am missing? I don't quite understand why I continually get this error even though I have tried all of the solutions listed. I looked in event viewer, but it didn't give me any information beyond that that the server gave me.

我正在的Windows 10 SQL Server的防爆preSS 2014年64与工具如果这些信息帮助

I am running Windows 10 with SQL Server Express 2014 x64 with Tools if that information helps.

推荐答案

我不知道我做了什么来修复它,但我几乎可以肯定它是制造在服务器数据库的连接。我使用本教程没去了那一部分,所以我认为这是行不通的。然而,现在的工作。

I don't know what I did to fix it, but I am almost certain it involved creating the connection in the Server Database. The tutorial I was using didn't go over that part, so I assumed that it wouldn't work. However, it works now.

这篇关于错误:50 - 发生本地数据库运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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