.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SQL Reporting Service, Cookies and Forms Authentication

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
Hi, I currently have a instance of SQL Reporting Services that uses custom Forms authentication. When I access the Report Manager through Internet Explorer the Report Manager redirects to my login page, I login and it heads back to the Report Manager and everything works as expected. The problem I'm having is when I use the web service it fails when I call ListItems( ... ). I first create an instance of the service, I then call LogonUser with a username and password, which executes fine, then I call the ListItems which throws an exception similar to: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<html>  <head>   <title>    SQL Server Reporting Services   </title><meta name="Generator" content="Microsoft SQL Server Reporting Services 10.50.1600.1" /> <meta name="HTTP Status" content="500" /> <meta name="ProductLocaleID" content="127" /> <meta name="CountryLocaleID" content="1033" /> <meta name="StackTrace" content="   at Microsoft.ReportingServices.

View Complete Post

More Related Resource Links

Where are cookies stored for Forms Authentication when debugging asp.net from VS and the asp.net dev

Hey all!   When I have my app-deployed on a server and login with forms authentication I see my cookie get's created in   C:\Users\<user>\AppData\Roaming\Microsoft\Windows\CookiesAnd it works great and everything!But when I run my application locally with the asp.net development server while debugging from Visual Studio, I NEVER see a cookie file get created in that location.   I'm using the same PC and the same version of internet explorer 8 on the production as I am development so I'm not sure what's going on here.   Does anyone know where cookies get stored when hitting http://localhost:<devport> ?

how to store credentials with windows authentication in reporting service for subscription

when I try to set up a subscription, I get this error message: "Subscriptions cannot be created because the credentials used to run the report are not stored or if a linked report, the link is no longer valid" I use a datasource which use windows credentials to access a database which contains stored procedure with OpenRowset query to access cube data in analysis service on the same server.  I have to use windows credentials to access cube data in analysis service.  How can I store the credentails with windows credentials? I appreciate your help!

Reporting Services Forms Authentication and group permissions


Hello all,

I have spent some time getting Forms Authentication working with 2008 (R2) I have one final problem left that is causing intense frustration...

The working bits:

a) Built and tested the required extension - thanks to a combination of old Microsoft example supplemented by the one from chapter 19 of Teo Lachev's book, supplemented by Brian Lawson's book.

b) used existing user/group structures in the db to implement role level permissions

c) Can now grant rights to usernames and the usernames validated against our db, they can log in fine and run reports.

d) Nice customised login screens that login across the application and Reporting Services with a single login - which was the primary aim after all!

e) can grant rights to folders at group level and granting/revoking those rights adds or removes the folders in ReportManager - all looking wonderful

The last hurdle:

If I grant permissions to a specific username (we use email address as the username) then that user can log in to ReportManager fine and see what they should see, so it seems like the bulk of the authentication and authorisation extension logic is OK.

If I grant the exact same permission to a role, and make a login a member of that role (removing the specific username permission) then they

Forms Authentication Cookie not showing up in Request.Cookies Collection


While migrating my ASP.NET 1.1 application to 2.0, I've noticed something very odd that I can't explain:

When a user is authenticated via forms authentication, the forms authentication cookie is visible in the application trace (both in the httpheaders and the request.cookies section).  If I view the request.cookies collection using code in the application, I see the forms authentication cookie in the collection (as well as a "control" cookie I added for comparison).

If I log out of the application, the forms authentication cookie is gone and is not viewable anywhere (as expected).

Here's what's strange: When the login session of an authenticated user expires after 5 minues, the forms authentication cookie is still present.  This is expected as it is a non-persistent cookie and should remain in memory until the browser is closed.  When viewing the trace information, I see the forms authentication cookie in both the http headers and the request.cookies collection.  However, when I view the request.cookies collection from within the application using code, it is NOT there.  (The "control" cookie is, as expected)  I even took the step of reading the cookie in through javascript, and that does in fact work.

I've gone over this for hours using many

SQLServer 2008 R2 Reporting Service websevice url does not display with custom authentication



I have installed SQLServer2008R2(CUD3) (64bits on Windows7) Reporting Service with custom authentication.  I can log in to the report server and report manager and everything appears fine, but the webservice url: http://myhost/ReportServer/ReportService2005.asmx no longer works (The webservice url did display before I put int custom authentication).  I got a html back with error message.

This webservice url used to be not protected.  I wonder if this is something changed in 2008R2 and it is a bug, or something I did not do it right.


Thanks for any help!

       // some info here


    <body bgcolor="white">

            <span><H1>Server Error in '/ReportServer' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>Access is denied.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "

SSRS 2008R2 Forms Authentication - service won't start: rshost ERROR: Error in managed ServiceMain,


I implemented a forms authentication solution based on the MSDN sample. However, when I attempt to start the reporting services service either via Services or the RS Config tool, I get the following error in the reporting services logfile:


rshost!rshost!b04!04/12/2011-22:37:21:: e ERROR: Error in managed ServiceMain, error=0x8007000b

I have not been able to find any information around this error. Please help!!

ASMX Web Service using Forms Authentication, how to Authenticate into it using WCF Client?


Hello All, a third party vendor is offering our company a ASMX Web Service which uses Forms Authentication and it's also secured using SSL.

Our Platform is .NET 3.51/WCF/C#. How should I Authenticate my Client into that kind of ASMX Web Service?

Can anyone point any article with sample code or an example how a Client can Authenticate into such ASMX Web Service,

Thanks in advance


Explained: Forms Authentication in ASP.NET

This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.

Using Forms Authentication in ASP.NET - Part 1

Classic ASP developers often had to "roll their own" authentication scheme, however, in ASP.NET much of the grunt work has been taken out. This article outlines how things have changed and how FormsAuthentication can be used to secure a Web site with a minimal amount of code.

ASP.NET Forms Authentication - Part 1

Often, in legacy Web applications, users authenticate themselves via a Web form. This Web form submits the user's credentials to business logic that determines their authorization level. Upon successful authentication, the application then submits a ticket in the form of a cookie, albeit a hard cookie or session variable. This ticket contains anything from just a valid session identification access token to customized personalization values.

ASP.NET forms authentication with roles

.A timeout is specified in minutes. This is "time since last request" not the "time since login". If a login is indicated to be persistent (described later) this is ignored.
.A protection method is specified for the cookie.
Next I wanted to specify a folder to which access is restricted to people who have logged in. To do this I entered the following code in the web.config file (beneath

Forms Authentication in ASP.NET

In this tutorial you will learn about Forms Authentication in ASP.NET 2.0 - Forms Authentication class, Cookie Domain, Forms Cookies, The Login Control, Signin, Signout, Authenticate, Redirect, Login Status, Login Name and Login View Controls.

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

Looking for a simple Service and Console Client REST sample implementing BASIC authentication


Does anyone know of a C# code sample demonstrating WCF REST services and console test client with OperationContracts (GET and POST) implementing mutiple paramaters using BASIC authentication? Also, perhaps, using Fiddler as a test client as well? I have searched high and low for something like this, but have not had any success.

Forms based users being prompted for windows authentication login for My Sites photos in user lists

Here's an issue I didn't see coming for our forms based authentication users. 

We have a web application extended to an external url to handle forms based authentication for users outside of our domain. Our setup looks like this...

Internal Users/Windows Authentication - moss.domain.com
External Users/Forms Based - mossext.domain.com
My Site for Internal Users - mysites.domain.com

When our forms based users are accessing user lists, or discussion pages that display user pictures, they are getting a windows authentication login for our internal users (mysites.domain.com) who have populated their my site with personal photo.

How do we fix this? 

403 Forbidden - Forms Authentication


Form template has cascading dropdown lists.  When item selected from first list, form code executes a FileQueryConnection to retrieve data from a list to populate 2nd listbox.  Getting 403 forbidden when explicitely attempting to retrieve data from code.  Form is using connections from a data connection library.  The template works perfectly when deployed to a windows authenticated site.  Fails when executed from the forms authenticated site.


RDL Rendering (500 Internal Server) Error at Sharepoint Integrated Reporting Service


I have a serious problem that cannot be solved by googling around the keywords below:
sharepoint, moss 2007, reporting service, ssrs 2008, rendering, internal server error, ....

The error is;

"An error occurred during client rendering. The remote server returned an error: (500) Internal Server Error. "

Everything is O.K.;

* When I render the report from the REPORTSERVER (http://localhost/ReportServer)
* When the reports are scheduled to be sent by the reporting service (planned via MOSS 2007) 

But if I open (render) the RDL file from the sharepoint REPORTS LIBRARY interface, all of the reports fail with that internal error message above. 

It is weird also that parametrized reports are displayed without errors although the parameters are queried from a sql dataset. But I got the error when rendering the report after I've chosen a parameter  and order "apply/report"...

Possible causes how I met that error may be;

After I have installed (then uninstalled) AJAX extensions
After I have re-configured IIS Web Service Extensions list items

Possible solution alternatives I've found;

I've found a solution on MSDN replying a similar issue with an ideal cause of the error but an evreka answer but no sol

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend