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

 

0
hong_ma
12/1/2005 7:25:07 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
421 Views

Similar Articles

[PageSpeed] 58

Try including the address (IP no. or in any other acceptable format) to your remote server in the Connection String:


<add key="ConnectionString" value="Server=222.111.000.111;User ID=user;Password=user;Initial Catalog=Dashboard;Data Source=database_Dev"/>
Regards

Andre Colbiornsen
---------------------------------
Seventh Day
Råbygatan 1A,
SE-223 61 Lund
Sweden
Mob.: +46-(0)708-97 78 79
Mail: info@seventhday.se
--------------------------------
0
adec
12/2/2005 12:56:21 AM
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:...

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....

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!...

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,...

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...

how to read connection string form Web.config ?
Hi,   how to read connection string form Web.config ? in ASP.NET 2005 ?   regards,,,   You may try this: ConfigurationSettings.AppSettings.Get("ConnectionStringName")  This posting is provided "AS IS" with no warranties, and confers no rights. or ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();...

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...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Can't read (connection) string from web.config with web matrix
Hi, I'm trying to retrieve a connection string from a web.config file and I get nothing back when I use ConfigurationSettings.AppSettings["ConnectionString"]; I set up a test stub called configtest.aspx to try to see what was wrong but I can't see where the problem is. I would really appreciate an extra pair of eyes here to help me solve this mystery cheers Jeet Here is my asp.net code <%@ Page Language="C#" %> <%@ import Namespace="System.Configuration" %> <script runat="server"> void Page_Load(Ob...

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...

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.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 ...

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...

Use web.config with web forms?
 Hi All, I'm doing some unit testing of a web application, and would like to use settings from a web.config file.  Is this possible? Thanks much,- Mark I'd suggest keeping your Unit Tests in a seperate project and using it's own .config file. It will be a little repetition but it will help to keep things seperated for perf and reusability without bloating your production app. I agree with Curt. It is better to seperate options for testing and release version. This will decrease the job to be done once the unit testing process is finished.Haissam Abdul Mal...

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....

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...

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...

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 ...

Web Forms Security via web.config?
In classic ASP, if you wanted to restrict someone from a certain area on the website (say, a "client area"), you would activate a session flag once their login creditials had been verified, and challenge each visiter at each protected page for that session flag. I had heard that with ASP.NET, this has been greatly simplified through the web.config file, but wasn't offered too much support on the issue.  Does anyone know how it can be implemented simply and quickly via the web.config file?  Are there any simple descriptions online somewhere?  Ideally, I'd like to authorize the users from an admin table in a database, with each person having their own ID and PWD....not authorizing them through static ID and PWD's listed in the web.config file. Anyone know about this?  " src="/emoticons/emotion-18.gif"> See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrflocationelement.asp. Using the location element you can specify the configuration for a file or directory (including authorization).- Wilco Bauwer (MSFT) / http://www.wilcob.com...

Is it possible to modify web.config from a web form?
I am trying to create an admin tool for a web application (within the application). I would like to allow an administrator to alter the contents of the web.config file where a lot of custom settings are held through a Web Form in the same application. Is this possible? I can, obviously, read the web.config with out issue. However trying to update the file I am getting the error "The web config file could not be loaded, it is being used by another process". I've also had to give the ASPNET account full control over the file which I am confused about because I have impersonate set to true. I was under the impression that the users credentials would be used for any resource needs? Thanks for any insights, eRic Modifying the web.config will cause your application to restart. It's a bad idea to store runtime modifiable data in the web.config. Instead, use the Configuration Application Block from Microsoft. This will allow you to have a config file seperate from the web.config which is easily updated at runtime. If you are writing an admin tool that actually modifies the web configuration settings, then a different config file is not an option. First, there are no APIs to do this in Whidbey. You'll have to write to the configuration file using XML APIs. When you write to your web.config file from a web app, the web app will indeed restart. But this is a graceful restart, and your current request will be able to complete. So one thing you ca...

web.config - Roles
Hi all,I have a web.sitemap.  <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode> <siteMapNode url="~/Default.aspx" title="Home" description="This is our site." /> <siteMapNode url="~/PreMigration/PreMigration.aspx" title="Pre Migration" description="Overview of Pre Migration"> <siteMapNode url="~/PreMigration/PreSingleImport.aspx" title="Single Import"...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/browser capabilities check out BrowserCapabilities (usage: Request.Browser) and MobileCapabilities (usage: MobileCapabilities mc = (MobileCapabilities)Request.Browser) classes.Gunnar Peipman-- General Protection Fault-- Illegal Page Fault-- Not My Fault...