Need Help - ConnectionStrings In Web.config File
Jan 3, 2007
I think I've read to many post and now I'm confused on what the exact syntax should be and where in the web config file for connecting to my remote database on the web. I have a SQL Server 2005 database on the web. It was imported by the host from the members ID and passwords database created in Express 2005 from the ASP.Net configuration
Here's the portion of the config file:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
Here is the sample connection string my host provided:
DRIVER={SQL Server};SERVER=sqlserver5.loosefoot.com;UID=myadmin;PWD=Your Password;database=eldersmembers
Would someone show me exactly what and where the syntax for the connection string goes?
Thanks in advance
View 8 Replies
ADVERTISEMENT
Nov 20, 2006
Hello all
I need to know the best way to work with databases (Sql Server) in my app.config.
I have an VB application that binds data from a SQL server (All Customers install these application and retrieve data via VPN). I use two databases for each customer. The first DB has some commun tables/data and the second one is its ID (Until now I setup manually the connections because we don't have more that 10 Customers but we need improve that for next year). I know that a connection string is created in the app.config file .
I don't know if it is possible from this way or if there is another way to do it.... but the goal is:
1. Customer is logged in the application -User Name, ID, Password
2. Customer retrieve a database with commun data and his own database (that is his ID). (From the app.config???) How can I setup my app.config in order that every customer retrieve his database automatically when it is logged?
Thaks, I don't know if it's clear but I didn't find another way to explain my trouble
View 1 Replies
View Related
Mar 9, 2006
Greetings,
My connection string looks like this (in the web.config) and is used with many data controls in my application:
<connectionStrings><add name="connection_NAH" connectionString="Data Source=NAH;Initial Catalog=NAH;User ID=xxxx;Password=xxxx" providerName="System.Data.SqlClient" /></connectionStrings>
I'm using vb.net and my code looks like this:Dim myConnection As SqlConnectionDim mySqlCommand As SqlCommandmyConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("connection_NAH").ConnectionString)mySqlCommand = New SqlCommand("UPDATE tbMasterOption SET ImageURL = 'test.gif' WHERE ID = 116977")Try myConnection.Open() mySqlCommand.ExecuteNonQuery()Catch ex As Exception Label3.Text = "Couldn't update database record: " + ex.ToString()Finally myConnection.Close() Label3.Text = "Closed db connection"End Try
------------------
The only output I get is from the label3 which says "Closed db connection". Doesn't look like any exceptions are thrown but when I look at the database the record is not updated. Originally I thought my SQLConnection was not constructed correctly but I also tested it by outputting the connection string to Label3 which looked fine. The only other thing I can think of is in the use of ExecuteNonQuery(). Is this the right method or do I need something else? Running the sql query manually works...
Thanks in advance..
View 2 Replies
View Related
Aug 29, 2007
Ok, here's the deal. This has been killing me for months now.
Here's the setup - SQL 2000 database on a Shared Infrastructure (cluster). I have a database on a named instance. My port number is xxxxx. I have dbo (through Windows Auth) permissions on my database. When I connect at the office, I get through fine, no question. When I connect at home, I get error 26 in my asp.net 2 app (using System.Data.SqlClient), cannot find SQL Server database. I can connect through the SQL 2005 Management Studio using the same servernameinstance name I use at the office. I can connect through the SQL 2000 Query Analyzer using servernameinstancename;(semicolon)portnumber. I've tried all sorts of combinations in my web.config -
servernameinstancename,(comma) portnumber
servernameinstancename;(semicolon - causes web.config to blowup) portnumber
ipaddressinstancename, (comma) portnumber
and i still get nothing. usually it's 'error 26' - but if i use this:
Data Source=ipaddressinstancename,portnumber;Network Library=DBMSSOCN;Initial Catalog=xxx;Trusted_Connection=Yes;
I get 'Login failed for user domainuser'
I've tried making an alias. I've tried using ODBC. I've even tried a freakin' DSN. No dice.
Nothing seems to work - I'm at the end of my rope. Can someone please help?
View 4 Replies
View Related
Sep 2, 2015
Currently have a single hard coded file path to the SSRS config file which parses the file and provides the reporting services web service url. My question is how would i run this same query against 100s of servers that may or may not share the same file path as the one hard coded ?
Is there a way to query the registry to find the location of the config file of any server ? which could be on D, E, F, H, etc.
I know I can string together the address followed by "reports" and named instance if needed, but some instances may not have used the default virtual directory name (Reports).
Am I going about this the hard way ? Is there a location where the web service url exists in a table ? I could not locate anything in the Reporting service database. Basically need to inventory all of my reporting services url's.
View 2 Replies
View Related
Sep 21, 2006
Hello All,
I experienced a weird error while deploying my SSIS package. After running the manifest file, i noticed that one of the configuration file's path was not updated in the dtsx file. My solution has 8 packages and almost every package has 2 configuration files. Except 1 file every other config file's path is being updated. Has anybody experieced such a problem?
Thank you in advance for your help
Sumesh
View 1 Replies
View Related
May 24, 2007
Does anyone have an example of a web.config file that works with Dynamic Data controls? I asked because I can't seem to arrange my "config sections" in any working order. I use 1 connection string in the web.config to establish a conversation with the database. Thanks in Advance.
View 1 Replies
View Related
Feb 21, 2008
Hi the data connectionstring will be generated automatically in web.config file after dragging a data table from database into webpage.for example: <configuration> <add name="SQLProfileConnString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|MSPetShop4Profile.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/> </> But what if I have to write the connectionString part myself, I mean where I can get the syntax of it? Thanks a lot
View 1 Replies
View Related
Mar 25, 2008
I have a simple SSIS package which includes one Analysis Services Processing Task. I have created a connection manager object (cmo) and assigned it to the AS task. Within the cmo I selected a specific user name and
password to log on to the server with. Tested this [domain][user account] and it works. Now here is the problem. When I run the package either in debug mode or from a command line, the packages ignores the connection manager and
attemps to use the account I am logged into the server with.
Using a config file to hold the credentials does not work either. When DTEXEC is used, the package attempts to use the credientials used to log in to the server.
Does anyone have any ideas why this is happening?
View 4 Replies
View Related
Dec 12, 2007
Hi All!
I've been struggling with a problem I have. When I use DTEXECUI to run a package and manually add the config file, it gets ignored and there is no warning as such.
Here's the set up:
1) create SSIS package that uses a DB connection
2) enable config, add XML config, export the connection string, disable config
3) edit config file, change connection string
4) open package from Windows Explorer (double click)
5) add config file created in step 3
All of that works fine, but there are times when it doesn't. I think it depends on the editor used in step 3. If I use textpad and "pretty format" the XML (from the huge one-line built from within Visual Studio), then sometimes the changes aren't picked up. I can tell this because the "default" server in development is not accessable in production. When we "reformatted" the XML back to one line, the correct server was connected to.
I have no idea what the problem with the formatted XML was. I thought it was CRLF vs LF, but I have at least one config that formatted that way and it works fine. My current thought is character encoding when using TextPad.
My biggest problem is that DTEXECUI doesn't tell you that the config file isn't going to be used. It just ignores the "bad" config format and goes on its merry way using the information in the package itself. That really scares me.
Has anyone else seen this? What is the problem being introduced into the config file?
Thanks,
Frank
View 3 Replies
View Related
Mar 1, 2008
how to solve error SQL server does not allow remote connection
View 2 Replies
View Related
Nov 6, 2006
Hi
Config files doesn't seem to work for me :( i want to make a common config file for all of my packages but it is giving me error
Validation error. The AcquireConnection method call to the connection manager failed with error code 0xC0202009
I have placed pasword in my config file too. Following is config file which i m using, server name n password are masked.
<?xml version="1.0"?>
<DTSConfiguration>
<DTSConfigurationHeading>
<DTSConfigurationFileInfo GeneratedBy="SSBKD955688" GeneratedFromPackageName="DTS_ACPM_MarkIT_Indices_Composites_TRAC_X_Asia_Index" GeneratedFromPackageID="{CB3660A1-5E6C-4D08-A7F5-4D6CE83578E2}" GeneratedDate="2006/10/19 14:05:20"/>
</DTSConfigurationHeading>
<Configuration ConfiguredType="Property" Path="Package.Connections[ssmgn838.ACPM.acpmuser].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>server=########;user id=sa;password=******;database=ACPM;
</ConfiguredValue>
</Configuration>
<Configuration ConfiguredType="Property" Path="Package.Connections[Text File (Source)].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>C:acpmfiletouploadCopy of ACPM_MarkIT_Indices_Constituents_Composites_1_ITRAXX_ASIA.tab
</ConfiguredValue>
</Configuration>
</DTSConfiguration>
View 3 Replies
View Related
Mar 25, 2008
Hi to all
i have sql-clr function written in C#.
i am performing data access opertaion using ado.net with in this function.
what i want ,to store connnection string inside config file.(appesettings)i got one article about this which is bellow
http://www.sqljunkies.com/Article/6CA864E9-E107-408E-B30A-4BA15B0CD11C.scuk#[4]
i follow all steps given in article.
but still getting error when executing function
A .NET Framework error occurred during execution of user-defined routine or aggregate "Amex":
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
at UserDefinedFunctions.CreateExpense()
can anybody help me....
thanks in advance,
Chetan S. Raut
View 15 Replies
View Related
Jun 11, 2007
I am using package configurations to store connectionstring for my database.
While moving the package from development to production, I used the same configuration files (without changing the connection string to point the database to production one). I ran the package in production and it updated the development database.
Then I changed the config files in production to point it to the production database.
However, the packages are still pointing to dev. database.
It seems that after running the package one in Production, it is not reading the updated config file for subsequent runs.
How to I make sure that the packages now read the latest config files.
View 14 Replies
View Related
May 17, 2006
Hi All,
I am looking for help trying to configure an XML dtsconfig file, I am using different connection managers for my Source and Destination Databases, I am also using an XML dtsconfig file to set these parameters dynamically, however I dont want to use userid/password to connect to my source/destination databases and instead use trusted connection or windows authentication, I remember we had an option in earlier DTS where we could set it up as 0 or 1and use windows authentication, I cannot find this in the new SSIS package properties.
Appreciate your help in advance.
View 5 Replies
View Related
Aug 9, 2007
In my SSIS packages I'm adding a config file that is storing only the connection strings to the database. Though most of my packages are reading or writing out flat files as well as connecting to a db. Do I need to put both db connection string and flat file connection strings in the config file? I'm currently adding only the db connection due to that will change depending which environment its ran in, unlike the flat file location will always remain the same.
I just want to be sure I don't need both for my package to run successfully.
View 1 Replies
View Related
Feb 15, 2006
Hi all
This is the situation: I've a dtsx package wich creates a tab delimited txt file from a sql server 2005 databasetable. Now this all works just fine. But what I want to do is that the user can choose the destination path of that created txt-file. Right now I've declared the path when I created the flat file source.
On the net I found that a config file for a dts package (sql server 2000 - Dynamic Property Task) could do the trick...
Any help plz?
thx!
View 1 Replies
View Related
Apr 20, 2006
When I run my project it fails on SqlDependency.Start(_connect) with message:
An attempt to attach an auto-named database for file D:WINDOWSMicrosoft.NETFrameworkv2.0.50727ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
<?xml version="1.0"?>
<configuration> <appSettings/> <connectionStrings> <add name="SiteMapConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory| est1.mdf;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <siteMap enabled="true" defaultProvider="AspNetSqlSiteMapProvider"> <providers> <add name="AspNetSqlSiteMapProvider" type="SqlSiteMapProvider" securityTrimmingEnabled="true" connectionStringName="SiteMapConnectionString" sqlCacheDependency="CommandNotification"/> </providers> </siteMap> <caching> <sqlCacheDependency enabled="true"/> </caching> <compilation debug="true" strict="false" explicit="true"/> <pages> <namespaces> <clear/> <add namespace="System"/> <add namespace="System.Collections"/> <add namespace="System.Collections.Specialized"/> <add namespace="System.Configuration"/> <add namespace="System.Text"/> <add namespace="System.Text.RegularExpressions"/> <add namespace="System.Web"/> <add namespace="System.Web.Caching"/> <add namespace="System.Web.SessionState"/> <add namespace="System.Web.Security"/> <add namespace="System.Web.Profile"/> <add namespace="System.Web.UI"/> <add namespace="System.Web.UI.WebControls"/> <add namespace="System.Web.UI.WebControls.WebParts"/> <add namespace="System.Web.UI.HtmlControls"/> </namespaces> </pages>
<authentication mode="Windows"/> </system.web></configuration>
View 2 Replies
View Related
Sep 26, 2007
Currently we have a 1.1 app that sets the connection string as a Application variable, we are wanting to change that and place it in the web config file, when I do this in 2.0 it's a simple process but in 1.1 it's different. It doesnt seem to like the <connection string> tag, does it go in the appsettings tag and if so what should it look like and how is it referenced.
View 2 Replies
View Related
Dec 5, 2007
I'm trying to get a SSIS package to run as a SQL Server Agent job. The package uses a config file. When I try to add the config file to the job under the Configurations tab. When I click on the 'Add' button, I get the following error:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The EXECUTE permission was denied on the object 'xp_availablemedia', database 'mssqlsystemresource', schema 'sys'.
The user does not have permission to perform this action.
The statement has been terminated. (Microsoft SQL Server, Error:229)
Any suggestions?
View 2 Replies
View Related
May 14, 2007
Hi all,
I have few config files with db passwords in them. I have to change passwords daily into that(as my system is in UAT phase now). I have deployed my packages on SQL Server.
My question is , do I need to deploy my packages daily after password updation, or it'll automatically taken care by the SQL Server ?
Thanks in Advance
syed
View 4 Replies
View Related
Sep 24, 2007
I would like to use one configuration file for multiple SSIS packages. How I want to do this is to save the connection string of my production server with the initial database field excluded and set that per package file. I am able to read in the configuration file into 2 different packages without issue but I cannot see how to extract the connection string into a ODBC Database Connection object in order to set the initial database. Is there some way I am not thinking of to do this, either through the designer or programatically?
Thanks for any help you all can provide! I am so n00b to SSIS.
View 6 Replies
View Related
Sep 27, 2007
Hello
I made certain changes in the properties in my Config file and by Change the ServerName and Database Name.
below is the example
When i execute the package it still runs. I mean theer is no server or database with that name but it still works.
<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=UHS137;Initial Catalog=UH_IntegrationStaging;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue>
</Configuration>
Changed to
<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=NOSvr;Initial Catalog=NOdB;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue>
</Configuration>
Then I created a new config file in which I checked in the box for ServerNam and when i change the name teher in the Config file
EXAMPLE
<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ServerName]" ValueType="String">
<ConfiguredValue>NoSvr</ConfiguredValue>
and when executed teh package its fails.
Thats what I neede
SO coming to my question.
1)What is it doing. I mean how is the package talking to this config file
2) Irrespective of what I do in the Connection String the package executes fine, which It should not do as far as my understanding goes. Why is it doesn't matter whats in String. where as it matter in later.
View 5 Replies
View Related
Jan 29, 2007
Hi i used
http://msdn2.microsoft.com/en-gb/library/ms160724.aspx
MSDN Article sample to enable custom security method in to my report project,
also i RSWebApplication.config
<ReportServerUrl>http://localhost/reports/pages/folder.aspx</ReportServerUrl>
but each time when i login using a correct user name and password from the login page it just automatically redirect to the
http://localhost/reportserver url ?
but i need to change it to the http://localhost/reports/pages/folder.aspx url ?
how can i do this task ?
regards
sujith ?
View 3 Replies
View Related
Jan 31, 2007
Hi all
I'm trying to connect to a Sybase DB using an OLE DB connection. Now, it works fine when I run the project without the package config enabled, but when I add the Sybase connection to the xml config file, & enable it the connection fails.
This is the error I see in the progress Tab
[Connection manager "AcidPrd.basketUser"] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "ASE OLE DB Provider" Hresult: 0x80004005 Description: "Login Failed. Check for valid user ID, server name and password.". An OLE DB record is available. Source: "ASE OLE DB Provider" Hresult: 0x80004005 Description: "[Native Error code: 4002] [DataDirect ADO Sybase Provider] Login failed. ".
Can anyone help.
Thanks,
Jon
View 6 Replies
View Related
Nov 10, 2006
Hello
I am using XML config file to store the values e.g. Server name.... it runs fine with BIDS (Development enviroment)... but when I deploy and run it to test that XML config files values are being read by e.g. giving the wrong server name, it runs fine (may be retrieving some old values). then I come bak and test it again in the development enviroment to test, it fails ( as it supposed to be caz server name is wrong in config file)
can ne one tell me wr is the problem?
ur help and support is appreciated
regards,
Anas
View 1 Replies
View Related
Feb 12, 2008
<ReportItems>
<ReportItem Name="ProgressTracker" Type="Prologika.RS.Extensibility.ProgressTrackerCRI.ProgressTrackerRenderer,Prologika.ProgressTracker"/>
</ReportItems>
<ReportItemDesigner>
<ReportItem Name="ProgressTracker" Type="Prologika.RS.Extensibility.ProgressTrackerCRI.ProgressTrackerDesigner, Prologika.ProgressTracker"/>
</ReportItemDesigner>
What are the different parts of the reportitem name tag?
View 1 Replies
View Related
Apr 11, 2007
All,
I have several packages that all use the same DTSConfig file to map the OLEDB connections. This works fine in the development environment, however when i run a rebuild with Deployment set to true i get the error
Error 75
System.ApplicationException: Could not copy file "C:Dev_TFSTowergateTowergate.BdwTowergate.Bdw.Ssis.TransformPackagePath.dtsConfig" to the deployment utility output directory "C:Dev_TFSTowergateTowergate.BdwTowergate.Bdw.Ssis.TransforminDeployment". ---> System.IO.IOException: The file 'C:Dev_TFSTowergateTowergate.BdwTowergate.Bdw.Ssis.TransforminDeploymentPackagePath.dtsConfig' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CopyFiles(ICollection fileNames, String outputPath) --- End of inner exception stack trace ---
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CopyFiles(ICollection fileNames, String outputPath)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.CreateDeploymentUtility(IOutputWindow outputWindow)
The DTSConfig file is included in the project under Misc in the development studio as all developers need to have access to the same config file.
The net result is that the MSI deployment package doesnt get built so we cannot do an automated delivery of the data.
Is there a work round or a setting that i can implement to remove the error?
TIA
View 12 Replies
View Related
Oct 8, 2007
I have manually imported my packages into SSIS (via StoredPackages/FileSystem/Import Package command). How can I utilize a ConfigFile with this package? I see that the ConfigFile can be selected when it is run (in dtexecUI ), but it doesn't "stick", and is only used for that particular run.
How can I point this manually imported package to the ConfigFile so everybody who runs it doesn't have to browse for the ConfigFile every time they run it?
View 7 Replies
View Related
Apr 12, 2007
I have one SQL Database and I am getting the an error message when debugging. The error messasge points to the ConnectionString. Any Ideas would be helpful.
Rick
<connectionStrings>
<add name="sqloledb" connectionString="Data Source=mssql09.1and1.com,1433;Database=xxxxxxxx;UserID=xxxxxxxx;Password=xxxxxxxx;Trusted_Connection=False" providerName="System.Data.SqlClient" />
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=mssql09.1and1.com,1433;Database=xxxxxxxx;UserID=xxxxxxxx;Password=xxxxxxxx;Trusted_Connection=False" providerName="System.Data.SqlClient" />
</connectionStrings>
View 2 Replies
View Related
Mar 9, 2007
I've recently uploaded my website, http://www.bigredsongbus.com, to my host. Unfortunately, they don't support the use of SQL Server Express. So, I've purchased an addon through my host - discountasp.net. I've attached my database file to their server, now all that I need to do is to change the connection string in my .config file so that it points to the SQL Server. I don't know how to do this. Any help, please?Jeffrey Way
View 2 Replies
View Related
Apr 10, 2008
Hi,
my configuration file provides parameters that are used for an SQL query in my package. However, for these parameters it must be possible to pass NULL to the query.
This seems to be impossible in SSIS..? If the config file provides no value, the package uses a default value - and this default value can not be null.
Any suggestions?
Thanks a lot,
Regards
Jan
View 4 Replies
View Related
Nov 7, 2006
Hi,
I've created a solution with 5 packages in. I've scripted a config file for each package where I would be able to change the source file connection and the database servers (source and destination). On the first package, I am able to change the config attributes and the affects are picked up, but the rest of the packages do no pick up the changes.
For example, if the source file is "C:Filessource.txt" and this is changed to "C:Filessource123.txt" (Just to make sure it fails) it wont pick up the new changes and still uses "C:Filessource.txt".
Also, I tried changing the name of config file itself and the package still ran as if nothing had changed. It's as if it's not recognising the config file.
Any ideas ?
Thanks, Richie.
View 9 Replies
View Related