Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 142137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:53:19+00:00 2026-05-11T07:53:19+00:00

I am using an ASP.Net and C# front end to run some reports. I

  • 0

I am using an ASP.Net and C# front end to run some reports. I want to open an SQL Connection to the data source used by the report.

When the report uses integrated security it is easy enough to create a connection, however I want to create a connection when the user name and password are stored by the reporting server.

I can get SQL Server path and initial catalogue, using

    DataSource[] dataSources;     DataSourceReference dsReference;     DataSourceDefinition dsDefinition;     string dsPath;     ReportingService2005 rs = new ReportingService2005();      dataSources = rs.GetItemDataSources(reportPath);     if (dataSources.Length > 0)     {         dsReference = (DataSourceReference)dataSources[0].Item;         dsPath = dsReference.Reference;         dsDefinition = rs.GetDataSourceContents(dsPath);         // ....     } 

I can also get the user name using

    username = dsDefinition.UserName; 

however if I use

    password = dsDefinition.Password; 

password = null, and can’t be used to open the Sql Connection.

Is there a way to create an SQLConnection that uses the connection string and username and password credentials of a data source?

I am using Reporting Services 2008, and .NET 3.5 with web references to ReportService2005.asmx and ReportExecution2005.asmx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:53:20+00:00Added an answer on May 11, 2026 at 7:53 am

    I really don’t think it’s possible, as this would pretty much constitute a security hole. I know this isn’t the answer you are looking for, but I would parameterise the location of your reports (i.e. the IP/name of your MSRS server) and store them in your web.config along with a matching SQL instance. While it’s not exactly what you’re after, I think that’s about as close as you are going to get.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET Dynamic Data for a project and I have a table
I'm using ASP.NET, with session state stored out of process in SQL Server. When
I am currently making an ASP.Net and C# page, which is a front end
Is it possible to create a custom Web front-end to run SSRS reports from?
I have an ASP.NET project which is a front-end to a database. In addition
I'm a front-end guy who's picked up ASP.NET WebForms through working on various projects
I'm developing chat application. I use flash as front end and asp.net back-end. My
i have an asp.net-mvc web page and i am using jqgrid on the front
How to secure ASP.Net Website ( Commercial Application ) using SQL 2008 ? We
I am using ASP.NET MVC2 in Visual Studio 2008. I believe the SQL Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.