connection-string

Need ServiceConfiguration.cscfg to populate web.config sessionstate and connection strings

試著忘記壹切 提交于 2019-12-08 17:36:30
I need to propagate connection string changes for entity framework, asp.net membership (which are both in the connectionstrings section of web.config) and session state (which is in sessonstate's sqlconnectionstring) in web.config when I adjust these settings in windows azure's service configuration. During development we test our app as a standard asp.net webforms app, but once it is deployed it is running in azure. So we need to allow for the site running in both non-azure and an azure context. That's why we're just relying upon the values in web.config for now.Since these connection strings

SQL Server Compact 'Data Directory' macro in Connection String - more info needed

巧了我就是萌 提交于 2019-12-08 17:34:16
问题 So, as described on this msdn page, when you define a Connection String for SQL Server Compact 3.5, you can use the "Data Directory" macro, like this: quote from this msdn page: Data Directory Support SQL Server Compact 3.5 now supports the Data Directory macro. This means that if you add the string |DataDirectory| (enclosed in pipe symbols) to a file path, it will resolve to the path of the database. For example, consider the connection string: "Data Source= c:\program files\MyApp\Mydb.sdf"

Changing membership connection string

微笑、不失礼 提交于 2019-12-08 17:17:29
问题 Iam new to asp.net membership & I need help to change its connection string programmatically. What I have tried till now is I have create a class project name Sample as namespace** and extends the System.Web.Security.SqlMembershipProvider code as namespace Sample { public class Connectionstring : SqlMembershipProvider { public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) { string connectionString = "server=xx.xx.xx;database=db;user id=un

How do we alias a Sql Server instance name used in a Connection String .config?

£可爱£侵袭症+ 提交于 2019-12-08 16:55:28
问题 I have two development teams, that come from different groups. Group A develops against a local default instance of Sql Server 2008 R2; Group B develops against a local named instance of Sql Server 2008 R2. Is there a way to setup an alias such that both groups are coding against the same name? As it stands right now we have a war of Connection Strings as group B changes (local) to ./DEV and group A changes it back again? 回答1: In SQL Server Configuration Manager, under the SQL server native

Change Application Name in Sql Server Profiler

China☆狼群 提交于 2019-12-08 16:49:03
问题 When profiling a .Net Application in SQL Server Profiler the default Application Name is taken from the Data Provider. How can I change this to my own Application Name? 回答1: Just add Application Name=My Application; to the Connectionstring Example: connectionString="Server=mySqlServer;Initial Catalog=myDatabase;User id=aUser;Password=aPassword;Application Name=My Application;" You can also use App=My Application 来源: https://stackoverflow.com/questions/27147192/change-application-name-in-sql

RSConfig generates a Dsn Connection String doesn't work

瘦欲@ 提交于 2019-12-08 15:02:44
问题 TL;DR . Repro steps, take a backup of your C:\Program Files\Microsoft SQL Server\MSRS13.SSRS\Reporting Services\ReportServer\RsReportServer.config Run this command to update the connection string in SSRS's config: C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn>rsconfig -c -s <ServerName> -i <instanceNameIfNotDefault> -d "reportserver$ssrs" -a SQL -u sa -p "YourSAPassword" -t Now browse to the SSRS website and it doesn't work! To fix it either restore your config file or run

Why did my Visual Studio 10 stop using App.Config for my SQL connection string?

一个人想着一个人 提交于 2019-12-08 13:32:50
问题 I have a working database application using WPF and SQL Server 2008 R2, which for two years has been getting its SQL Server connection string from the App.Config file. A few days ago on one dev machine, it started ignoring the App.Config file's connectionString, and is now using a string from somewhere else (looks like either settings.settings, or the DBML file). Why might this be happening, and how can I get it to stop doing that? The app.config starts out like this: <configuration>

Failover Partner behavior for Sql ConnectionString with ConnectionTimeout

狂风中的少年 提交于 2019-12-08 10:37:15
问题 I'm using .Net 4.0 and SqlConnection/SqlCommand to connect to a 2008 R2 SQL server that has mirroring setup. The ConnectionString specifies a Failover Partner Can anyone explain how the ConnectionTimeout setting affects the ability for a client to failover to the mirror? Ie does it always wait the ConnectionTimeout before going to the failover server? Or does the failover becoming primary mean the client will immediately switch to connecting to the failover disregarding the ConnectionTimeout?

Invalid Instance when using ADODB.Recordset

偶尔善良 提交于 2019-12-08 09:50:36
问题 I have migrated from one sever to another. I have restored my database and reset up my website. Since migrating however my website will not connect to the database I am getting the following error: Microsoft OLE DB Provider for SQL Server error '80004005' [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection. My connection string is in the form of CON_STRING = "Provider=SQLOLEDB;Data Source=myserver;Initial Catalog=mydb;User Id=user;Password=password" The error is being thrown on

How to configure ProviderManifestToken for EF CodeFirst in a Connection String

痞子三分冷 提交于 2019-12-08 08:16:35
问题 Currently, I'm passing a database name to the constructor of DbContext . In the connectionStrings section of my App.Config file, I've added a connection string and specified the provider name: <connectionStrings> <add name="myConnectionString" connectionString="[..]" providerName="System.Data.SqlClient"/> </connectionStrings> Now, I want to get the connection string from an other kind of configuration source, but a ProviderIncompatibleException is thrown. The exception contains the following