connection-string

connection string for sqlserver in Docker container

五迷三道 提交于 2019-12-18 12:51:07
问题 I'm using Visual Studio 2017 for mac with dotnet Core and EF Core. After setting up the mssql image in Docker container , I was trying to add the connection string but throwing connection error. I tried with different options such as ip address , container name , host name etc. as server name but none of them worked. "Default": "Server=172.17.0.2; Database=ERPDb; User=sa; Password =******;" with container name "Default": "Server=ecstatic_hermann; Database=ERPDb; User=sa; Password=******;"

No context type was found in the assembly

不羁的心 提交于 2019-12-18 12:47:28
问题 I'm using .NET 4.0, MVC3, and EF5 with code first. My solution is split up into three projects, with the dependencies as indicated: Project.Web -> Project.BLL -> Project.DAL The Project.DAL layer contains my entity framework data context class and all my entities, but my startup project is Project.Web, so it contains my Web.config, connection strings, and the actual SQL compact database. I'm trying to enable migrations so I can add a new table to my EF model without wiping the existing data.

MongoError: auth failed mongoose connection sting

主宰稳场 提交于 2019-12-18 12:28:23
问题 I can connect to the DB through terminal, but getting this error using mongoose and gulp. mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:246 MongoError: auth failed My connection string is: mongodb://usr:psw@localhost:27017/dbname Any idea what it can be? 回答1: I installed MEAN at https://bitnami.com/stack/mean for windows 7 When install I make password is 123456 Syntax make connect to mongodb with mongoose mongoose.connect("mongodb://[usr]:[pwd]@localhost:[port]/[db]",{auth:

the best way to connect sql server (Windows authentication vs SQL Server authentication) for asp.net app

早过忘川 提交于 2019-12-18 12:17:33
问题 I have a database and a site having forms authentication. It is working fine with VS2008. This time, I am using "Trusted_connection =True". But when it is opened from outside or directly from browser then I am getting error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'." I know this is due to permission. SQL server is based on windows authentication. What is the best approach to manage user to connect SQL Server? Should I enable SQL Server authentication? Let me know what to do so

SQL integrated security using computer name instead of user name

不羁的心 提交于 2019-12-18 11:24:20
问题 I am trying to an SQL Express instance on the same network, authenticating with my domain user. It works just fine with Windows Authentication in SSMS. I verified that I can use the MyDB database, including editing tables. However, when I try the following connection string: Server=ipaddress\SQLExpress; Database=MyDB; Integrated Security=SSPI; I get back an error: Cannot open database "MyDB" requested by the login. The login failed. Login failed for user 'ROMANIA\MONSTER2$' The problem is

SQL integrated security using computer name instead of user name

元气小坏坏 提交于 2019-12-18 11:22:08
问题 I am trying to an SQL Express instance on the same network, authenticating with my domain user. It works just fine with Windows Authentication in SSMS. I verified that I can use the MyDB database, including editing tables. However, when I try the following connection string: Server=ipaddress\SQLExpress; Database=MyDB; Integrated Security=SSPI; I get back an error: Cannot open database "MyDB" requested by the login. The login failed. Login failed for user 'ROMANIA\MONSTER2$' The problem is

Open Microsoft.practices.EnterpriseLibrary database with just a connection string

梦想的初衷 提交于 2019-12-18 09:12:29
问题 I am using the Microsoft.Practices.EnterpriseLibrary Database tools and I'm having trouble creating a new database using just the connection string information. Ideally I would like to do the following: Database dbEngine = DatabaseFactory.CreateDatabase( "Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;"); Is it possible to create a database using just the connection string? If so, how can it be achieved? 回答1: You can also do Database mydb = new

Parser Error Message: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown

◇◆丶佛笑我妖孽 提交于 2019-12-18 07:23:05
问题 I am getting this error when I am using ODP.net The error is appearing when I include a connection <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="BannerCS" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BannerCS (Web.config)" ParameterPrefix=":" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.BannerCS.ConnectionString" Provider="Oracle.ManagedDataAccess.Client" /> in the .XSD file in the

“The ConnectionString property has not been initialized” error in VB.NET

本小妞迷上赌 提交于 2019-12-18 06:58:22
问题 Every time I tried to connect to the database it give me this error "The ConnectionString property has not been initialized" what can I do to solve this? here are my codes Module Module1 Function GetInfoForStudent(ByRef QueryName As String, ByVal UserName As String, ByVal Password As String) As DataTable Using Con As New SqlConnection Try Using OleCon As New SqlConnection Dim Connection As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=G:\VB Project\Library Catalog System\Library Catalog

error occurred while establishing a connection to SQL Server

戏子无情 提交于 2019-12-18 05:42:14
问题 If I have my connection string in the web.config like this (added line feeds for better readability): <add name="conn" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=MyDB; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=D:\Products.mdf" providerName="System.Data.SqlClient"/> The connection works and I can connect to the database in the database explorer. When I specify the connectionstring in code or use ConfigurationManager to get it it doesn't work: