Readme_Security Extension Sample

11/05/2008 21:36:06


This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
The CustomSecurity sample security extension uses Forms Authentication along with SQL Server to provide a custom security model that works with Reporting Services. This sample is not supported on Itanium-based operating systems.

Security Note:
The security extension sample should not be deployed and tested in a production environment. Reverting back to Windows Authentication after migrating to a different security extension is generally not recommended. If you do, you may experience errors when you attempt to access items in the report server database that have custom security descriptors, but no Windows Authentication security descriptors. To revert, you will have to reinstall Reporting Services and manually re-apply any role-based security for your Windows users. Before using this sample, you should back up your configuration files.




Important:
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. 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.



Requirements

You should be familiar with Visual Studio and either Visual C# or Visual Basic and you must have the following applications installed to run the CustomSecurity sample:
  • Microsoft Visual Studio 2005. This sample is not compatible with Visual Studio 2008.
  • Microsoft .NET Framework 2.0.
  • SQL Server, including Reporting Services.
  • Reporting Services samples.
  • A report server that you have permission to access on your network, if you plan to use the sample extension to add additional data processing functionality to your server.
Important:
SQL Server samples and sample databases must be downloaded and installed before you can view or work with them. For more information, see Considerations for Installing SQL Server Samples and Sample Databases.



Location

This sample is located by default at:
C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\ Extension Samples\FormsAuthentication Sample

Building the Sample

You must first compile and install the extension. The procedure assumes that you have installed Reporting Services to the default location: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services. This location will be referred to throughout the remainder of this topic as <install>.
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 2005 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. Note: To determine the folder where samples are located, click the Start* button, point to All Programs, point to Microsoft SQL Server, 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.*
  3. At the command prompt, run the following command to generate the key file: sn -k SampleKey.snk 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 compile the sample using Visual Studio 2005
  1. Open CustomSecurity.sln in Microsoft Visual Studio 2005. If you installed the sample to the default location, you can access it at C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Extensions.
  2. In Solution Explorer, select the CustomSecurity project.
  3. On the Project menu, click Add Reference. The Add References dialog box opens.
  4. Click the .NET tab.
  5. Click Browse, and find Microsoft.ReportingServices.Interfaces on your local drive. By default, the assembly is located in the <install>\ReportServer\bin directory. Click OK. The selected reference is added to your project. Note: The reference may already be added to your project. If this is the case, you do not have to re-add a reference.
  6. On the Build menu, click Build Solution.

Deploying the Sample

After the sample is compiled, you must copy the DLLs and the ASPX pages to the appropriate subdirectories for your Report Server installation.
To deploy the sample
  1. Copy Microsoft.Samples.ReportingServices.CustomSecurity.dll and Microsoft.Samples.ReportingServices.CustomSecurity.pdb to the <install>\ReportServer\bin directory.
  2. Copy Microsoft.Samples.ReportingServices.CustomSecurity.dll and Microsoft.Samples.ReportingServices.CustomSecurity.pdb to the <install>\ReportManager\bin directory.
  3. Copy the Logon.aspx page to the <install>\ReportServer directory.
  4. Copy the UILogon.aspx page to the <install>\ReportManager\Pages directory. After the assembly and logon pages are copied to the server, you need to make some modifications to the Report Server configuration file.

Important:
Make backup copies of all of your configuration files before making any changes.



To modify the RSReportServer.config file
  1. Open the RSReportServer.config file with Visual Studio 2005 or a simple text editor such as Notepad. RSReportServer.config is located in the <install>\ReportServer directory.
  2. Locate the <AuthenticationTypes> element and modify the settings as follows: * <Authentication>
    <AuthenticationTypes>
    <Custom/>
    </AuthenticationTypes>
    <EnableAuthPersistence>true</EnableAuthPersistence>
    </Authentication> *
    1. Locate the <Security> and <Authentication> elements, within the <Extensions> element, and modify the settings as follows: * <Security>
      <Extension Name="Forms"
      Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization,
      Microsoft.Samples.ReportingServices.CustomSecurity" >
      <Configuration>
      <AdminConfiguration>
      <UserName>username</UserName>
      </AdminConfiguration>
      </Configuration>
      </Extension>
      </Security>
      <Authentication>
      <Extension Name="Forms"
      Type="Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension,
      Microsoft.Samples.ReportingServices.CustomSecurity" />
      </Authentication> For more information regarding .NET Framework security and Reporting Services, see Secure Development (Reporting Services)*.
      1. Locate the <UI> element and update it as follows: * <UI>
        <CustomAuthenticationUI>
        <loginUrl>/Pages/UILogon.aspx</loginUrl>
        <UseSSL>True</UseSSL>
        </CustomAuthenticationUI>
        <ReportServerUrl>http://<server>/ReportServer</ReportServerUrl>
        </UI> *
        Note:
        If you are running the sample security extension in a development environment that does not have a Secure Sockets Layer (SSL) certificate installed, you must change the value of the <UseSSL> element to False in the previous configuration entry. We recommend that you always use SSL when combining Reporting Services with Forms Authentication.



        You will need to add a code group for your custom security extension that grants FullTrust permission for your extension. You do this by adding the code group to the RSSrvPolicy.config file.
        To modify the RSSrvPolicy.config file
        1. Open the RSSrvPolicy.config file located in the <install>\ReportServer directory.
        2. Add the following <CodeGroup> element after the existing code group in the security policy file that has a URL membership of $CodeGen as indicated below and then add an entry as follows to RSSrvPolicy.config: * <CodeGroup
          class="UnionCodeGroup"
          version="1"
          Name="SecurityExtensionCodeGroup"
          Description="Code group for the sample security extension"
          PermissionSetName="FullTrust">
          <IMembershipCondition
          class="UrlMembershipCondition"
          version="1"
          Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\Microsoft.Samples.ReportingServices.CustomSecurity.dll"
          />
          </CodeGroup> *
          Note:
          For simplicity, the Forms Authentication Sample is weak-named and requires a simple URL membership entry in the security policy files. In your production security extension implementation, you should create strong-named assemblies and use the strong name membership condition when adding security policies for your assembly. For more information about strong-named assemblies, see the Creating and Using Strong-Named Assemblies topic on MSDN.



          Next, you will need to increase the permissions for the "My Computer" code group in the Report Manager policy file.
          To modify the RSMgrPolicy.config file
          1. Open the Report Manager policy file, RSMgrPolicy.config, located in the <install>\ReportManager directory.
          2. Locate the following code group in RSMgrPolicy.config and change the PermissionSetName attribute from Execution to FullTrust as follows: * <CodeGroup
            class="FirstMatchCodeGroup"
            version="1"
            PermissionSetName="FullTrust"
            Description="This code group grants MyComputer code Execution
            permission. ">
            <IMembershipCondition
            class="ZoneMembershipCondition"
            version="1"
            Zone="MyComputer" /> *To use Forms Authentication, you need to modify the Web.config files for Report Manager and Report Server.
            To modify the Web.config file for Report Server
            1. Open the Web.config file in a text editor. By default, the file is located in the <install>\ReportServer directory.
            2. Locate the <identity> element and set the Impersonate attribute to false. * <identity impersonate="false" /> *
            3. Locate the <authentication> element and change the Mode attribute to Forms.
            4. Add the following <forms> element as a child of the <authentication> element and set the loginUrl, name, timeout, and path attributes as follows: * <authentication mode="Forms">
              <forms loginUrl="logon.aspx" name="sqlAuthCookie" timeout="60"
              path="/"></forms>
              </authentication> *
              1. Add the following <authorization> element directly after the <authentication> element. * <authorization>
                <deny users="?" />
                </authorization> This will deny unauthenticated users the right to access the report server. The previously established loginUrl* attribute of the <authentication> element will redirect unauthenticated requests to the Logon.aspx page.
                To modify the Web.config file for Report Manager
                1. Open the Web.config for Report Manager. It is located in the <install>\ReportManager directory.
                2. Disable impersonation by locating the section <identity impersonate= "true" /> and changing it to the following: <identity impersonate="false" />.
                3. Add the following keys to the <appSettings> element. * <add key="ReportServer" value="<Server Name>"/>
                  <add key="ReportServerInstance" value="<Instance Name>"/> *
                  1. Change the <Server Name> value to the name of the report server and the <Instance Name> value to the name of the instance the report server is associated with.

                  Creating the UserAccounts Database

                  The sample includes a database script, Createuserstore.sql, that enables you to set up a user store for the Forms sample in a SQL Server database.
                  To create the UserAccounts database
                  1. Open SQL Server Management Studio, and then connect to your local instance of SQL Server.
                  2. Locate the Createuserstore.sql SQL script file. The script file is contained within the sample project files.
                  3. Run the query to create the UserAccounts database.
                  4. Exit SQL Server Management Studio.

                  Testing the Sample

                  The following procedure tests the sample extension. You will register an administrator user, which adds the user name, password hash, and salt value to the users table in the UserAccounts database. It also will require you to enter that user name in the Report Server configuration file. You will then log on the same user to ensure the correct operation of the password verification routines as well as the proper loading of the extension assembly by the report server.
                  To test the sample
                  1. Restart the Reporting Services service by running the following commands at the command prompt: * net stop "SQL Server Reporting Services (<Instance Name>)"
                    net start "SQL Server Reporting Services (<Instance Name>)" *
                    1. Open Report Manager. You can do this from the Reporting Services program menu or by accessing the Reports virtual directory from your browser.
                    2. Enter a user name and password and click Register User to add the user to the accounts database.
                    3. Open the RSReportServer.config file. Locate the <Security> element and add the previously registered user name as follows: * <Security>
                      <Extension Name="Forms"
                      Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization,
                      Microsoft.Samples.ReportingServices.CustomSecurity" >
                      <Configuration>
                      <AdminConfiguration>
                      <UserName>username</UserName>
                      </AdminConfiguration>
                      </Configuration>
                      </Extension>
                      </Security> *
                      1. Return to the UILogon.aspx page, re-enter the user name and password, and then click Logon. You should have access to Report Manager and the report server with no restrictions. The administrator user that you create has equivalent permissions on the report server to those of a built-in administrator account on the local computer. For the purpose of this sample, you can only have one user designated as an administrator. After you have a built-in administrator account, you can register additional users and assign them roles on the report server.

                      Note:
                      You should add your administrator user to the official System Administrator and Content Manager (root folder) roles of your report server. This prevents empty security descriptors from existing in the report server database. For more information about the System Administrator and Content Manager roles, see Using Predefined Roles.



                      Using the Web Service with Custom Security

                      You can use the Web service API with Forms Authentication just as you would with Windows Authentication. However, you must call LogonUser in your Web service code and pass the credentials of the current user. In addition, your Web service client will not have the benefit of automatic cookie management, which is provided by Internet Explorer or other Web browsers. You will have to extend the ReportingService2005 proxy class to include cookie management. This can be done by overriding the GetWebRequest and GetWebResponse methods of the Web service class.

                      Debugging the Sample Extension

                      Running the sample extension in the debugger is not only a great way to troubleshoot difficulties you may have, but it is also an effective way to step through the code and see the report server authentication and authorization process as it is happening.
                      The Microsoft .NET Framework provides several debugging tools that can help you analyze the sample code. The following procedure uses Visual Studio 2005 to debug the previous sample.
                      To debug the Forms Authentication sample code
                      1. Start Visual Studio and open CustomSecurity.sln on your test report server.
                      2. Open Internet Explorer and navigate to Report Manager while leaving the sample code open in Visual Studio.
                      3. Switch to Visual Studio and set some break points in the custom security extension project code.
                      4. With the extension project still the active window, from the Debug menu, click Process.The Processes dialog opens.
                      5. From the list of processes, select the Aspnet_wp.exe process (or W3wp.exe, if your application is deployed on IIS 6.0), and click Attach.
                      6. In the Attach to Process dialog, select the Common Language Runtime program type, and then click OK. For improved debugging performance, make sure that Native is not a selected program type.
                      7. When the sample runs, a logon form appears. Type the user credentials into the logon form and click the Logon button. Whenever your break points are encountered during processing, the debugger should stop execution at that point.
                      8. Step through your code using the F11 key. For more information about using Visual Studio for debugging, see your Visual Studio 2005 documentation.
                      Note:
                      Debugging this way requires a lot of resources and processor time. If you run into difficulties, close Visual Studio, reset IIS, and begin again by attaching the CustomSecurity solution to the ASP.NET worker process and logging on to Report Manager.



                      Removing the Sample Extension

                      While not generally recommended, it is possible to revert back to Windows Authentication after you have tried out the sample.
                      To revert to Windows security
                      1. Restore the following files from your backup copies: Web.config and RSReportServer.config. This should set the authentication and authorization methods for the report server to the default Windows security. This should also remove any entries you made for your extension in the Report Server configuration file.
                      2. Disable anonymous access in Internet Information Services (IIS) for the report server virtual directory. After the configuration information is removed, your security extension is no longer available to the report server. You should not have to remove any security descriptors that were created while you were running the report server under the sample security extension. The report server automatically assigns the System Administrator role to the BUILTIN\Administrators group on the computer hosting the report server when Windows Authentication is enabled. However, you will have to manually re-apply any role-based security for your Windows users.
                      Note that reverting back to Windows Authentication after migrating to a different security extension is generally not recommended. If you do, you may experience errors when you attempt to access items in the report server database that have custom security descriptors, but no Windows Authentication security descriptors.

                      See Also

                      Tasks
                      Reporting Services Samples
                      Other Resources
                      Extension Samples (Reporting Services) Implementing a Security Extension
                      Help and Information
                      • Getting SQL Server 2008 Assistance* © 2008 Microsoft Corporation. All rights reserved.

Last edited Nov 6, 2008 at 10:08 PM by bonniefe, version 8

Comments

jeremainejohnson Oct 4, 2012 at 3:29 PM 
I followed the steps and got to "Testing the Sample" and got stuck, when I access my report via thr URL i get "Service UnavailableHTTP Error 503. The service is unavailable."

Any help will be appreciated.

Thank you,

Jeremaine

SkylerTodd Aug 30, 2012 at 3:55 PM 
When I attempted to install this sample on SSRS2008 NOT SSRS2008R2 I kept running into an issue...
"Authorization ticket not received by LogonUser"
and
"Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'"

To fix this I had to add a web reference to "http://<Server Name>/ReportServer/ReportService2005.asmx" and change proxy class in UILogon to extend my newly created web reference. "public class ReportServerProxy: ReportingServices2005.ReportingService2005"

Also changed this line in AuthenticationUtiliteis
private const string rsAsmx = @"/ReportService2010.asmx";
to
private const string rsAsmx = @"/ReportService2005.asmx";.

The issue is microsoft/codeplex has labeled the 2008r2 example as 2008...

Hope this helps those who are still using 2008 instead of 2008r2

bshaik Oct 4, 2011 at 3:31 PM 
Hi ,
I have implemented Forms authentication for SSRS R2, i can get the users and assign permissions to site manager, then when i log in through
with the normal user i get this message
ui!ReportManager_0-1!1a44!10/04/2011-16:21:54:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
webserver!ReportServer_0-2!1230!10/04/2011-16:22:16:: e ERROR: System.Exception: An error occurred while attempting to verify the user.Invalid attempt to read when no data is present.
at Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationUtilities.VerifyPassword(String suppliedUserName, String suppliedPassword)
at Microsoft.Samples.ReportingServices.CustomSecurity.AuthenticationExtension.LogonUser(String userName, String password, String authority)
at Microsoft.ReportingServices.WebServer.RSCustomAuthentication.LogonUser(String userName, String password, String authority)
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.LogonUser(String userName, String password, String authority)
at Microsoft.ReportingServices.WebServer.ReportingService2010.LogonUser(String userName, String password, String authority)
library!ReportServer_0-2!225c!10/04/2011-16:22:24:: Call to GetPermissionsAction(/).
ui!ReportManager_0-1!23f0!10/04/2011-16:22:24:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.
at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
library!ReportServer_0-2!225c!10/04/2011-16:22:24:: Call to GetSystemPermissionsAction().
ui!ReportManager_0-1!23f0!10/04/2011-16:22:24:: e ERROR: HTTP status code --> 500
can any one of you help please.

dati Mar 10, 2011 at 12:23 AM 
I have found a very strange problem that the loop back was only happen using machine name.
If I use http://localhost/reportserver or http://ip address/reportserver the re-direct work.

I am now stuck again when I try to call http://127.0.0.1/reportserver/ReportExecution2005.asmx?wsdl as reference (I can't find a way to put in the custom authentication).

here is my sample code in powershell:
$reportserverURI = "http://127.0.0.1/reportserver/ReportExecution2005.asmx?wsdl
$RS = New-WebServiceProxy -Class 'RS' -NameSpace 'RS' -Uri $reportserverURI -UseDefaultCredential
$RS.URL = $reportserverURI

## Added for custom credential (but doesn't work)
## ------------------------------------------
$credentialcache = New-Object System.Net.CredentialCache
$networkcredential = New-Object System.Net.NetworkCredential("uid","pwd","machine name")
$uri = New-Object System.Uri("http://127.0.0.1")
$formcredential.Add($uri, "Basic",$networkcredential)
$RS.Credentials = $credentialcache
## ------------------------------------------
$Report = $RS.GetType().GetMethod("LoadReport").Invoke($RS, @($report_path, $null))

Error:
Exception calling "invoke" with "2" argument(s): "Client found response content type of text/html; charset=utf-8', but expected 'text/xml'.

The out put indicated that the login form was return rather than the actual XML of http://127.0.0.1/reportserver/ReportExecution2005.asmx?wsdl

I think my authentication code is in correct.

The code was previously work with Reporting Services 2008 R2 security setting in Windows Authentication.
I just add -UseDefaultCredential and manually save the Windows Login on the machine when manually requesting the page.

Please help!
Thanks in Advance.

dati Feb 22, 2011 at 5:47 AM 
I am trying to implement custom security extension for SSRS SQL 2008 R2 using the example on this page.
I have successfully authenticate and I can see the http://localhost/reports the first thing I saw in the debug view was

AuthenticationUtilities: Getting user info
AuthenticationUtilities: Problem getting user info, HttpContext.Current.User is null

I then went to the source code AuthenticationExtension.cs | GetUserInfo and see the comment as:
This happens when the user attempts an anonymous logon

which cause the login page to loop back
200 http://localhost/reports/Pages/UILogon.aspx
302 http://localhost/Reports/Pages/UILogon.aspx?ReturnUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fFolder.aspx
302 http://localhost/Reports/Pages/Folder.aspx
200 http://localhost/Reports/Pages/UILogon.aspx?ReturnUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fFolder.aspx

Please help, is there such thing as anonymous setting in SSRS 2008 R2 that I need to turn off?
I was looking for in the web.config but can't find it.
C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager

Many Thanks.

Rob1FlexSS Aug 5, 2010 at 10:14 AM 
In case anyone else who reads this, I think I have tracked it down. By looking at the ReportServerService logfile, I get the error
(See <installDir>\Logfiles e.g. C:\Program Files\Microsoft SQL Server\MSRS10.SQLEXPRESS2008\Reporting Services\LogFiles)
"... The feature: "Custom security extensions" is not supported in this edition of Reporting Services. ... "
I found this article online "http://connect.microsoft.com/SQLServer/feedback/details/538878/ssrs-2008-custom-security-extensions-feature"
So to me it appears that there is a bug, which means this will never work with the Express edition, even though it is supposed to.
Does anyone know of a hot fix for this?
If you put breakpoints in the IAuthentication methods and they are not getting hit, you may have the same issue!!

Rob1FlexSS Aug 4, 2010 at 12:35 PM 
I too get the "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
error, if I look at the web response stream it contains the following line hinting at a configuration error. I have checked the config against these instructions 3 times, but can't see a discrepency - can anybody help? "<li>The report server has encountered a configuration error. (rsServerConfigurationError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&amp;EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&amp;EvtID=rsServerConfigurationError&amp;ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&amp;ProdVer=10.0.2531.0" target="_blank">Get Online Help</a></li>"

Is there a version of this article for dummies which explicitly says where to source the "custom" text for each configuration item? e.g. for the "To modify the Web.config file for Report Manager" I assumed that the server name was my machine name (first part of string shown in title bar or Reporting Services Conguration Manager" and Instance Name was the second part of the title bar string (after slash).

Also I believe that the RSReportServer.config <UI> instructions are wrong and that for SSRS2008 the ReportServerURL ReportServer part should be appended with _<SQL Server Instance Name>. Are there other places where this article is not up tp date for SSRS 2008?

If anybody else has resolved this configuration error please help!

www.flexiblesoftwaresolutions.co.uk

adammperkins Jul 15, 2010 at 3:32 PM 
Oh also I found that AuthenticationUtilities was causing me some issues due to erroneous entries in the urls list which I managed to sort out with some code like so...

AuthenticationUtilities:Ln221
foreach (ManagementObject instance in instances)
{
instance.Get();

ManagementBaseObject outParams = (ManagementBaseObject)instance.InvokeMethod("GetReportServerUrls",
null, null);

string[] appNames = (string[])outParams["ApplicationName"];
string[] urls = (string[])outParams["URLs"];

for (int i = 0; i < appNames.Length; i++)
{
if (appNames[i] == "ReportServerWebService")
if (!urls[i].Contains(@"//Server"))
if (!urls[i].Contains(@"https://"))
reportServerVirtualDirectory = urls[i];
}

if (reportServerVirtualDirectory == string.Empty)
throw new Exception(string.Format(CultureInfo.InvariantCulture,
CustomSecurity.MissingUrlReservation));
}

Hope this helps someone :)

Adam

adammperkins Jul 15, 2010 at 3:29 PM 
Hi I am running SSRS 2008 on Vista with VS 2008 but am having difficulties with the following issue "Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:" this relates to UILogon.aspx.cs, System.Web.Services.dll (System.Web.Services.SoapHttpClientProtocol) LogonUser(user,pass,auth)

I have googleed this extensivly and have still come up empty handed - does anyone have an answer to this problem?

Regards

Adam

mariwill Jul 9, 2010 at 9:49 PM 
The security extension sample is available in the download package of SQL Server 2005 Reporting Services samples and the download package of SQL Server 2008 Reporting Services samples. It is not available in a SQL Server 2008 R2 version. For more information about downloads of specific versions of the samples, go to http://social.technet.microsoft.com/wiki/contents/articles/ssrs-reporting-services-samples-on-codeplex.aspx

fleettech Jul 7, 2010 at 3:49 PM 
Found the Security Extension Sample for 2008. It's in the x86 package 'SQL2008.All_Product_Samples_Without_DBs.x86.msi' and can be found here:
http://sqlserversamples.codeplex.com/releases/view/30803.

fleettech Jul 7, 2010 at 2:31 PM 
We also downloaded the 'SQL2008R2.Reporting_Services.Samples.x64.msi' package as well as the complete 'SQL2008R2.All_Product_Samples_Without_DBs.x64.msi'. Both are missing the Security Extension Sample. We tried the SQL 2005 version but it seems the 'Microsoft.ReportingServices.Interfaces' reference has been replaced...

Anyone have any ideas?

mcanti Jun 15, 2010 at 6:56 AM 
When using multiple instances of Reporting Services 2008 on the same server, there is a problem with this extension. Check out http://mcanti.spaces.live.com/blog/cns!C57440C7104BB108!129.entry for description of the problem and the solution.

lestat Jun 4, 2010 at 4:40 AM 
I downloaded and installed the MSI file, and inside the C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\ folder, there are "Model Samples" and "Report Samples" folders, but the "Extension Samples" folder described here does not exist.

Where can I get the Security Extension Sample?

Cheers,
Andrew