Readme_RSPermissions Sample Windows Application

8/22/2011


RSPermissions is a sample Microsoft Windows application developed in Microsoft Visual C# using Microsoft Visual Studio 2008 or later. The sample demonstrates how to develop a Windows application that you can use to manage permissions and security for Reporting Services using the Reporting Services Web service API. RSPermissions uses a Microsoft .NET Framework proxy class to call Web service methods exposed by the Reporting Services SOAP API.
This sample is not supported on Itanium-based operating systems.


Important:
These Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications and assemblies should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator. Microsoft does not provide technical support for these samples.

Requirements

You should be familiar with Visual Studio and Visual Basic or C#, and you should have installed the following on your computer to use the RSPermissions sample:
  • Microsoft Visual Studio 2008, Visual Studio 2010 or compatible development environment. You will use the development environment to view and compile project files.
  • Microsoft SQL Server 2008 R2, including Reporting Services.
  • Microsoft .NET Framework version 2.0 or later.
  • If you plan to use the sample application to view and update the content of a report server and render reports, you must have read-write permission on the report server.


Note:
RSPermissions can be converted in order to compile and run in previous versions of Visual Studio. However, it is designed specifically to be compatible with the specified versions.

Location

This sample is located in the Application Samples\RSPermissions Sample subdirectory of the Reporting Services samples directory. The default location is:
C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Application Samples\RSPermissions Sample

Building the Sample

If you have not already created a strong name key file, generate the key file using the following instructions.
To generate a strong name key file
  1. Open a Microsoft Visual Studio 2008 or Visual Studio 2010 command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt. -- or --Open a Microsoft .NET Framework command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt.
  2. Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed.
  3. At the command prompt, run the following command to generate the key file: sn -k SampleKey.snk
Note:
To determine the folder where samples are located, click the Start button, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Documentation and Tutorials, and then click Samples Directory. If the default installation location was used, the samples are located in <system_drive>:\Program Files\Microsoft SQL Server\100\Samples.


Important:
For more information about the strong-name key pair, see "Security Briefs: Strong Names and Security in the .NET Framework" in the .NET Development Center on MSDN.

To build and run the RSPermissions sample within Visual Studio
  1. Open the solution. If you want to use the C# version of the sample, openRSPermissionsCS.sln; otherwise, open RSPermissionsVB.sln.
  2. On the Debug menu, click Start Without Debugging.
  3. To close Visual Studio, on File menu, click Exit.
To build and run the RSPermissions sample from the Command Line
  1. Use the Change Directory command to change to the RSPermissions directory.
  2. Type the following to build both the C# and Visual Basic versions of the sample:
for /r %f in (*.sln) do C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\msbuild.exe "%f"
  1. From the File menu, click Exit to close the application.
Note:
The Windows system path and .NET Framework version number may differ on your system.
  1. In the application's \Bin\Debug directory, double-click RSPermissions.exe to start the application.

Using the RSPermissions Sample

After installing the RSPermissions sample application, you can use the sample to view the contents of a report server, manage permissions, assign users to the item-level roles, and view reports. When assigning a user to a role, you can select only an existingrole. To create, modify, or delete roles, use SQL Server Management Studio.
Important:
Sample applications should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.

To start the RSPermissions sample application
  1. Open openRSPermissionsCS.sln or RSPermissionsVB.sln in Visual Studio.
  2. On the Debug menu, click Start to run the sample application.
  3. In the Server Address box, enter the virtual root of the report server you want to access for example, http://<localhost>/reportserver, and then click Go. A detailed list of report server items appears in the Catalog Explorer list view. If the list does not appear, verify the report server URL is correct and try again.
  4. Navigate the report server database tree by clicking on folders. You navigate to the report items by clicking the items in the tree.
To render a report
  1. Select a report item you want to open.
  2. Double-click the selected report item or press the Enter key. The report opens in a new window.

To delete a user or group from an item role
  1. Select the item for which you want to remove role assignments for users.
  2. Click the Properties button or right-click the selected item and then click Permissions. The Permissions dialog box
  3. Select a user or group you want to remove from an item role.
  4. Click Remove.
  5. Click Ok.
To add a user or group to an item role
  1. Select an item for which you want to assign a user to a role.
  2. Click the Properties button or right-click the selected item and then click Permissions. The Permissions dialog box opens.
  3. Click Add Group/User.
  4. Add a User or a Security group you want to assign to an item.
  5. Click Ok.
  6. Select the checkbox for the corresponding item-level you want to assign to a user.
  7. Click Ok.
To view the user permissions of a selected item
  1. Select an item in the Catal tree.
  2. Click the Properties button or right-click the selected item and then click Permissions. The properties are displayed in the Permissions dialog box.
Note:
This sample does not do the following: Permission inheritance—child items do not inherit permissions from the parent and Report Models—you cannot use this sample to manage permissions on report models.


© 2011 Microsoft Corporation. All rights reserved.

Last edited Aug 25, 2011 at 12:57 AM by mariwill, version 1

Comments

No comments yet.