Showing posts with label authentication. Show all posts
Showing posts with label authentication. Show all posts

Monday, March 26, 2012

Reporting Services 2000 w/ Forms Auth - rs.Timeout not getting set

I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, and then called the LogonUser().

Now, one of the functionality we have in the applicaiton is to set the reporting services Timeout for reports that take too long to run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout property is getting set.

I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.

How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout property for Reporting Services with Forms Authentication?

Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.

/**partial UILogon.aspx code for ReportServerProxy below**/

public class ReportServerProxy : ReportingService

{

protected override WebRequest GetWebRequest(Uri uri)

{

HttpWebRequest request;

request = (HttpWebRequest)HttpWebRequest.Create(uri);

// Create a cookie jar to hold the request cookie

CookieContainer cookieJar = new CookieContainer();

request.CookieContainer = cookieJar;

Cookie authCookie = AuthCookie;

// if the client already has an auth cookie

// place it in the request's cookie container

if (authCookie != null)

request.CookieContainer.Add(authCookie);

request.Timeout = -1;

request.Headers.Add("Accept-Language",

HttpContext.Current.Request.Headers["Accept-Language"]);

return request;

} ...}

/** Below is the Reports Web applicaiton code that calls the ReportsServerProxy LogonUser **/

Public Function GetReportServerProxy() As ReportServerProxy

Dim rsProx As New ReportServerProxy

rsProx.Url = ConfigurationSettings.AppSettings("REPORT_SERVER_URL") + "/ReportService.asmx"

Try

rsProx.LogonUser("SYSADMIN", "password", Nothing)

Return rsProx

Catch ex As Exception

Throw New Exception("GetReportServerProxy Failed.", ex)

End Try

End Function

Private Function CreateSnapShot() As String

...

Dim rs As RSCustomSecurity.ReportServerProxy

Try

rs = GetReportServerProxy()

' First set the parameters' default values

parameters = setParamters()

rs.SetReportParameters(reportPath, parameters)

If errorsList.Count > 0 Then Throw New Exception

'Server.ScriptTimeout = 10

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

'lblStatus.NavigateUrl = "ViewSnapShot.aspx?History_ID=" & lsHistoryID

lblStatus.Text = "Your request has been processed. View report as"

....

Catch ex As Exception

....

Finally

Debug.Write("End : " & Now.ToLongTimeString)

rs = Nothing

End Try

End Function

Anyone that has any idea, PLEASE respond. Just to reiterate...

I have implemented the forms authentication for Reporting Services 2000. Below, I set the ReportingServices.Timeout property and then call CreateReportHistory(). Before I implemented the Forms Authentication, the timeout was getting recognized, which means the CreateReportHistorySnapshot errors out with a message "Operation timed out". But now, with Forms Authentication, the Timeout is not recognized and CreateReportHistory runs until it finishes generating the report, which can take a while to run. Does anyone know what I need to do to set it correctly?

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

Thanks!

Reporting Services 2000 w/ Forms Auth - rs.Timeout not getting set

I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, andthen called the LogonUser().

Now, one of the functionality we have in the applicaiton istoset the reporting services Timeout for reports that take too longto run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout propertyis getting set.

I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.

How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout propertyfor Reporting Services with Forms Authentication?

Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.

/**partial UILogon.aspx code for ReportServerProxy below**/

publicclass ReportServerProxy : ReportingService

{

protected override WebRequest GetWebRequest(Uri uri)

{

HttpWebRequest request;

request = (HttpWebRequest)HttpWebRequest.Create(uri);

// Create a cookie jar to hold the request cookie

CookieContainer cookieJar = new CookieContainer();

request.CookieContainer = cookieJar;

Cookie authCookie = AuthCookie;

// if the client already has an auth cookie

// place it in the request's cookie container

if (authCookie != null)

request.CookieContainer.Add(authCookie);

request.Timeout = -1;

request.Headers.Add("Accept-Language",

HttpContext.Current.Request.Headers["Accept-Language"]);

return request;

} ...}

/** Below is the Reports Web applicaiton code that calls the ReportsServerProxy LogonUser **/

PublicFunction GetReportServerProxy() As ReportServerProxy

Dim rsProx AsNew ReportServerProxy

rsProx.Url = ConfigurationSettings.AppSettings("REPORT_SERVER_URL") + "/ReportService.asmx"

Try

rsProx.LogonUser("SYSADMIN", "password", Nothing)

Return rsProx

Catch ex As Exception

Throw New Exception("GetReportServerProxy Failed.", ex)

End Try

EndFunction

PrivateFunction CreateSnapShot() AsString

...

Dim rs As RSCustomSecurity.ReportServerProxy

Try

rs = GetReportServerProxy()

' First set the parameters' default values

parameters = setParamters()

rs.SetReportParameters(reportPath, parameters)

If errorsList.Count > 0 Then Throw New Exception

'Server.ScriptTimeout = 10

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

'lblStatus.NavigateUrl = "ViewSnapShot.aspx?History_ID=" & lsHistoryID

lblStatus.Text = "Your request has been processed. View report as"

....

Catch ex As Exception

....

Finally

Debug.Write("End : " & Now.ToLongTimeString)

rs = Nothing

End Try

EndFunction

Anyone that has any idea, PLEASE respond. Just to reiterate...

I have implemented the forms authentication for Reporting Services 2000. Below, I set the ReportingServices.Timeout property and then call CreateReportHistory(). Before I implemented the Forms Authentication, the timeout was getting recognized, which means the CreateReportHistorySnapshot errors out with a message "Operation timed out". But now, with Forms Authentication, the Timeout is not recognized and CreateReportHistory runs until it finishes generating the report, which can take a while to run. Does anyone know what I need to do to set it correctly?

rs.Timeout = Integer.Parse(ConfigurationSettings.AppSettings.Get("REPORT_PROCESS_TIMEOUT"))

lsHistoryID = rs.CreateReportHistorySnapshot(reportPath, warnings)

Thanks!

sql

Friday, March 23, 2012

Reporting Services & Authentication

Hi

I'm just about to embark on a project which will use Reporting Services and ASP.net.

I need to produce about 800 individual reports which will then bemade accessible via the internet. Each report will only be accessibleto a specific user so I want to allow users to be able to logon usingan asp.net form which will then redirect them to their specific report.

I believe this can be done but how and can anyone direct me to a really good tutorial?

Many thanks

Hmm, I don't think much of this forum - nobody answers your questions. Are there any so called experts out there!?? :-(

Thankfully I have managed to find it out myself but only after some time.

This should help someone with a similar problem:

http://msdn2.microsoft.com/en-us/library/ms365305.aspx

plus, if you have put the RS samples on your pc look at the forms authentication sample here:

C:\Program Files\Microsoft SQL Server\90\Samples\Reporting Services\Extension Samples\FormsAuthentication Sample\cs\FormsAuthentication

Hope this helps

Tuesday, March 20, 2012

Reporting Services

Authentication via internet explorer fails when connecting to reporting
services from a hostname other then the NETBIOS name.
for example my servers name is BOB
so if i do http://bob/ReportServer it works fine
I have an A record that points reportingservices.mydomain.com to BOB's ip
address
so if i go to http://reportingservices.mydomain.com/ReportServer I get the
user credentials box. How can I fix this?On Mar 2, 9:06 pm, Nick T <N...@.discussions.microsoft.com> wrote:
> Authentication via internet explorer fails when connecting to reporting
> services from a hostname other then the NETBIOS name.
> for example my servers name is BOB
> so if i dohttp://bob/ReportServerit works fine
> I have an A record that points reportingservices.mydomain.com to BOB's ip
> address
> so if i go tohttp://reportingservices.mydomain.com/ReportServerI get the
> user credentials box. How can I fix this?
It seems like you should check the authentication methods of the
virtual directory pointed to in IIS for http://reportingservices.mydomain.com/ReportServer.
Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||The virtual directory is just part of the default web site
"EMartinez" wrote:
> On Mar 2, 9:06 pm, Nick T <N...@.discussions.microsoft.com> wrote:
> > Authentication via internet explorer fails when connecting to reporting
> > services from a hostname other then the NETBIOS name.
> >
> > for example my servers name is BOB
> >
> > so if i dohttp://bob/ReportServerit works fine
> >
> > I have an A record that points reportingservices.mydomain.com to BOB's ip
> > address
> >
> > so if i go tohttp://reportingservices.mydomain.com/ReportServerI get the
> > user credentials box. How can I fix this?
> It seems like you should check the authentication methods of the
> virtual directory pointed to in IIS for http://reportingservices.mydomain.com/ReportServer.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||Hello,
I think this situation depends on security settings in IE.
Try to add http://reportingservices.mydomain.com/ website to your trusted
websites.
If still you 'll be prompted for login and password check security settings
in IE (for trusted sites).
Ensure that you have checked the last option for logging user (logging with
current user name and password).
I hope this will help.
Best regards,
Rados³aw £ebkowski
U¿ytkownik "Nick T" <NickT@.discussions.microsoft.com> napisa³ w wiadomo¶ci
news:2821371F-75FC-4BC7-A0E0-B7B01A512874@.microsoft.com...
> Authentication via internet explorer fails when connecting to reporting
> services from a hostname other then the NETBIOS name.
> for example my servers name is BOB
> so if i do http://bob/ReportServer it works fine
> I have an A record that points reportingservices.mydomain.com to BOB's ip
> address
> so if i go to http://reportingservices.mydomain.com/ReportServer I get the
> user credentials box. How can I fix this?

Wednesday, March 7, 2012

Reporting Server user access

Hi,
I'm having problem with the authentication in reports. When a user sign
in to Report Administrator or Report Server validates with the IIS'
configuration. Onces inside always use the same user with the rules
security: IWAM_machine.
I need the account used inside of Reporting Server/Reporting Administration
should be the same that the account used to validates with IIS.
It's possible'
Thank you in advanced.
OliverUsually this is because anonymous is set on the IIS web site settings.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"oli" <oli1350@.hotmail.com> wrote in message
news:eHPoJtZZEHA.3132@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'm having problem with the authentication in reports. When a user sign
> in to Report Administrator or Report Server validates with the IIS'
> configuration. Onces inside always use the same user with the rules
> security: IWAM_machine.
> I need the account used inside of Reporting Server/Reporting
> Administration
> should be the same that the account used to validates with IIS.
> It's possible'
> Thank you in advanced.
> Oliver
>|||I've configured the IIS with only windows authentication, when i connect to
Reporting Server or Reporting Administrator uses the windows account, but
the security rules work different:
I have configured rules for two accounts: my windows account and
IUSR_machine.
When i try to connect to servers i put my windows account and goes ok, but
the security rules works with the rules assigned to the iusr_machine. Any
rule assigned to my user doesn't have effect, and all the changes makes in
the IUSR_machine's rules have effect.
I've configured restrict access to the iusr_machine and grant permission for
my windows account. When i connect with my windows account and i try to do
any task that iusr_machine haven't permission, the server response me that
the iusr_machine haven't permmission to do it.
Any idea?
thank you.
Oliver
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> escribió en el
mensaje news:OT0ifxqZEHA.212@.TK2MSFTNGP12.phx.gbl...
> Usually this is because anonymous is set on the IIS web site settings.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "oli" <oli1350@.hotmail.com> wrote in message
> news:eHPoJtZZEHA.3132@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > I'm having problem with the authentication in reports. When a user
sign
> > in to Report Administrator or Report Server validates with the IIS'
> > configuration. Onces inside always use the same user with the rules
> > security: IWAM_machine.
> > I need the account used inside of Reporting Server/Reporting
> > Administration
> > should be the same that the account used to validates with IIS.
> >
> > It's possible'
> >
> > Thank you in advanced.
> >
> > Oliver
> >
> >
>

Saturday, February 25, 2012

Reporting server and Active directory authentication

Hi!
Does anybody know how one can prevent users from accessing some
reports on the report server website using active directory? I have an
active directory with all the users and I would like to use this to
enable / disable users from viewing and accessing reports.
Cheers ErikOn Jan 30, 1:12 am, e...@.liffner.se wrote:
> Hi!
> Does anybody know how one can prevent users from accessing some
> reports on the report server website using active directory? I have an
> active directory with all the users and I would like to use this to
> enable / disable users from viewing and accessing reports.
> Cheers Erik
Hi Erik,
You should be able to set up securtiy via the report manager website.
Permissions can be set for folders or individually for reports. If
you look at the properties and go to the security tab, you will see
the users who have permission to access the object. To start with, you
should see the user 'BUILTIN\Administrators' as Content Manager.
Here you can add new users with different roles, or create you own
roles.
Is that what you are looking for?
Rowen

Reporting Server 2000 Authentication Issue

Hi,

I have installed the eval version of Reporting Services 2000 on my pc. And i've used the report viewer control to view the report on a ASP.NET Page. When i view that .ASPX page, i get a windows authentication window before it opens the actual report.

Is there any way to disable this windows authentication dialouge box?

Regards,

PS: in the viewer i gave the path of the report as http://localhost/Rerport/ABC.rdl
I also tried with the ip address in place of localhost.
The ReportViewer control that ships with Visual Studio 2005 does not support Reporting Services 2000.

-Lukasz

Reporting Servcies Sessions

Hey

I have a problem in controlling the report session.

I created a Reporting Model using SQL reporting Services 2005 with Forms authentication on which I implemented the security Filter based on the function GetUserID() to report only against data that belong to the login User, and I deployed the Model.

Using report Builder application I created a report that contain in the first column the user name (UserName) from entity “Users”, and in the remaining columns data from other entities related to table users, I saved the report on the report server.

I logged in into report manager with user “User1” and I ran the report, the result was the same as expected (in the first column “User1” appeared and in the remaining column other data related to this user appeared) every thing went good

After that I logged in with the user “User2” and I ran the report and here was the surprise the same data that appeared for "User1" appeared for "User2". but what was Expected is different data that belong to "User 2"

After some research that says that this problem may be caused by a session issue (the session created for the first user who enters the report server will remain for the other users that enter after him), I reset IIS and I logged in with “User2”, and I ran the report the correct data for “User2” appeared So it may be a session issue.

My question is:

Is there any way to control the session content and the session expiration?

Please note I used all the solution provided in my research such as URL parameter rs:ClearSession = true, and the Report Execution Options in report manager but non of this helped me.

I will be thankful for any one who could help me in this urgent issue.

Thank you

BOB

Hi Bob,

I have the same issue here. Did you manage to get a solution for your problem?

Julian Kooiker

Reporting Servcies Sessions

Hey

I have a problem in controlling the report session.

I created a Reporting Model using SQL reporting Services 2005 with Forms authentication on which I implemented the security Filter based on the function GetUserID() to report only against data that belong to the login User, and I deployed the Model.

Using report Builder application I created a report that contain in the first column the user name (UserName) from entity “Users”, and in the remaining columns data from other entities related to table users, I saved the report on the report server.

I logged in into report manager with user “User1” and I ran the report, the result was the same as expected (in the first column “User1” appeared and in the remaining column other data related to this user appeared) every thing went good

After that I logged in with the user “User2” and I ran the report and here was the surprise the same data that appeared for "User1" appeared for "User2". but what was Expected is different data that belong to "User 2"

After some research that says that this problem may be caused by a session issue (the session created for the first user who enters the report server will remain for the other users that enter after him), I reset IIS and I logged in with “User2”, and I ran the report the correct data for “User2” appeared So it may be a session issue.

My question is:

Is there any way to control the session content and the session expiration?

Please note I used all the solution provided in my research such as URL parameter rs:ClearSession = true, and the Report Execution Options in report manager but non of this helped me.

I will be thankful for any one who could help me in this urgent issue.

Thank you

BOB

Hi Bob,

I have the same issue here. Did you manage to get a solution for your problem?

Julian Kooiker