|
SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies
Last changed: Dec 22, 2008 10:51 by Tim Coalson
Labels: ssrs, administration, webparts, security, stepbystep The purpose of this blog post is to provide a step by step walk through for setting up Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies. This add-in allows for Reports to run within the context of SharePoint. The Reporting Services Add-in provides the following functionality:
SetSPNSetSPN (set spin) is used to configure Active Directory user and computer accounts for Kerberos delegations. Kerberos delegation is necessary if you are running reporting services on a separate server than your SharePoint server. If user A hits a website on computer B, computer B can forward the authentication to computer C. There are two benefits to configuring Kerberos; one, Kerberos is a more secure protocol than NTLM, two, Kerberos is necessary to correctly configure Reporting Services.
On the SQL/Reporting Server
On the SharePoint ServerInstall the SharePoint add in for Reporting services.
External Link for Editing a SharePoint Document
Have a need to edit a document that is stored within SharePoint, but provide the link within another application? Using just the URL to the document will only give you read-only access to the document, but a little bit of digging on the javascript involved provides a fairly simple solution. Note that this has only been tested with Word 2007 and Excel 2007. The short answer is to reference the following scripts (I do this in the <HEAD> section of the page): <script type="text/javascript" language="javascript" src="http://<sharepoint server>/_layouts/1033/init.js"></script> <script type="text/javascript" language="javascript" src="http://<sharepoint server>/_layouts/1033/core.js" defer></script> For example: <script type="text/javascript" language="javascript" src="http://tw-lt-m90-001/_layouts/1033/init.js" ></script> <script type="text/javascript" language="javascript" src="http://tw-lt-m90-001/_layouts/1033/core.js" defer></script> Then have the following for the link: <A onfocus="OnLink(this)" HREF="<document url>" onclick="return DispEx(this,event,'TRUE','FALSE','TRUE','','0','SharePoint.OpenDocuments','','','','21','0','0','0x7fffffffffffffff')"> <document name> </A> For example: <A onfocus="OnLink(this)" href="http://tw-lt-m90-001/Documents/Hello%20World.doc" onclick="return DispEx(this,event,'TRUE','FALSE','TRUE','','0','SharePoint.OpenDocuments','','','','21','0','0','0x7fffffffffffffff')"> Hello World </A> Here is a full example that includes the icon for the file type as well. <HTML> <HEAD> <title>Documents</title> <script type="text/javascript" language="javascript" src="http://tw-lt-m90-001/_layouts/1033/init.js" ></script> <script type="text/javascript" language="javascript" src="http://tw-lt-m90-001/_layouts/1033/core.js" defer></script> </HEAD> <BODY> <TABLE width="100%" cellspacing=0 cellpadding=0 border=0> <TR> <TD> <A TABINDEX=-1 href="http://tw-lt-m90-001/Documents/Hello%20World.doc" onclick="return DispEx(this,event,'TRUE','FALSE','TRUE','','0','SharePoint.OpenDocuments','','','','21','0','0','0x7fffffffffffffff')"> <IMG BORDER=0 ALT="Hello World.doc" title="Hello World.doc" src="http://tw-lt-m90-001/_layouts/images/icdoc.gif" > </A> </TD> <TD> <A onfocus="OnLink(this)" href="http://tw-lt-m90-001/Documents/Hello%20World.doc" onclick="return DispEx(this,event,'TRUE','FALSE','TRUE','','0','SharePoint.OpenDocuments','','','','21','0','0','0x7fffffffffffffff')"> Hello World </A> </TD> </TR> </TABLE> </BODY> </HTML> To reference an icon it is simply "ic<ext>.gif" (http://<sharepoint url>/_layouts/images/ic<ext>.gif, e.g., http://tw-lt-m90-001/_layouts/images/icdoc.gif). For a full listing of icon files see all "ic*.gif" files in the TEMPLATE\IMAGES directory under the 12 hive.
Recover SharePoint Application Pool Password
Last changed: Dec 22, 2008 10:28 by Kirk Liemohn
Labels: codesamples, caseofthemundays, security, administration This example will require using PowerShell but you could just as easily use C# or some other programming language. You can run this from the PowerShell command line or bundle up as part of a PowerShell Script. First load your handy dandy SharePoint Assembly: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
Next, create an object of the site that you want the application pool identity of: $site = New-Object Microsoft.SharePoint.SPSite("http://www.threewill.com")
Now create a variable to hold the web application information: $webapp= $site.WebApplication One more variable to get the Application pool information: $AppPool= $webapp.ApplicationPool | Out-String (I use the Out-String so I can see the information if I decide to use a script) Lastly, let's take a look at the application pool information: write-host $AppPool It should look something like this: CurrentIdentityType : SpecificUser
Username : DomanName\SPAccount
Password : YourPassword
SecurePassword : System.Security.SecureString
IsCredentialUpdateEnabled : True
IsCredentialDeploymentEnabled : True
Name : SharePoint - 2222
TypeName : Microsoft.SharePoint.Administration.SPApplicationPool
DisplayName : SharePoint - 2222
Id : a808448d-bbee-417c-9936-12bfac9738de
Status : Online
Parent : SPWebService Parent=SPFarm Name=SharePoint_Config
Version : 9013
Properties : {}
Farm : SPFarm Name=SharePoint_Config
UpgradedPersistedProperties : {}
Registering Security Trimmers Programmatically
Last changed: Dec 22, 2008 10:21 by Kirk Liemohn
Labels: security, codesamples, bdc, securitytrimmers, search, automatedbuilds Background When WSS and MOSS crawl content and store that content to an index they can also store authorization information (ACL) to the data. This makes it easy for a search query to only provide results to which the search user has access. WSS search is limited to SharePoint sites, but MOSS search can go beyond that to web sites, file shares, exchange public folders, the BDC, and others. While some content such as SharePoint sites, file shares, and exchange public folders contain ACLs, others such as web sites and BDC do not. The solution to trimming MOSS search results that do not contain ACLs is to use a security trimmer. A security trimmer is very simple; it takes a list of URLs and returns a BitArray indicating if the current user has access to each URL. A security trimmer runs at query time so there is a performance cost, but I've found that the story here isn't too bad since the security trimmer gets called in batches based on the number of search results shown to the user on a page. Basically if the ratio of allowed access to total possible results is high, the number of items to check for security trimming at a time should be kept to a minimum. In addition there is a way to specify a limit on the number of crawl URLs to check. There is a BDC Security Trimmer or you can write your own Custom Security Trimmer. That last link has a good overview and walkthrough of how to write, deploy, and register a custom security trimmer. I recommend it for further reading. However, the walkthrough only shows how to register a security trimmer using stsadm. It does not show how to do it via code. In fact, on the stsadm command you provide the crawl rule path indicating that security trimmer references the craw rule, which is not the case (it is the other way around). I needed to do this via code as part of a custom shared service provider administration screen. Since I had a little bit of trouble figuring this out and couldn't find anyone else that did it, I wanted to blog about it here once I found the solution. Show Me Some Code! OK, enough background, let's see some code on how to do this.
That's it. Fairly simple, especially if you already have the appropriate context as my code does since it runs within the context of the shared service provider. As you can see, the crawl rule references the security trimmer Id and the security trimmer does not reference the crawl rule. Note that your security trimmer will not be in effect unless you crawl (probably a full crawl) after you register your security trimmer even though the security trimmer runs as query time.
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
