For a connection string,we just use sqlconnection class in c# and try to do the open opration to test whether the connection string is valid or not.
but for reporting servics,when given a username and a password ,how can we do the authentication in c#program to see the account is valid or invalid...
Hello,My boss wants me to create a front end webpage for our ReportingServices reports that customers can log onto through a webform. I'm aPHP programmer, so I'd rather do this site and the authentication inPHP than learn .NET. The main problem I see is finding a way to passthe authentication to Reporting Services so that when a user runs areport, they are not asked to enter their password a second time.I don't even know where to start researching this problem... I've askedin PHP forums and they passed me to you guys. Any ideas?Andrew
Hi, I€™ve an application Web which uses to reportviewer to show information. I want that all the users of the application accede to reports by means of he himself user and password. This user is a local user of report€™s server. The problem is that when attempt to show report always appear the following error: The request failed with HTTP status 401: Unauthorized. The code that use is the following one:
ReportViewer1.ServerReport.ReportServerCredentials = new ReportViewerCredentials("Usuario", "pwd", "servidor");
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 Microsoft.Reporting.WebForms; using System.Net; using System.Security.Principal; using System.Runtime.InteropServices;
/// <summary> /// Summary description for ReportViewerCredentials /// </summary> public class ReportViewerCredentials : IReportServerCredentials { [DllImport("advapi32.dll", SetLastError = true)] public extern static bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
[DllImport("kernel32.dll", CharSet = CharSet.Auto)] public extern static bool CloseHandle(IntPtr handle);
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] public extern static bool DuplicateToken(IntPtr ExistingTokenHandle, int SECURITY_IMPERSONATION_LEVEL, ref IntPtr DuplicateTokenHandle);
public ReportViewerCredentials() { }
public ReportViewerCredentials(string username) { this.Username = username; }
public bool GetFormsCredentials(out Cookie authCookie,out string user, out string password, out string authority) { authCookie = null; user = password = authority = null; return false; // Not implemented }
public WindowsIdentity ImpersonationUser { get {
string[] args = new string[3] { this.Domain.ToString(), this.Username.ToString(), this.Password.ToString() }; IntPtr tokenHandle = new IntPtr(0); IntPtr dupeTokenHandle = new IntPtr(0);
//const int LOGON32_PROVIDER_DEFAULT = 0; ////This parameter causes LogonUser to create a primary token. //const int LOGON32_LOGON_INTERACTIVE = 2;
const int LOGON32_PROVIDER_DEFAULT = 3; //This parameter causes LogonUser to create a primary token. const int LOGON32_LOGON_INTERACTIVE = 9; const int SecurityImpersonation = 2;
tokenHandle = IntPtr.Zero; dupeTokenHandle = IntPtr.Zero; try { // Call LogonUser to obtain an handle to an access token. bool returnValue = LogonUser(args[1], args[0], args[2], LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ref tokenHandle);
if (false == returnValue) { Console.WriteLine("LogonUser failed with error code : {0}",Marshal.GetLastWin32Error()); return null; }
// Check the identity. System.Diagnostics.Trace.WriteLine("Before impersonation: " + WindowsIdentity.GetCurrent().Name);
bool retVal = DuplicateToken(tokenHandle, SecurityImpersonation, ref dupeTokenHandle); if (false == retVal) { CloseHandle(tokenHandle); Console.WriteLine("Exception in token duplication."); return null; }
// The token that is passed to the following constructor must // be a primary token to impersonate. WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle); WindowsImpersonationContext impersonatedUser = newId.Impersonate();
// Free the tokens. if (tokenHandle != IntPtr.Zero) CloseHandle(tokenHandle); if (dupeTokenHandle != IntPtr.Zero) CloseHandle(dupeTokenHandle);
// Check the identity. System.Diagnostics.Trace.WriteLine("After impersonation: " + WindowsIdentity.GetCurrent().Name);
I am using Reporting services 2005 and have enabled forms authentication using the example found in: 'C:Program FilesMicrosoft SQL Server90SamplesReporting ServicesExtension SamplesFormsAuthentication Sample' This works correctly without SSL, but when I enable SSL I get an error when logging in. The symptoms are as follows. I can login to the reporting server (in my case <server>/ReportServer2) directory, but when I login to the report manager (in my case at <server>/Reports2) I get the following error: 'The underlying connection was closed: An unexpected error occurred on a send.' Can anyone suggest why I might be getting this error?
I am new to Reporting Services. I want to use Reporting Services 2005 in our application.
My custom web application is on one machine and Reporting Services 2005 is on other machine. I am using Forms Authentication and using Single Sign On for login
If my custom web application and Reporting Services are on same machin I can get "Authentication Ticket" issued by ReportingServices2005 to the Report server.
But in this case I am not able to get "Authentication Ticket" on Report Server since it is on other machine.
I am using ReportViewer control in my web application to display Reports and using LogonUser method to get the Authentication Ticket.
How can I pass CookieAuthentication ticket from my Custom Web Application to Report Server?
Is there any work around to pass Authentication Cookie across Domain or any other solution for this?
I setup CRM 4.0 in one domain with a domain service account. SQL Reporting is located on the same machine using the same service account. SQL is on a different machine. These are in the same single domain forest which has a two way trust relation with another domain of a separate single domain forest. Both domains are W2k3 Native Mode.
The CRM application allows access to users in both domains. The reports are generated with accounts in the first domain where CRM and SQL Reports is located but not for users in the other domain. The CRM's report viewer window displays "The report cannot be displayed."
The following are events that are related to the error: On CRM server: Event Type: Warning Event Source: ASP.NET 2.0.50727.0 Event Category: Web Event Event ID: 1309 Date: 5/13/2008 Time: 6:55:19 AM User: N/A Computer: CRMSERVER Description: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 5/13/2008 6:55:19 AM Event time (UTC): 5/13/2008 1:55:19 PM Event ID: cc4c29c8f4be4e82ac0eee1234a15dc6 Event sequence: 77 Event occurrence: 1 Event detail code: 0
Process information: Process ID: 3340 Process name: w3wp.exe Account name: CRM Service Account
Exception information: Exception type: CrmReportingException Exception message: An error has occurred during report processing. (rsProcessingAborted)
Request information: Request URL: http://CRMServer:5555/OrganizationDev/CRMReports/rsviewer/reportviewer.aspx Request path: /OrganizationDev/CRMReports/rsviewer/reportviewer.aspx User host address: 172.x.y.z User: OTHERDOMAIN estuser Is authenticated: True Authentication Type: Negotiate Thread account name: CRM Service Account
Thread information: Thread ID: 1 Thread account name: CRM Service Account Is impersonating: False Stack trace: at Microsoft.Crm.Web.Reporting.SrsReportViewer.ConfigurePage() at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Event Type: Error Event Source: MSCRMReporting Event Category: None Event ID: 19969 Date: 5/13/2008 Time: 6:55:19 AM User: N/A Computer: CRMSERVER Description: Web service request SetParameters to Report Server http://CRMServer/reportserver failed with SoapException. Error: An error has occurred during report processing. (rsProcessingAborted)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
On SQL Server: Event Type: Failure Audit Event Source: MSSQLSERVER Event Category: (4) Event ID: 18456 Date: 5/13/2008 Time: 6:55:18 AM User: NT AUTHORITYANONYMOUS LOGON Computer: SQLServer Description: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'. [CLIENT: 172.a.b.c] This is the IP address for the CRM server.
The take away from the events is either the SQL Reporting or CRM is attempting to access the SQL service with the Anonymous account. I expect it's SQL reporting because the CRM application is not having problems letting in the other domain users. The problem occurs only on reports.
I tried the following: 1. Applied the steps in the CRM Planning Guide for "Taks for a native mode domain with users in a mixed-mode domain." This adds the other domain users to a domain local group. Then assigns Browser access to the SQL reports and SQL database access to the group. 2. Set the CRM server to be trusted for delegation (kerberos only) 3. Created SPNs for http/crmserver domaincrmservice and http/crmserver:5555 domaincrmservice and http/crmserver.domain.local domaincrmservice and http/crmserver.domain.local:5555 domaincrmservice
This is a subject that has been brought up before but I have not seen a definitive answer/solution. We have implemented a custom authentication extension (forms authentication) for reporting services and it has been working just fine under "normal" conditions; "normal" being users logging in, viewing reports, and then moving on. Recently some reports were created by our report group and they contain Dundas gauge controls for "dashboard" style reports. These reports are meant to be up all day and they post back every few seconds because the data they present is mission critical. This of course exposed the inability of the reportviewer control to stay in the context of Report Manager when it comes to the cookie exchange and authentication thus resulting in the following error: <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/ReportServer/logon.aspx?ReturnUrl=%2freportserver%2fReportExecution2005.asmx">here</a>.</h2> </body></html>
I created a quick ASP.NET web application and added the reportviewer to it, implemented IReportServerCredentials and the report came up as expected but behaved the same way as it did in Report Manager. Same with a Windows Forms application.
Increasing the cookie timeout in the forms authentication tag is an option, but not an attractive one. Extending the reportviewer control is also an option, but I don't know if that is a good candidate right now because I don't see anything extensible yet.
Is this just the nature of RS with custom authentication or is there a viable solution out there right now?
Any and all answers are much appreciated and I thank you in advance.
Hi all, I am using forms authetication to log in to reporting services. I am using logonuser method of reporting services web service. I am getting the following error when i try to log in
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: An error occurred while attempting to verify the user.Login failed for user 'SON-1499IUSR_SON-1499'. at Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationUtilities.VerifyPassword(String suppliedUserName, String suppliedPassword) at Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension.LogonUser(String userName, String password, String authority) at Microsoft.ReportingServices.WebServer.RSCustomAuthentication.LogonUser(String userName, String password, String authority) at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.LogonUser(String userName, String password, String authority) at Microsoft.ReportingServices.WebServer.ReportingService2005.LogonUser(String userName, String password, String authority) --- End of inner exception stack trace ---
I have LocalMachine/ASPNET web service identity set in Reporting Services Configuration on Windows XP .
Well, I have SQL Server 2005 SP2 Reporting Services installed and configured in sharepoint integrated mode, so I am deploying reports in sharepoint libraries. Also I configured sharepoint to use forms authentication with builtin AspNetSqlMembership provider, but after this action I couldnot open reports through sharepoint library, instead of this, error was displayed mentioned below. I searched and found hotfix Cumulative Update 3 build 3186 for this issue, request it from microsoft support and applied it, but nothing has changed!
Error I have been experiencing is following:
An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode. --> The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/_layouts/login.aspx?ReturnUrl= %2f_vti_bin %2fReportServer%2fReportService2006.asmx">here</a>.</h2> </body></html>
I continued to dig and find out that this hotfix should update Microsoft.ReportingServices.SharePoint.UI.WebParts.dll from version 9.0.3042.0 to new version 9.0.3180.0, but when I checked file version after applying hotfix, it remained the same as was before i.e. 9.0.3042.0. Apparently this cumulative update does not fix this issue. anyone has any idea how to solve it? Thanks in advance.
I was able to log in to SSRS report manager. But i was unable to run a report i designed on report builder.
It prompts for login when i wanted to run the report and i used the same windows authentication to sign in
It will show me the parameters but when i click on view report it gives this error
 "Data source 'DataSource1': An error has occurred.
Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.Data.SqlClient.SqlException: Login failed for user 'Acc-11Admin'."
I am trying to migrate my reports from SQL server 2000 reporting services 32bit to 2005 64bit. I am following the migration steps that MS specified. Restored my Reportserver and ReportserverTempDB databases Then I was using the configure Report services to upgrade these databases but I always end up getting the follwoing exception when I run the upgrade on the "Database Setup" configuration for 'ReportServerTempDB' database System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database 'ReportServerTempDBTempDB'. No entry found with that name. Make sure that the name is entered correctly. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script) at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)
It's driving me crazy, why is it looking for 'ReportServerTempDBTempDB' in the catalog instead of 'ReportServerTempDB'? Is it possible to migrate from 32bit to 64bit?
To start, I am pretty much a MySQL php guy (no yelling) but now asked to do the following, so need to get a step in the right direction. Our company wants to publish web reports via the SQL report manager. Right now when you hit the IP / reports folder you get the authentication popup which I assume is the IIS/NT authentication.
I would like to remove that part and authenticate via a webpage on that box? I can setup a user table on that machine if need be to avoid setting up users on the local machine, but if I must do that, it's still ok, but is there .asp function or module that I can use?
I'm attempting to obtain a cost effective solution for my existing customers to develop reports on their SQL 2000 Server installations using their Reporting Services 2000. With products like Visual Basic.NET 2003 becoming almost impossible to obtain, I have at least one customer who is running into a dead end.
One option possibly is the SQL Express with Advanced Services download, which has Reporting Services. My questions are as follows:
Can the report designer component of SQL Express Reporting Services be configured to connect to an external database (which would happen to be a SQL 2000 database) to establish its datasets? Does the resultant designed report end up in an RDL file? If the customer published this report via the Reporting Services 2000 Report Manager, would the report be able to run?
Sorry for asking a question like this that I could probably answer on my own, but my customer needed this answer yesterday. I have scoured the web and microsoft sites - and posted a question on the official SQL Reporting Services cateogy ... in an attempt to answer the basic question of how to design reports for Reporting Services 2000 in the absence of Visual Basic.NET 2003 (or other .NET 2003 tools) with no success.
Maybe someone can help me. I am running the reporting service add in for Sharepoint and we have only Basic Authentication running on our site (it is on SSL). When i try and open a report in sharepoint it errors out on me. When i go back into IIS and set Windows and Basic authentication it works, but it requires me to enter our domain and username. We need to only use Basic so it will not need the domain. Anyone have any suggestions on what i can do to make this work?
Hi All may be this is not the right place to put this question but still i am trying. can some there please let me know how authnetication wotks for SQL Services. i mean when we configure SQL Services run under some domain account or local system account where and how it get authenticated that these services can run under particular account. or what rights need to assign to account in order to run SQL Services if that doesn't have sys admin rights or it has to be sys admin. why i am asking this question because i come across problem where SQL Service run under domain account but SQL Agent not.
I work in a big project and we will begin in using reporting services as the base technique for reports and I will be responsible for this part. but I have a problem I will discuss in the following:
Currently: We use currently devexpress reports and we have 2 languages(Arabic and English). the data in tables saved in two ways (Arabic and English). when the end user change the language of the web site the report data language changed when run it.
Example:
we have table with (ID, NAME_AR, NAME_EN, JobTitle_AR, JobTitle_EN). designed report will display(ID, NAME_EN, JobTitle_EN) . but the end user change the language of the system the report will
I have a ssis package with an oledb connection using windows authentication. i want to understand when i promote this package to the server and add it to a job, then a user login to the server with sql server authentication and run this job. Which/what  windows authentication this package gonna to use to connect to the server ?
I'm working on a web project that will display the reports in an iframe to the user. When I was using windows security It worked perfectly.
Now my boss wants me to use form based authentication instead that can authenticate against our current Active Directory. This is working perfectly and does authenticate correctly. The only problem is that when I load a report in the iframe http://myserver/reportserver/myreport-blah reporting services prompts the user to enter in windows credentials. Is there anyway to pass my form credentials to the report server so that the user doesn't have to log in again.
Both the report server and the web app are on the same server BUT in different virtual directories.
PS: I tried using the reportviewer control but it does not display things correctly. For example, I have use a multi select dropdown on the reports and it messes up the drop down when the user only has 1 selection (hiding the selection). If the user has more than one selection the drop down uses scroll bars. I would use the reportviewer control if it displayed exactly like it does when using alternate URL method.
Our DBA has installed reporting services on a server and now in order to access the report manager, one has to be an Admin on that Server. I am guessing that there is a mistake in the configuration of Reporting Services. Usually it should allow anybody who was added to the roles in the properties section of the Report Manager, right? I have also added the users to the DB..
Also I am using Windows Authentication to access Report Catalog items (Reporting Services is installed on Server2) from a web Application(deployed on Server1) and displaying the report using report viewer. For some reason, server1 has to be in an Admin role on Server2 to access the report catalog/report. This is kinda strange for me as I don't want everybody to be an Admin on Server2. Can anybody please point in the right direction?
We have installed SQL Server 2005 with reporting services.When tried to open getting errors as below: how to avoid such errors See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
ReportServicesConfigUI.WMIProvider.WMIProviderException: A WMI error has occurred and no additional error information is available. ---> System.Runtime.InteropServices.COMException (0x8000000A) Â at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) Â [code]...
I have some problem about reporting service add-in.
After I install reporting service add-in for SharePoint, reporting service menu does not appear in Application Management Tab in SharePoint Central Administration.
I try to uninstall and re-install again, it remain not work.
We've got a requirement to build the real time report. user can browse report at any point of time and need to see the latest data(stock market) in the report.
I've few options down...
1. Directly point to OLTP database as source and write stored procedure to show result set.
2. Replicate the database and write the SP's to reports. To avoid pointing directly to OLTP db.
3. To build the datawarehouse with dim & facts to show it in reports. I prefer this as a standard method, but this would have some latency depending on trasaction load which will differ from the requirement.
We are required to gather certain information regarding reporting services.
Which reports were requested, by whom , how long did they run for, what parameters were passed etc etc.
I see that the system tables do provide some of this information, is there a 3rd party tool or something we can use to gather all this type of information for us?
Hi, I have just install SQL 2005 SP2 and trying to get Window SharePoint Services V3 integrated with SQL 2005 SP2 reporting services. In SharePoint Central Administration, I select the Reporting Services Integration page and have setup the Report Server Web Service URL and Authentication Mode. I then goto Grant database access, specify the SQL server name, get promted for a username and password that has access SQL Reportserver and get the following error "The group name could not be found" Does anyone have any ideas? Thanks