Archive

Archive for October, 2008

SSRS 2008 integrated mode: Security

October 15th, 2008 14 comments

When you configure SSRS 2008 to run in SharePoint integrated mode, the way you configure authentication and permissions in your SharePoint Web application matters a lot, because:

  1. That’s what report server uses to control access to report server items and operations.
  2. This would dictate what kind of security model you can use in your reports data sources to access external data sources.


Figure 1: Authentication settings for your Web application is an important step in the integration

Having SharePoint to perform authentication and access control doesn’t mean that SSRS is unaware of the security context under which reports gets executed. The report server uses an internal component called security extension (only available in SharePoint integrated mode) to query WSS object model to find out whether or not the requested resource or operation can be performed for the passed in security context.


Figure 2: Security extension queries SharePoint OM to check for permissions

Read more…

Categories: MOSS 2007, SSRS Tags: , ,

Dispose Sanitation and Confusion!

October 13th, 2008 No comments

I guess when MS experts decided to publish this article , they kind of solved many questions in people’s head with regards to dispose patterns that one should follow when developing against SharePoint object model. Although , I respectfully disagreed with two things mentioned in that article (such as disposing RootWeb object or not putting Response.Redirect() in the finally block as I stated here a long time ago) , this article has been always my first-to-check kind of reference when I have any disposal related questions. It was a great move. Later on , Roger Lamb started to maintain a fantastic list of Dispose rules here which was again another great help to the developer community. What’s great about Roger’s post is that he keeps updating it which makes it even more attractive to follow.

Admittedly, with all the efforts put towards this so far, there are still a few edge cases that are not clear when it comes to hygienic disposal of our objects . I am hoping that Microsoft’s top subject matter experts can shed some light on them. For example – I have done some research on whether I should call Dispose() on SPWeb or SPSite objects returned by properties objects or those objects are automatically disposed by the reference code. I was particularly interested in the following three scenarios:

Ā Provisioning Handler:

[CSharp]
public class InfraStructureProvisioningEngine : SPWebProvisioningProvider
{
public override void Provision(SPWebProvisioningProperties props)
{
//Does the following reference to SPWeb leak?
SPWeb web = props.Web;
//Omitted code for brevity
}
}
[/CSharp]

Event Handler:

[CSharp]
public class UserPictureListEventHandler : SPItemEventReceiver
{
public override void ItemUpdated(SPItemEventProperties properties)
{
//Does the following reference to SPWeb leak?
SPWeb webNonelevated = properties.OpenWeb();
// Omitted code for brevity
}
}
[/CSharp]

Feature Receiver :

[CSharp]
public class ODSSParticipateFeatureReceiver : SPFeatureReceiver
{
public ODSSParticipateFeatureReceiver() { }
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
//Does the following reference to SPSite leak?
SPSite site = properties.Feature.Parent as SPSite;
// Omitted code for brevity
}
}
[/CSharp]

Reflecting into MS code didn’t help as those places in which I could potentially find the answer, were mostly obfuscated and reading the IL didn’t reveal anything either šŸ™

Based on my research some of them dispose and some do not as they may be somehow bound to SPContext object! There are quite a few places where properties object is created and returned to the caller , so I am like , okay, under what situations I need to dispose then? Honestly , in a feature receiver that barely gets activated or deactivated , properties leakage might not be a biggie , but in an event handler on a busy list ,this can cause the memory footprint of your application grow which is definitely not a good thing!

Last Friday , I finally got a chance to exchange couple emails with Roger Lamb and ask him my questions. His comment is that he is still researching on this particular case and he’ll get back to me (FWIW, to all of us!) by a blog post in the following weeks. All I can say is that I am really looking forward to see what Roger will come up in his blog post. Keep an eye on his blog if you’re interested in this topic.

Now that we are into disposing stuff, let me share another thing with you.We know for sure that disposing the SPWeb object returned from the call to SPContext.Current.Web and the SPSite object returned from the call SPContext.Current.Site is a big NO NO , right? but what about disposing oSite object in the following code snippet?

[CSharp]
SPWeb oWeb = SPContext.Current.Web;
SPSite oSite = oWeb.Site;
[/CSharp]

just be aware that objects hanging off of SPContext , no matter how many levels deep it gets, SHOULD NOT be disposed and does not require any action. Another thanks to Roger for confirming this one for me again!

Categories: MOSS 2007 Tags:

SSRS 2008 Integrated Mode on Existing Apps

October 12th, 2008 3 comments

As you can see , I’ve started to gradually blog my notes that I have gathered so far with regards to installing SSRS 2008 in an integrated mode with MOSS 2007 , also including the solutions and workarounds if possible. Here is a tricky one:

Before we performed the integration , we had provisioned a SharePoint Web application and extended it to an internet zone. We used domain user account for the application pool of this Web application ;therefore for its extended Web application. Default zone was configured to use Windows Authentication and extended zone with our custom auth provider.

applicationpoolundercustomaccount.png

** Snapshots are from an environment I used to replicate the issue**

We went ahead and performed the exact configuration steps on both report server and SharePoint WFE server. We also used domain user accounts for services accountsĀ  all the way through as recommended here and verified that integration is in a healthy state. I documented part of our verification tests here.Ā  In the Reporting Services Integration tab in the Central Administration site We specified Windows Authentication.

Read more…

Categories: MOSS 2007, SSRS Tags:

SSRS 2008 Add-in for SharePoint

October 12th, 2008 23 comments

Unless you are living under the rock , you’d probably know that since SQL Server 2005 SP2 time frame , you can configure a deployment of SQL Server Reporting Services to work with a deployment of SharePoint – known as SSRS 2008 installation in SharePoint Integrated mode. In the first attempt to combine their Business intelligence and Information Portal technologies together and by releasing SQL Server 2005 SP2 , Microsoft brought two very interesting technologies together and opened up a world of interest to many people including myself . When I first read about SP2 , I was like wait a minute, this is awesome!Ā  Both products that I had been really passionate about for years now are getting much closer! Needless to say that I’ve always appreciated theĀ  efforts Microsoft has put into making the technology , geekyness and weirdness around it transparent to the vast majority of people out there.

When SQL Server 2005 SP2 was released , MS really demonstrated that not only do they listen to their customer feedback, they also care so much about developers and to make their life easier. For example , in the context of SharePoint and SSRS integration , now you can potentially hire a report developer,they can build the reports (in much easier way) and publish them into SharePoint and basically hand them over to theĀ  user community and business users. From here , they can take the wheel, manage and interact with these reports (high level) without having to know what the hell is going on under the hood! Isn’t that amazing that how two completely different technologies can be combined to make things much easier for everyone? Remember, easier something is, more people will use it. More people use it, more popular youā€™ll become! Microsoft ,for sure, has proved that they’ve learned this very simple rule of life…

The only thing that tipped me over the edge at that time was when I first attempted to bring the the best out of both products in a “real” integration project with a very “difficult-to-get-along” kind of client! (I still have theĀ  nightmare of those two days) .Ā  I really don’t want to talk about those issues here , but what made it difficult for me was noĀ  proper documentation , no active community around both productsĀ  and , to an extend,Ā  the immaturity of the integration . Things certainly have changed since then and obviously I’ve learned my “integration” lessons as well! Not that I don’t face any issues these days, but nowadays it’s much easier to find an answer – and yes , I find the answers to the majority of my questions in the blogs of those who are blessed and willing to SHARE their POINTS with the rest of the world!

When SQL Server 2008 and SSRS 2008 was RTMed , I didn’t make the same mistake I had made back in 2005 šŸ™‚ . I decided to to gain some home-based lab experiences before I go live with this in real engagements (Didn’t I just tell you that I learnt my integration lessons? šŸ˜‰Ā  ) Surprisingly, every installations I had at my home-based farms from a single stand-alone installation to a scale-out SSRSĀ  along with a large SharePoint Server farm went really smooth without big stucking points. Documentation around the integration is much better this time around, but I am still not happy by the coverage of SSRS 2008 and SharePoint integration by MS people and community! Let’s hope it gets better soon.

Speaking of SSRS 2008 Add-in for SharePoint, here is one question that I frequently get asked :

I have configured report server in SharePoint integrated mode. I have installed SharePoint Web front-end components on the report server computer.I have downloaded and installed the Reporting Services Add-in for SharePoint Technologies on my otherĀ  Web front-end servers (including the one that hosts the Central administation site) , but Reporting Services section doesn’t appear in the Central Administration site;therefore I cannot complete the integration.Ā  Where did it go?

Well , the answer is : You need to activate a site collection-scoped feature called Report Server Integration Feature on the Central Administration site.

CentralAdminReportServerIntegrationFeatureAtSiteCollectionLevel

This feature has two different behaviors when gets activated on Central administration site than other sites. When activated on the Central administration site , the feature does all of the things it does for other type of sites , plus it adds a sectionĀ  called Reporting Services under the Application Management. This section must be used to make sure SharePoint is aware of my SSRS instance existence. Here is where the fun part starts šŸ™‚ .

Read more…

Reza, Backup, Backup & Backup!

October 5th, 2008 2 comments

Here is a nice Pre-Weekend surprise:

After an [Unwanted!] Windows update which restarted my computer the night before , I turned on one of my Windows 2008 machines and Windows froze at the start up progress bar. Basically , it shows the progress bar which is a good sign (Control has been handed over to the OS) , but immediately after that the screen goes black and Desktop never appears. I noticed that one of my hard disks goes grinding for 3 seconds , silent for 2 seconds and so on and so forth- I mean the same annoying sound pattern kept happening forever! Sounds like something is corrupted in my File System.

With my Google hat on, I found out that I am not alone in this , but most of the reported issues were related to the corrupted drivers. For what it’s worth , I never installed any new driver! Attempted “last known good configuration” , but no luck. Both safe mode options available in Windows 2008 also froze at crcdisk.sys command. I am like , WTF! I was just hoping that it was not the system drive that kept failing on me.

Finally opend up the case and took out the two non-system drives and rebooted. It booted up!… tried each drive with a new reboot , until I found the faulty drive. I took out that corrupted drive and put it into an SATA enclusure and hooked it up to the same box. Starange enough the OS reconginized it , but I couldn’t access the drive. Formatted it and put it back into the case and everything got back to the normal life before the crisis!

<Confession>Man, things like what happend to me on Friday scares the shit out of me. When do I want to learn the Backup lesson?!</Confession>

Categories: General Tags: