connection-string

Connect to remote MongoDB instance from ASP.NET

北城以北 提交于 2019-12-06 06:09:12
问题 I'm having some trouble nutting out why I'm unable to connect to a new database I've created at MongoHQ. I want to include the correct connection string in my Web.config file and have my Mongo object refer to that for the database connection. The connection strings (edited, obviously) are: Public Access mongo flame.mongohq.com:27065/dunedin -u {username} -p {password} AWS Internal Access mongo flame.local.mongohq.com:27065/dunedin -u {username} -p {password} Obviously, I've included my

App.Config Connection String

六眼飞鱼酱① 提交于 2019-12-06 05:37:19
In my windows form i have connection string in app.config as <configuration> <configSections> </configSections> <connectionStrings> <add name="Database" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Database.accdb" providerName="System.Data.OleDb" /> </connectionStrings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> </configuration> And in all classes i am using the following code to connect to the database. string connString = ConfigurationManager.ConnectionStrings["Database"].ConnectionString; But its not connected

How do I increase the Command Timeout in OrmLite ServiceStack?

一个人想着一个人 提交于 2019-12-06 04:53:09
问题 I am using ServiceStack OrmLite SqlServer v3.9.71 and have the following connection string: <add key="ConnStr" value="Data Source=my-db;Initial Catalog=Users;Integrated Security=SSPI;Connection Timeout=666"/> and am using the following to run a query which takes 2-3 minutes to come back: using (Db) { var result = new ResultDto(); Parallel.Invoke( () => { result.StatOne = Db.Dictionary<DateTime, int>(query1); }, () => { result.StatTwo = Db.Dictionary<DateTime, int>(query2); } ); return result;

How to use encrypted connection string on app.config with Dataset.xsd generated by Wizard on Windows Form

丶灬走出姿态 提交于 2019-12-06 04:34:28
I'm developing an MDI application with Visual Studio 2013 (.NET 4.5) and Oracle Developer Tools latest release. I need to create a main form that then will be the container for many different forms, each of which will be a different application. The application have to connect to different Oracle databases and now I'm trying to set the main form to keep all the connection strings encrypted and possibly on a separate file. For now the connection string is only one. To encrypt the connection string I've used the aspnet_regiis method described on those articles: Web Config Encryption/Decryption

The configuration section 'connectionStrings' cannot be read because it is missing a section declaration

好久不见. 提交于 2019-12-06 03:33:39
问题 I am trying to move my webpage(c#) to ISS 7.5 server. I have read that i need to put the in WEBCONFIG to achieve the conection with sql server 2008. I already did that. Here is my WEBCONFIG <?xml version="1.0" encoding="UTF-8"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionstrings> <!-- <remove name="LocalSqlServer" /> --> <add name="conexionsql" connectionstring="Data Source

Connection string security in .net desktop application

拈花ヽ惹草 提交于 2019-12-06 03:29:37
问题 i'm developing a .net winforms desktop application intended to be run at several bank's branches as a backup application whenever the main one (a web application) is unavailable due to connection issues with the bank's central node. The branchs themselves don't count with any enterprise services besides a SQL-Server database. For that reason, the application should be able to connect directly to the SQL-Server. My problem arises when I have to provide the application with a password to

OLEDBConnection.Open() generates 'Unspecified error'

廉价感情. 提交于 2019-12-06 03:05:05
I have an application that uploads an Excel .xls file to the file system, opens the file with an oledbconnection object using the .open() method on the object instance and then stores the data in a database. The upload and writing of the file to the file system works fine but I get an error when trying to open the file on our production server only . The application works fine on two other servers (development and testing servers). The following code generates an 'Unspecified Error' in the Exception.Message. Quote: System.Data.OleDb.OleDbConnection x = new System.Data.OleDb.OleDbConnection(@

How to access a connection string from within a library

五迷三道 提交于 2019-12-06 02:38:20
问题 I have a web project (mvc) and data access layer in a separated class library project. I need to access to a connection string in app.config which sits in that library project. ConfigurationManager.ConnectionStrings[0].ConnectionString pulls something strange. I don't have this kind of settings neither in the library's config nor in the web project's config files. the App.config looks like that: <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings> <add name=

Transferring saved data connections between Visual Studio installations

你说的曾经没有我的故事 提交于 2019-12-06 02:33:51
I use the data and schema comparison tools in Visual Studio a great deal. I just finished installing VS 2010 on a new VM and realized, of course, that all the saved data connections from my previous installation are not available. Is there a way to transfer these connections between installations of VS 2010? I believe you just copy the file from C:\Users\<username>\AppData\Roaming\ Microsoft\VisualStudio\10.0\ServerExplorer\DefaultView.SEView from the installation with the data connections to the same location in the VM. 来源: https://stackoverflow.com/questions/5173406/transferring-saved-data

Excel VBA; Updating a connection string

雨燕双飞 提交于 2019-12-06 02:24:22
I'm just trying to get VBA to update an OLEDB connection string. When I step through the code, I don't get any errors but the connection refresh fails and when I examine the connection string in the UI, it's obvious that my code has not changed it at all (hence the refresh failure). What have I missed? Here is the code: Sub UpdateQueryConnectionString(ConnectionString As String) With ActiveWorkbook.Connections("Connection Name"). _ OLEDBConnection .Connection = StringToArray(ConnectionString) End With ActiveWorkbook.Connections("Connection Name").Refresh End Sub The ConnectionString being fed