localdb

Client-side data encryption / SQL Server Express LocalDB

孤街浪徒 提交于 2019-12-11 09:50:08
问题 What are the strategies in .NET to secure semi-sensitive client-side data (so that only the application itself can use/see it)? Could the information be contained in an accompanying mdf file (used by SQL LocalDB) and still maintain the same level of security? If so, how? I understand that since we are talking about client-side application there is no absolute way to secure the data. I'm mostly looking at ways to make it difficult enough to discourage people attempting it. Ideally the solution

LocalDB works fine in Visual Studio IIS, fails when deployed to full IIS

两盒软妹~` 提交于 2019-12-11 05:41:59
问题 I have a code first localdb database in my MVC 4 project and if I run the application in Visual Studio 2012 it connects fine and everything works. When I publish to my full IIS and access the site the database cannot connect and I get : "the specified localdb instance does not exist" I've had other problems, it seems localdb is a nightmare to deploy! I followed all the advice here also: http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx

Why does EF Core always return -1 with this stored procedure?

北城余情 提交于 2019-12-11 01:55:13
问题 I am trying to use EF Core (latest release) against a Local 2016 DB and I am getting -1 back every time. I don't know what I have done wrong? I know that it is reaching the database. I checked that. int returnCode = _dbContext.Database.ExecuteSqlCommand("CheckReceivedNotificationDuplicate @p0, @p1, @p2", parameters: new[] { sendMessage.MESSAGE_TEMPLATE_NAME, sendMessage.MESSAGE_SUBJECT, sendMessage.MESSAGE_TEXT_SUMMARY }); Stored Procedure: ALTER PROCEDURE [dbo].

Unable to connect to SQL LocalDB

浪子不回头ぞ 提交于 2019-12-11 01:45:58
问题 I have a native C++ app within which I am trying to connect to a localdb instance using ADO. Having manually started my instance I can run sqllocaldb info v11.0 and see the database instance is running. My code is as follows. ADO::_ConnectionPtr spConnection (__uuidof (ADO::Connection)); spConnection->Open (L"Provider=SQLNCLI11;Server=(localdb)\\v11.0;Integrated Security=true", L"", L"", 0); The error code is DB_E_ERRORSOCCURRED (0x80040e21) and the error message is Multiple-step OLE DB

How to create local database Instance using SMO

余生颓废 提交于 2019-12-10 21:27:56
问题 I have installed localdatabase and created a shared instance, and using smo I am able to create localdatabase. For my requirement I have to create a localdb shared instance. I am creating local database using SMO like this. ServerConnection serConn = new ServerConnection(@"(localdb)\.\sharedIns"); Server ldbServer = new Server(serConn); Database db = new Database(ldbServer , "databaseName"); db.Create(); Before creating database, I am creating shared instance through command prompt using

The underlying provider failed on Open after deleting database files and sqllocaldb

二次信任 提交于 2019-12-10 14:43:47
问题 I am investigating my experience of the issue here When my Winforms XAF, Entity Framework Code First + Desktop Bridge application is installed via the Windows Store, it creates a database in the users directory. If I delete the files then I will get an error when I try to re-run the application. The underlying provider failed on Open This is because I have not dropped the database properly. As is explained in the linked issue. I tried the fix of sqllocaldb.exe stop MSSQLLocalDB sqllocaldb.exe

How to work with LocalDB and EF, without using migrations

梦想与她 提交于 2019-12-09 05:59:28
问题 I am on VS 2012 RTM, with EF 5. I am doing Code First, but trying to ignore Code Migrations since I am just in development. To avoid them, I have this set Database.SetInitializer(new DropCreateDatabaseIfModelChanges<SomeContext>()); Occasionally, even when I don't think I've touched the model, it decides to recreate. That's fine. But it usually results in the error Cannot drop database because it is currently in use. So I decided to delete the database entirely. I go into VS, go to the "SQL

localdb readonly database problems

不问归期 提交于 2019-12-08 13:35:40
问题 enviroment visualStudio 2012 localdb v11 a solution with 3 projects on it: 1st class library with an ORM database model, and a local db Localdb.mdf inside App_Data directory. 2nd is a web project that uses this database model. and 3rd a c# console project that uses this localdb database, referencing the 1st class library, and having at the app.config a localdb connection string defined as: Data Source=(LocalDB)\v11.0;AttachDbFilename=C:_work_desarrollo\Apps\Business\OpenAccessAppsModel\App

SQL Server Express connection to .mdf file

只谈情不闲聊 提交于 2019-12-08 11:54:22
问题 Two-Part Question. I have created an ASP.NET MVC 5 application using VS 2015 Update 3. I am quite a ways along with the project on my local machine. Suddenly, I can no longer connect via SQL Server Object Explorer to the .mdf database file and get the following error: The database 'aspnet-DevilsTowerMVC-20180327093314' cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported. Could not open new database 'aspnet-DevilsTowerMVC

CREATE DATABASE failed with entity framework: The system can not find the specified file

£可爱£侵袭症+ 提交于 2019-12-08 11:15:18
问题 I get this error: An exception of type 'System.Data.SqlClient.SqlException' occurred in EntityFramework.dll but was not handled in user code Additional information: Directory lookup for the file "C:\pub\LSK\Dev\src\LSK.Services\LSK.Services\App_Data\LSK.Packets.mdf" failed with the operating system error 2(The system can not find the specified file). CREATE DATABASE failed. Some file names listed could not be created. Check related errors. using (var context = new LDTContext()) { context