472,779 Members | 2,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Reporting services Credentials Xpert Help need

Hello guys;

I

i have just found the solution to my problem but would like to full
understand
the solution so would be great full if you could enlighten me.
OUR Set-up

Server A = <WEBSERVER>
SERVER B = <SQLServer & ReportingServer>

Both in workgroups(but on the same domain) behind firewall.
user logs into website, request a client report.

connection made to webserver <Server A>
webserver quiers Reporting Server <Server B>
Reporting Server quiers SQLServer <Server B>

Report Displayed in client browser


Topic A:
Web.config file on Server A
<identity impersonate="true" userName="userX"
password="userXpassword"/>
Q) am i right in thinking with this setting in your web.config file you
will be
impersonating userX that has been setup on Server B and assigned the
proper rights.


Topic B:
Passing credential as opposed to impersonating userX

(Using form authentication to log users in - checking against user
table in database)

Q) Basically the user will select a report, once this selection is made
the parameter collection is queried to
get the required parameters for the report using this collection the
appropriate control values are
taken from the controls on the web page. to make system more secure i
would prefer to pass the credentials from within the
code. from my reading i figured that i have to

1) create a credentialcache and populate with user info i.e.
code:

Dim report As String = strReportPath & strReportName
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As webServ.ParameterValue() = Nothing
Dim credentials As webServ.DataSourceCredentials() =
Nothing
Dim parameters As webServ.ReportParameter() = Nothing

'Create an instance of the CredentialCache class.
Dim cache As Net.CredentialCache = New
Net.CredentialCache()

'Add a NetworkCredential instance to CredentialCache.
'Negotiate for NTLM or Kerberos authentication.
cache.Add(New Uri(rs.Url), "Negotiate", New
Net.NetworkCredential("userX", "userXPassword", "domain"))
rs.PreAuthenticate =True
'Assign CredentialCache to the Web service Client
Proxy(myProxy) Credetials property.
rs.Credentials = cache
' get parameter
parameters = rs.GetReportParameters(report, historyID,
forRendering, values, credentials)

2) create a credential class that implements
'Microsoft.Reporting.WebForms' = (ReportVererCredentials) i.e
code:

dim clsObj as New ReportVererCredentials("userX",
"userXPassword", "domain")
ReportViewer1.ServerReport.ReportServerCredentials =
clsObj
I cant understand why i have to pass the credential twice in two
different ways. but if i don't i get an "401 error access denied"
as i said this code now works but im not sure if im am doing things
correctly can you advise.

Topic C
I have a test web server that i use to run the website and it works
fine on that but when i move the same code to
my Main web server i get an error on the line
dim clsObj as New ReportVererCredentials("userX", "userXPassword",
"domain")
COMPLIE ERROR MESSAGE: BC30002 Type 'ReportVererCredentials' is not
defined.
any ideas what this is, am i declaring the class
'ReportVererCredentials' properly

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Public Class UserObj

Private Shared intID As Integer

Public Shared Property ID() As Integer
Get
Return intID
End Get
Set(ByVal value As Integer)
intID = value
End Set
End Property

Private Shared strUserName As String
Public Shared Property UserName() As String
Get
Return strUserName
End Get
Set(ByVal value As String)
strUserName = value
End Set
End Property

Private Shared intPermission As Integer
Public Shared Property Permission() As Integer
Get
Return intPermission
End Get
Set(ByVal value As Integer)
intPermission = value
End Set
End Property

Private Shared intClientID As Integer
Public Shared Property ClientID() As Integer
Get
Return intClientID
End Get
Set(ByVal value As Integer)
intClientID = value
End Set
End Property

Private Shared intEnabled As Integer
Public Shared Property Enabled() As Integer
Get
Return intEnabled
End Get
Set(ByVal value As Integer)
intEnabled = value
End Set
End Property


End Class


i also have the

<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

in the web.config file
a lot I know but your help most appreciated
phil.

Nov 30 '06 #1
0 3191

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: schramae | last post by:
Hi, I have just reinstalled Reporting Services on win 2003 server that was added to a domain and has been renamed. Two strange things happen: 1) In IE I am prompted for an ID and password with a...
8
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
0
by: raj | last post by:
hi, i am getting JavaScript error while adding the <Toolbar>True</Toolbar> in sql reporting services i have defined the device info as string devInfo ="<DeviceInfo><Zoom>" +...
1
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
3
by: =?Utf-8?B?QS4gUm9iaW5zb24=?= | last post by:
I have been looking high and low and can't seem to find anything a little more detailed on the whole RS utility. What I'm looking for specifically is some type of programming reference. Also, I...
0
by: RSH | last post by:
Hi, I am trying to access a reporting services report using the HTTPWebRequest object but I am getting an error: The remote server returned an error: (401) Unauthorized. We can't seem to figure...
3
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
We use SQL Server 2000 We user VS 2005 How can we use SQL Server reporting Services? Thanks,
0
by: fperri | last post by:
Hi, I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.