This is a migrated thread and some comments may be shown as answers.

ReportViewer problem with form authentication

4 Answers 387 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sakha
Top achievements
Rank 1
Sakha asked on 10 May 2009, 06:57 AM

Hi,

 I'm new using controls and finds them very useful for implement web applications . 
 Recently, I have made  a sample web application that use ReportViewer to display a web report.
In Vs2008 every thing is ok and this report display correctly. But when access this report from browser, the report does not work.
i use form authentication and  insert httphandler's declaration in both web.config sections:system.web , system.webServer
i have two folder in the sample site  : root folder and admin folder with distinct special roles ( Role a for root folder and role b for admin folder )  . Every user should authenticate until can access to resources. Users that can access to Root folder, can use report without any problem, but users which have Role b and access to admin folder, can't run Report.
Does   access to Telerik.ReportViewer.axd from admin folder have security challenge? 
I want to develop some reports for User that have Role a and some reports for user that have role b, any advice?
I search the entire Reporting Forum, with no luck.   May be missing something? 
Please help me for solve this problem.
Thank you  for taking the time to read this post .

 

 

 

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 May 2009, 09:27 AM
Hello Sakha,

We would need more information:
  • do you receive any errors? If yes what is the error, please paste the stacktrace
  • If there is no error please use http debugging proxy like fiddler to verify what is happening behind the curtains i.e. whether the report is requested at all and if so why does not load.
  • how did you register the handler in the web.config? Does your live server use IIS7?
A sample project that we can test on our end is usually the best and fastest way in providing you with resolution.
Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sakha
Top achievements
Rank 1
answered on 13 May 2009, 05:17 AM
Thanks for your reply 
1 ::
 I didn’t get any error message from server side code , but when my report is request and run in browser , i got some  client side errors ( JavaScript ) . It doesn't display a report and all the icons are missing in the toolbar.  I checked and all the files including the four Telerik reporting DLL's were in my root bin folder.

2 :: 
    testing server  OS : XP with sp3  and IIS 6.0  , Telerik Reporting dlls version : 3.0.9.311
3::
  web resources  that are in root folder  are properly handled by test server , but  web resources that are in admin folder ,  don’t handle correctly and  when i run fiddler  i see below messages in multiple request between client and server http conversation with different query string parameters:

GET /WebSite/Telerik.ReportViewer.axd?name=Skins.Office2007.NextPage.gif&version=3.0.9.311&optype=Resource HTTP/1.1  
 HTTP/1.1 302 Found

4 ::

Registration handler in the   web.config ( root folder )

Sesction 1 :  
 
<system.web> 
 
<httpHandlers> 
             <add verb="*" path="Telerik.ReportViewer.axd" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=3.0.9.311, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="false"  /> 
 </httpHandlers> 
 
</system.web> 
 
Section 2 :  
 
<system.webServer> 
   
    <handlers> 
             <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=3.0.9.311, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode,runtimeVersionv2.0"   /> 
    </handlers> 
    <validation validateIntegratedModeConfiguration="false" /> 
     
  </system.webServer> 

5 :: 
Users that have Role A , should access to web resources that are in root folder and users that have Role B , should access to web resources that are in admin folder.

Sincerely yours,
Sakha

0
Steve
Telerik team
answered on 15 May 2009, 12:27 PM
Hello Sakha,

Thank you for the additional information. From the provided info we believe that the problem is with the http handler of the report viewer. The report viewer streams the report and all of its resources from the http handler and if you're somehow altering (other http handlers that might interfere, improperly configured compression modules etc.), then such problems are expected.
Please make sure the request for the viewer are always passing through. Also it is a bit unclear whether you have a nested application for the second role - if this is the case have you added web.config with the relevant http handler registrations to it?

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sakha
Top achievements
Rank 1
answered on 16 May 2009, 09:52 AM

Hello Steve,
Thanks for your last post
I checked  web.config in root folder many times and statement by statement and finally with your attention and essential security permission for running Telerik.ReportViewer.axd from admin folder, I put below codes in web.config (root folder) and that has solved the problem. 
 


<location path="Telerik.ReportViewer.axd">  
    <system.web> 
      <authorization> 
        <allow users="*"/>  
      </authorization> 
    </system.web> 
  </location> 

Now, my report in admin folder runs without any problem.


Thank you for your time and support.
Tags
General Discussions
Asked by
Sakha
Top achievements
Rank 1
Answers by
Steve
Telerik team
Sakha
Top achievements
Rank 1
Share this question
or