web.config/connection string problem

Ok, I have searched everywhere and not been able to find an answer yet so I hope someone can help me. I have an application that uses a key in the web.config file to reference a connection string to SQL Server 2000. In the development environment, this works as expected. However, when I edit the web.config file to reference a new database (initial catalog) it doesn't seem to register. I will receive an error that the user could not log on to database X, even though the connection should now be referencing database Y. This only happens when attempting to execute an ADO.NET command. I have looked everywhere in the code and I am sure that there are no hard coded connection strings...every command, data adapter, etc is pointing to the key in the web.config file. If anyone has any ideas I would really appreciate it. The only other thing that may be relevant is that I am using Source Safe. I don't know why that would matter, but who knows. 

Thanks for any help!
0
developer_chris
12/15/2003 6:20:55 PM
asp.net.config-deploy 12495 articles. 0 followers. Follow

0 Replies
570 Views

Similar Articles

[PageSpeed] 29

Reply:

Similar Artilces:

web.config/ADO.NET command/connection string problem?
Ok, I have searched everywhere and not been able to find an answer yet so I hope someone can help me. I have an application that uses a key in the web.config file to reference a connection string to SQL Server 2000. In the development environment, this works as expected. However, when I edit the web.config file to reference a new database (initial catalog) it doesn't seem to register for some of the command objects (based on stored procs). I will receive an error that the user could not log on to database X, even though the connection should now be referencing database Y. This only happens w...

Updating Web.Config( ^SqlConnectionString^ was not found in web.config. Connection String was not updated).
hi ppl i installed the forum and when it was fininshed im not getting the fierst screen. when i wrote it myself on the explorer http://localhost/Forums it gave an error like this:::::::::::::::    Login failed for user 'amit'. Reason: Not associated with a trusted SQL Server connection 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 in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'amit'. Reason:...

web.config, app.config Connection strings
Hi all,   My difficulty is the configuration of the following Connection String.    <connectionStrings>        <add name="RMS_DAL.My.MySettings.RMSConnectionString" connectionString="Data Source=DEV01;Initial Catalog=RMS;Integrated Security=True"            providerName="System.Data.SqlClient" />    </connectionStrings>    In visual Studio  I have a 3 tier "Solution" like this  &nb...

OLEDB Connection problem using Connect String from Web.config
Hi,Cananybody tell me why I am getting the following error for the following code below An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'. "Ppp" is a connection defined in Web.config which works with SqlDatasource in the application. DataSet RunQuery(String QueryString) { String ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["Ppp"].ConnectionString; OleDbConnection DBConnection = new OleDbConnection( ConnectionString); OleDbDataAdapter DBAdapter; DataSet ResultsDataSet = new DataSet(); M....

the problem for connection string in web.config
I used one line in web.config <add key="ConnectionString" value="User ID=user;Password=user;Initial Catalog=Dashboard;Data Source=database_prod"/>to connect the production database. it works fine.I created a instance of the production database. then I used same line. just changed  the name. .<add key="ConnectionString" value="User ID=user;Password=user;Initial Catalog=Dashboard;Data Source=database_Dev"/>to connect the development database I was not able to log into. login fails. I don't know if code problem or set up database problem   Try including the ad...

seriously confused about connections strings, app.config, web.config ...
I have a web application that comprises the following: A web project (with a web.config file containing a connection string - but no data access code in the web project) A data access project that uses LINQ-SQL classes to provide entities to the web project UI (this project has a settings file and an app.config - both of which have connection strings) When I build and deploy, there is no settings file or app.config in the Bin directory with the data access .dll, but changing the connection string in the web.config file doesn't change the database accordingly - so ...

Problem changing connection string in web.config
Hi, I've copied my database to a testing server and I went in to change my web.config connection string to the new location, but now when I try to run my app I get the following error: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) The app was running fine.  All I changed was the data source, user id, and pass...

Problem in connection String in the web.config file
i m new to the asp.neti m creating a connection in the web.config file . and in the page load i m adding a new connection .but it will show the following error.The configuration is read only. conn.ProviderName = "System.Data.OleDb" configurationmanager.ConnectionStrings.Add(conn)    Jeeban in the webconfig: <connectionStrings> <add name="Servers" connectionString="server=STAGE2\SQLEXPRESS;DataBase=xxxxxx;Integrated Security=true" providerName="System.Data.SqlClient"/> </connectionStrings>   IN your app to create connection: _c...

Problem: move the connection string to the web.config file.
Hello, I have created a dataset in Web Matrix but i want to move the connection string to the web.config file. In ASPX file i have: .... Function dsContent(ByVal page As String, ByVal name As String) As System.Data.DataSet   Dim connectionString As String = System.Configuration.ConfigurationSettings.AppSettings.Get("connectionString");   Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)   ... In my web.config I have this: <appSettings>   <add key="connectionString" value="Provide...

Problem Consuming webservice
I am trying to access an web service which checks the connection string and passes a cookie to let the user access the data. I have a problem with the connection string. web config file is pasted after error.  This is the code i am using and the error is as below:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Xml;using Breakingviews.www.BreakingViewsWebService;using Breakingvi...

web.config connection string encryption using DPAPI
Hello, I have encrypted the connectionStrings section of my web.config using DPAPI. I use the below command. The problem is that once the connectionStrings section has been encrypted I get some errors in the web.config - "The 'configProtectionProvider' attribute is not declared" AND "The element 'connectionStrings' has an invalid child element 'EncryptedData'"  I have searched these forums and googled the problem. The only explanation I can find is to say this encryption method will not work with ...

connection Mysql C#.net in web.config problem help
 webconfig this code <connectionStrings> <add name="planku" connectionString="Server=localhost;user id=root;password=;database=planku;" providerName="mysql.data.mysqlclient"/></connectionStrings> <system.web><sessionState timeout="60" cookieless="AutoDetect" regenerateExpiredSessionId="true"/> <compilation debug="true" strict="false" explicit="true"><assemblies> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, Publ...

Web Deployment Project - Config Properties
I'm using a Web Deployment Project to compile my web site. In the Property Pages - Configuration Properties - Deployment section, there is an option to 'Enable Web.config file section replacement'. I have this working to replace certain sections of my web.config for each build config (release/staging/dev). I think this makes sense so other developers do not have to remember to change the web.config file. HOWEVER, this only seems to work when replacing parts of web.config; such as appSettings, connectionString, etc. This would require me to have separate config files for each section and bui...

app.config and web.config problems
Hi all, I've structured my application in the following way.:1. I've created a library project (.dll) with the BLL and DAL (built using the DataSet VS 2005 designer), at this moment I was asked to put the connection string inside of an app.config file (decrypted).2. In a second project (Web Application) I've put a reference for the .dll mentioned above.3. When I ran the web project for the first time I've got an error indicating that the .dll didn't find the connectionstring used to build the DAL so after some tips I performed a "copy and paste" from app.config...

Why we use Web.Config File for connection string wether we can use class Library for get connection for whole web Application
 Why we use Web.Config File for connection string wether we can use class Library for get connection for whole web Application  please help me? Friend, Web.config has its own advantages. 1) Web.Config is used to store the important information like connections strings etc...so that it can be modified even after the code has been    deployed to the server without compiling the entire application again. 2) Since it is a XML file, there is no need of building the project of you are going to change the connection strings.   If you go for the class files,...

running 2 web.configs in the same website 1 in /web.config and one in /swf/web.config
Im having issues doing this. and when i remove the authentication from the swf/web.config it still doesnt seem to be applying to the child website at all. Whats the proper way to set a child website? Thanks!!  The lower most web.config overrides all previous settings. So if you remove the section from the /swf/web.config whatever settings you have in the web.config in the next higher level will have an effect on the content of the child folder.So instead of removing a section, try giving appropriate settings in the /swf/web.config....

Get connection string from web.config and secure that connection
Hi, I store my connection string on my web.config file, and I want to create a new connection on c# like:SqlConnection con = new SqlConnection();con.ConnectionString= //connection string on web.config fileAfter that, The connection string on the web.config file is in clear text and I want to make it secure but easy to work because this job is to deliver until friday. Is there any easy way to do this and keep the possibility of creating a new connection and making reference to this connection string without need for decrypt data?Thanks, please help!Best regards,David Ribeiro After reading t...

web.config having multilple connection string name with same connection.
Issue 1:   <add name="Conn1" connectionString="Data Source= SID;User Id=UN;Password=Pwd" providerName="Oracle.DataAccess.Client"/>  And use Conn1(Read and Write from DB)  All over the application. (for exam: all Data Access Layer). VersusIssue 2: <add name="Conn1" connectionString="Data Source= SID;User Id=UN;Password=Pwd" providerName="Oracle.DataAccess.Client"/> <add name="Conn2" connectionString="Data Source= SID ;User Id=UN;Password=Pwd" providerName="Or...

app.config and web.config deployments and installers
I use web deployment projects for changing web.config values based on the configuration build types I have setup (dev/test/stage/prod) and it works excellent for building installers in multiple environments.  Now, I am trying to do the same the Windows Applications.  How can I automate the changing of app.config values based on the build configuration (dev/test/stage/prod)?  Any help would be much appreciated. Thanks,Chris...

help!!
Hi,     I have a website developed using c# vs 2005 (.net 2.0) and i added a web deployment project to it. I also have a customconf.config file which is a replica of the web.config but with some changes in the connection strings. I specified in the property pages of the web deployment projects as "connectionStrings=customconf.config;" and the problem is that when I build this, it copies the customconf.config file to the build folder, deletes it (i saw it getting copied into the folder and then disappearing automatically!!) and says the customconf.config could not be found. ...

Connect a DataSet to a database with a connection string defined outside of web.config
I believe this to be a fairly small issue in a fairly complex scenario; I'll do my best to explain. We have 2 solutions, and one is built using the other as a foundation.  In other words, one solution has all the functionality of the other, and then some other things added on.These 2 solutions need to connect to different databasesMany of the projects in the solutions, as well as the web.config file are "branched" between the two solutions.  Meaning that editing the web.config file in one solution will effect it in the other.To allow each solution to connect to a...

Connection Strings in web.config
I'm having troubles with my connection string in web.config.  Here's is what I have in my web.config:<appSettings/> <connectionStrings> <add name="PizzaConnectionString" connectionString="Data Source=SAPPLEGATEDT\SQLEXPRESS;Initial Catalog=Pizza;Integrated Security=True"providerName="System.Data.SqlClient" /> </connectionStrings> And this is how I am calling it in my C# application: SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["PizzaConnectionString"]); And I'm getting this er...

Connection String in Web.Config
I have this connection in my aspx file: Dim strConnection As String = "server=MARINERHOME; database=Northwind; " & _ "integrated security=true" It works great. ---------------------------------------------------------- I'm trying to move it to the web.config file like so: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <customErrors mode="Off" /> <compilation debug="true"/> </system.web> &l...

connection strings in web.config
What am I doing wrong? This works: SQLConn.ConnectionString = "Data Source=McD_DB;Initial Catalog=McDFeelGood;User ID=uuu;Password=ppp" Now I want to put it in my web.config, but these don't work ("ConnectionString property has not been initialized"): SQLConn.ConnectionString = ConfigurationSettings.AppSettings("McDFeelGoodConnectionString") (VS IDE says this method is obsolete)SQLConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("McDFeelGoodConnectionString") <connectionStrings>    &l...

Web resources about - web.config/connection string problem - asp.net.config-deploy

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Ritchie Yorke recounts John Lennon, Yoko Ono connection - The Courier-Mail Search Search
IN THE old-school days of rock ’n’ roll journalism, savvy interviewers got to spend time with interviewees, get to know them, hang out backstage ...

'Fear the Walking Dead' Season 2 spoilers: ‘Flight 462’ connection teased in new promo
... his group will travel in a yacht in “Fear the Walking Dead” Season 2. A new “Fear the Walking Dead” Season 2 trailer teases “Flight 462” connection. ...

The French connection
A FRENCH-SPEAKING Tasmania is not quite as out-landish a concept as it at first appears, considering we came extremely close to being a French ...

'Who made you Pope?': Donald Trump, Jeb Bush and the Caddyshack connection
The 1980s comedy tells us something about the relationship between Donald Trump and Jeb Bush.

Anchorage man arrested in connection with January armed robberies
Police say a 24-year-old Anchorage man has been arrested in connection with two armed robberies and one attempted robbery at the end of January. ...

Igniting Brand Growth Via Emotional Connections
Nobel Prize winning research in neuroscience and behavioral economics proves that all humans are irrational, emotional creatures. Both marketers ...

Resources last updated: 2/17/2016 2:06:37 PM