.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Configurable connection string/data source for CE 4.0

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

I'm using CE 4.0 in a Silverlight app and my connection string  is:

Data Source=C:\MyApp\MyApp.Web\App_Data\MyAppDB.sdf;Password=***********;Persist Security Info=True

I don't want a hard coded file path in the connection string. Is it possible to make this configurable, or determine directory its located in at runtime?

View Complete Post

More Related Resource Links

SSIS as data source in SSRS connection string


I have a connection string

="/f c:\test\test2\test2\package.dtsx /set \package.variables[User::varfil].Value;" & Parameters!varempid.Value

but its not returning any results. I need a valid connection string.

LINQ data source control and db connection string


I have designed a few pages which use LINQ datasources and Gridviews to maintain data.

I have built a data layer which happily uses System.Web.Configuration.WebConfigurationManager.ConnectionStrings("myConnectionString").ConnectionString

However, the LINQ data source controls use Settings.designer.vb MySettings class definition which is auto generated and doesn't except the above Connection string.

Any ideas?

SSAS Deployment Wizard - Data Source connection string userid and Password getting removed



I have an SSAS database (Analysis Services 2005) which connects to Oracle for the data. I have the userid and password
saved in the connection string.


If I deploy the cube from Visual Studio I DON't have to manually edit the Data Source in the server to input the userid and password. The information is retained.


If I do a build and then deploy .asdatabase file using Deployment Wizard (Microsoft.AnalysisServices.Deployment.exe), the connection information dissappears. I have "Remove Passwords" = False in Project configuration. So when you build the project there will be a file with extension .assecurityinformation which holds the encrypted security info. Somehow

deployment wizard doesn't look at this file.


After the build I execute this command

Microsoft.AnalysisServices.Deployment.exe  .\Project.asdatabase /s:.\Deployment.log

I tried interactively and silent mode. Either way I cannot deploy the project with the userid and password in it.

Any clue?

Connection String issue: Keyword not supported: 'data source'.


I have three connection strings for my web application (ASP.Net) as MVC2 provides by default.

Bar the locations and the names, the syntax is identical, but in the second connection string, it keeps returning "Keyword not supported: 'data source'." EVEN THOUGH IT'S IDENTICAL. D:

Please help! I've tried changing the Syntax to include a "Metadata" tag, still didn't work!

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Errors in the high-level relational engine. A connection could not be made to the data source with t

When I deploy the cube which is sitting on my PC (local) the following 4 errors come up: Error 1 The datasource , 'AdventureWorksDW', contains an ImpersonationMode that that is not supported for processing operations.  0 0 Error 2 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'AdventureWorksDW'.  0 0 Error 3 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed.  0 0 Error 4 Errors in the OLAP storage engine: An error occurred while the 'Customer Alternate Key' attribute of the 'Customer' dimension from the 'Analysis Services Tutorial' database was being processed.  0 0

Cannot create a connection to data source !!!! SSRS 2005

I cannot get this error resolve either for myself or any users, and I'm actually part of the Admin group!  Furthermore, a user with whom I'm tring allow to view this report keeps getting prompted for their windows username and password.  I thought that since this datasource was set to Windows Authentification that it would just pass it through? I'm pulling my hair out at this point: Screen Shots: http://www.webfound.net/datasource_connection.jpg http://www.webfound.net/datasource_connection2.jpg http://www.webfound.net/datasource_connection3.jpg Also As far as I know, I've given sufficient permissions to the right logins and right users on my SQL Databases and related stored procs that the datasets (not datasource) run An error has occurred during report processing. Cannot create a connection to data source 'datasourcename'. For more information about this error navigate to the report server on the local server machine, or enable remote errors

REST Connection Data Source is getting overriddeen by SPD 2010

Hi, I used a Linked Datasource consist of two REST Connection Data Source with the credentials saving with the data source. The first time i add the Data View to the Web Part Zone everything is fine and the data is shown fine but the moment i save it and close the aspx page and open it again, SPD overrides and adds some of the attributes in the DataSources tag, which makes it giving an error saying connection problem and if i copy paste the original Datasource tag with the values it works fine. Any Idea guy's i am just fighting with this from 2 days. Thanks Girish

Data Source Connection Help


Hi Guys,


After the report deployment to http://XX-sql01/Reports/Pages/Report.aspx. When I click on report I am getting following error message. I checked all the data source connections and password everything seems to be ok.

Can anyone shed some light please.

  • The current action cannot be completed. The user data source credentials do not meet the requirements to run this report. Either the user data source credentials are not stored in the report server database, or the user data source is configured not to require credentials but the unattended execution account is not specified. (rsInvalidDataSourceCredentialSetting)


Cannot create a connection to data source ''


I copied an old report and changed the data sources. The report works fine in the designer and on the report server. But when I run it from the server on which the database is located it gives me the following error. Works fine when I use 'Store credentials in report server'. tried anonymous login too. Doesnt work.

  • An error has occurred during report processing.
    • Cannot create a connection to data source '<name of my datasource>'.
      • For more information about this error navigate to the report server on the local server machine, or enable remote errors
      • Please help.     &nb

Is a Dynamic Config Possible for SSAS BIDS Projects? (Data Source / Connection, and Deployment Targe


How do we automate SSAS Project configs such that (a) RDBMS data source server (connection) and (b) SSAS deployment target server are dynamic? 

As it stands, just before I script the ASDB (for deployment/promotion from Dev to QA, or QA to Prod, for example), I use BIDS designer interfaces to change the source connection and deployment targets, then script the ASDB. 

Is there a more dyamic alternative?  Perhaps something analogous to SSIS package configurations?  I can't believe that everybody is doing this as manually as I've done.

Change Dynamic Data database connection string


I have recently started to learn Dynamic Data Web application.

I have built a Dynamic data Website with LINQ data access layer. When the LINQ data context was built over an existing SQL2005 database, the connection string for that database was correctly, automatically, placed into the Settings and .edmx Code for the project. It works, but it's a "static" connection string.

I would like to be able to use this one LINQ data access layer against both test and production databases without having to manually change and recompile the project's connection string each time.

Is there a way to pass/change the User connection string to the LINQ data access layer at Run Time so that destination database changes? Ot in Other words How can user can choose a database from a list of databases.


How to connect OLAP data source WITHOUT using http connection


Hello Guys,

I used to connect my OLAP database with this connection strings :

"Data Source=http://<target IP>/olap/msmdpump.dll;Catalog=<cube name>;Impersonation Level=Anonymous;"


but somehow, it managed to be disconnected for some other reason... 

then, i try to not using HTTP connection...

""Data Source=<target IP>;Catalog=<cube name>;Impersonation Level=Anonymous;"


the result is, I cannot connect to my OLAP.. 

Any suggestion? I want to connect my OLAP without using HTTP connection...



Best Regards and Thanks,

Roland Andreas

Excel services external data source connection


can't connect to an excel services data source on the sharepoint 2010

Error : ... can't connect to external datra source .....

OLE DB Source & Destination -cannot convert between unicode and non-unicode string data types


Requesting all  for a solution for this problem.

My Package Components:

  1. OLE DB SOURCE - Connected to Oracle 11g server using Oracle Provider for OLEDB.
  4. OLE DB DESTINATION - Connected to SQL server 2008 R2 -Windows 2008R2 64 bit.
Oracle Source Table:

  [MST_ID] NUMBER(2340089,1) NOT NULL,
  [USER_ID] [varchar2](40) NULL,
  [INS_DT] date NULL,
  [SAVED_FLG_TYPE] [varchar2](20) NULL

SQL Server DestinationTable:

  [MST_ID] [int] IDENTITY(2340089,1) NOT NULL,
  [USER_ID] [varchar](40) NULL,
  [TMP_XML] [varchar](max) NULL,
  [TMP_EDT_FLG] [int] NULL,
  [INS_DT] [datetime2](7) NULL,
  [PAT_ID] [int] NULL,
  [SAVED_FLG_TYPE] [varchar](20) NULL

Error: cannot convert between unicode and non-unicode string data types


Cannot create a connection to data source ... Login failed for user: BUT not for all reports!


SQL Server 2008 using Report Builder v2.0  (Microsoft SQL Server Reporting Services Version 10.0.2531.0)

We have several reporting service apps with many reports in each one. There is a set of 4 reports that all report on similar info (but grouped differently) that can be run by me and other network administrators but not any "regular" users. On these reports only, they are getting "Cannot create a connection to data source ... Login failed for user...". As I've said there are other reports that regular users can run just fine!? ALL reports use the same Shared Connection Data Source on the server that is set up as Windows Integrated Security. The Data Source's Security allows Domain Users to browse.  

I've uploaded a test report to SSRS whos SQL is "SELECT 'test' as testField" and that's it: and is connected to this same Data Source and users still get the Login Failed error... even tried creating and using a new Data Source that points to the same SQL Server DB to no avail. Examining the rdl's XML doesn't reveal anything either.

Reporting Server is a different machine than the SQL Server DB holding the data.

The only clue is that working reports were created a year before now.

Excel Services establish a connection to the external data source


Hello All,

I am getting below error when I click Slicer in excel 2010 powerpivot chart.

An error occurred during an attempt to establish a connection to the external data source. The following connections failed to refresh:

PowerPivot Data

I am using SQL Analysis services cube to fetch data into my powerpivot using windows authentication mode.

Appriciate any help.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend