473,395 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 3221

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.