localdb

Can't connect to Database to execute Identity functions

夙愿已清 提交于 2020-01-15 03:52:41
问题 I've created a new application with ASP.NET MVC5, using Individual User Accounts for security and Code-First Migrations for the Models/Database modeling. All options are default. I want to setup custom Users and Roles to it, so i created a Seed using RoleManager and UserManager just to populate the Database. It works fine, create 3 Users, 3 Roles and set each User's Role correctly. I can log in to the application correctly. The problem is that i can't execute any Identity method using the

IIS applicationHost 'setEnvironment' attribute

二次信任 提交于 2020-01-11 07:24:09
问题 <add name="ASP.NET v4.0" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated"> <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" /> </add> I'm adding that in appliationHost config of IIS to solve localDb problem in IIS what I see in this article http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx Can you guys help me to avoid this error? Unrecognized

Is there a difference between SQL Server Express (2012) and LocalDB?

喜夏-厌秋 提交于 2020-01-09 04:13:40
问题 In his excellent and popular comparision chart, ErikEJ draws a distinction between SQL Server Express 2012 , and SQL Server 2012 LocalDB . However, I can't find such a distinction anywhere else in the MSDN documentation ("LocalDB" isn't even mentioned in the official MS SS12 book or on the MSDN SQL Edition comparison page.) This leads me to suspect that Express and LocalDB aren't really two separate products as ErikEJ suggests, but rather just two different terms for the same thing (which

Issue when deploying an ASP.NET MVC + LocalDB application

久未见 提交于 2020-01-04 13:36:34
问题 I have deployed my ASP.NET MVC 5 application on a server but it crashes on every page using the localdb. Yet I copied the App_Data folder where the .mdf file is located. And I even installed SQL Server 2012 Express on the machine. Nevertheless every time I get the same error. Le fichier spécifié est introuvable Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated

Determine if SqlLocalDB is installed

守給你的承諾、 提交于 2020-01-04 04:11:22
问题 I am searching for a way to determine in WiX if SQLLocalDB is installed or not. How can I do this? - Can I check a registry-key? - When yes, which key? 回答1: A RegistrySearch should do it: <Property Id="LOCALDB"> <RegistrySearch Id="SearchForLocalDB" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer\CurrentVersion" Name="CurrentVersion" Type="raw" /> </Property> That would get you the version. 回答2: Checking from the registry may not work all the time becasue

Azure storage emulator cannot connect to LocalDB

拜拜、爱过 提交于 2020-01-02 08:55:30
问题 I have a problem with the Azure storage emulator, which refuses to connect to LocalDb. It used to work just fine before I created an ODBC connection to it using the named pipe. What happened: I needed to access the data in my database from Mathematica, so I generated an ODBC connection. ODBC could not connect to (localdb)\v11.0, so I used a named pipe instead. Since then, Azure has stopped to work. I upgraded to SDK2.0, but it did not help. I tried to run DSInit.exe, but I get: Found SQL

Connect to SQL Server localdb JDBC [duplicate]

邮差的信 提交于 2020-01-02 03:30:26
问题 This question already has answers here : Connecting to SQL Server LocalDB using JDBC (4 answers) Closed 5 years ago . I installed Microsoft SQL Server 2012 Express localdb on my system. After I created (and started) a Instance (Test) with an database (db1) I tried to connect with my java-Applikation. The driver ist "com.microsoft.sqlserver.jdbc.SQLServerDriver". My connection-string is "jdbc:sqlserver://(localdb)\Test;databaseName=db1;schema=db1;" Error (truncated): java.net

how does one programmatically create a localdb .mdf?

眉间皱痕 提交于 2020-01-01 15:40:47
问题 how does one programmatically create a localdb .mdf? acceptable solutions exclude visual studio, ssms, aspnet_regsql. a naive stab at a solution might look like this: static void Main(string[] args) { using (var con = new SqlConnection(@"Integrated Security=SSPI;Data Source=(LocalDb)\v11.0;AttachDbFilename=test.mdf")) { con.Open(); using (var cmd = new SqlCommand("CREATE DATABASE test", con)) { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } } } but of course, this fails in

how does one programmatically create a localdb .mdf?

。_饼干妹妹 提交于 2020-01-01 15:39:53
问题 how does one programmatically create a localdb .mdf? acceptable solutions exclude visual studio, ssms, aspnet_regsql. a naive stab at a solution might look like this: static void Main(string[] args) { using (var con = new SqlConnection(@"Integrated Security=SSPI;Data Source=(LocalDb)\v11.0;AttachDbFilename=test.mdf")) { con.Open(); using (var cmd = new SqlCommand("CREATE DATABASE test", con)) { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } } } but of course, this fails in

How to connect to SQL Server LocalDB using Invoke-Sqlcmd?

浪尽此生 提交于 2020-01-01 09:00:12
问题 I have sqlcmd.exe from both SQLServer 2008 and SQLServer 2012: PS C:\> Get-Command sqlcmd.exe Definition ---------- C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE By modifying $env:PATH i force the use of sqlcmd.exe from SQL Server 2012: PS C:\> $env:PATH = ($env:PATH -split ";" | Where-Object { $_ -notlike "*\Microsoft SQL Server\100\*" }) -join ";" PS C:\> Get-Command sqlcmd.exe Definition ---------- C:\Program