Feed Icon  


  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics


Open Source Projects



WebParts and Web Services

Posted in Reporting Services | SharePoint at Tuesday, 17 February 2004 07:05 Pacific Standard Time

If you're doing any SharePoint development, then you will almost certainly be familiar with WebParts. WebParts are pretty much just fancy ASP.Net controls that allow the user to place them into WebPart Zones and save a personalized state, all of which is managed by SharePoint. WebParts are created using Visual Studio.Net (or a .Net compilier if you're into that type of thing).

One of the biggest problems I've run into so far when developing WebParts was in regard to web services. One of the WebParts that I've been working on was a Reporting Services WebPart. To program against Reporting Services you have to use the Report Services web service. This web service handles security using Windows NT authentication, so when you make calls to the service you have to provide it with credentials.

All of this is fine except for the fact that you can't take the credentials that you get in the WebPart (which are the ones passed in via the browser) and then pass those same credentials to the web service. This is known as a “double-hop” and isn't supported due to the way NT authentication is done (an interesting read). So what can you do?

Currently I've been doing a lot of client side javascript programming to get around this. To do this you create an MSXML http request and call the web service directly from the client and then parse the results and populate the web part using client side javascript. This actually works pretty well. I came across this method when I was porting the Office 2003 WebParts to an Office XP WebParts package that I created. However, when you add in postbacks, client script blocks, and code maintenance, this approach gets pretty complex pretty quickly.

Some other approaches can be taken such as using basic authentication with https. I'm also looking into seeing if I can make the web service calls using an administrator account but using a security check that passes in the userid to see if the user has permission to access the report. But I've had to put the project on a backburner for a bit while I build some more MDX reports.

Update: I've posted my first article on Reporting Services webparts here which covers the client side script approach.

Friday, 19 March 2004 02:05:00 (Pacific Standard Time, UTC-08:00)
Your "Double-hop"-problem is not about supported or not, this limitation is by design. If you use Kerberos delegation you can do multiple hops also with Reporting Services.
Wednesday, 31 March 2004 02:27:00 (Pacific Standard Time, UTC-08:00)
I was wondering if you would like to share this webpart?
Wednesday, 31 March 2004 23:25:00 (Pacific Standard Time, UTC-08:00)
I don't think I can really share the webpart since I built it at work, but perhaps I can write an article that details how to make client side webservice calls in a webpart.
Wednesday, 14 April 2004 13:45:00 (Pacific Daylight Time, UTC-07:00)
that would be great
Thursday, 27 May 2004 09:56:00 (Pacific Daylight Time, UTC-07:00)
I've now shared them!
<br><a target="_new" href="http://blogs.sqlxml.org/bryantlikes/archive/2004/05/27/629.aspx">http://blogs.sqlxml.org/bryantlikes/archive/2004/05/27/629.aspx</a>
Comments are closed.