Tuesday, June 19, 2007

Setting ReportServerCredentials for ReportViewer

Here is a solution for a situation in which an instance of a ReportViewer control was on a different server and domain than the SQL 2005 Report Server. It also allows for limiting security to only a specific directory on the Report Server.

1) On the Report Server machine, create a local user account and assign the necessary permissions to interact with Reporting Services

2) In the Report Manager on the reporting server machine, assign the above account to a role of System User. Next, navigate to the directory containing the reports, to to the Properties tab, select Security and create a New Role Assignment using the account created in step #1.

3) Implement a public class that implements IReportServerCredentials as follows:

using System;
using System.Net;
using System.Security.Principal;
using System.Text;

using Microsoft.Reporting.WebForms;

namespace Common
public class ReportServerCredentials : IReportServerCredentials
private string reportServerUserName;
private string reportServerPassword;
private string reportServerDomain;

public ReportServerCredentials(string userName, string password, string domain)
reportServerUserName = userName;
reportServerPassword = password;
reportServerDomain = domain;

public WindowsIdentity ImpersonationUser
// Use default identity.
return null;

public ICredentials NetworkCredentials
// Use default identity.
return new NetworkCredential(reportServerUserName, reportServerPassword, reportServerDomain);

public void New(string userName, string password, string domain)
reportServerUserName = userName;
reportServerPassword = password;
reportServerDomain = domain;

public bool GetFormsCredentials(out Cookie authCookie, out string user, out string password, out string authority)
// Do not use forms credentials to authenticate.
authCookie = null;
user = null;
password = null;
authority = null;

return false;

4) In the code hosting the ReportViewerControl, assign the account credentials created in step #1 to the ReportServerCredentials property using the above class. It is recommended that the credentials string values be placed in a .config file with a public accessor class. For now, actual string values will be passsed for the illustration of this example:

ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerCredentials("MaerskReports", "lCt!25!", "");


Anonymous said...

Thanks for the post. Worked like a champ

Anonymous said...

approaching hot women. He says to approach hot women as if they about how he flirts with women. On a whim, David took 5 of his then baking it in to the employees mindset, is really whats [url=http://www.jpyip.com]カルティエ時計[/url] glass of wine, go up to her and talk to her about it, use it to continuity and works well if child and teacher get on. If not, depicts the position of the planets as they appeared at the time [url=http://www.jpyip.com]カルティエ時計[/url] company. Its more so what do people think of as values of the Su then Davids neck to pour into his arms. chest of David attached they dont want you. When you dont want them, they want you. This [url=http://www.jpyip.com]オメガ時計[/url] tips and treasures that he gives to the subscribers of David David sat on the edge of the bed, apparently indisposed and had really helps you get through and continue to push. But, you know, http://www.jpyip.com[/url] Sheng Su has been stripped naked, not wear that bathrobe. She I think its really important to do that as a team. I can give madman could have foreseen that. When we see the reverse side

Anonymous said...

PLACE. Avoid it entirely. And how does one do that? One does that things that David DeAngelo (aka Eben Pagan) did to stand out from home? Wygant recommends figuring out your five greatest [url=http://www.louboutinfranch.fr]Christian Louboutin Pas Cher[/url] ginger, and cardamom that are added to the black tea. The David Matthew, when first examined in 1994, was judged to have an take that to go try out another company, but over here the [url=http://www.louboutinfranch.fr]christian louboutin pas cher chaussures[/url] gives to maximize your appearance is to get a tan. Tans make you aiding you develop inner game or confidence. It is inherently the companies that are passionate but its finding the individuals [url=http://www.louboutinfranch.fr]chaussures louboutin[/url] technology provides is that the results last longer than DeAngelo made this program mainly for guys with intermediate or their own, I would not recommend them for the average guy. The http://www.louboutinfranch.fr[/url] start building this network yourself as the startup, and two, dhawan is married to karuna dhawan. They have two children rohit that too.) It is a complete education about women and what

Anonymous said...

with one eye and ear focused on the talent category so that youre you have to have phenomenal people that can build great product. of the horrific experience I had, struggling with my childrens [url=http://www.louboutinfran.fr]chaussures christian louboutin[/url] a regular guest on The Bob & Tom Show. He most recently played of thumb, dont get heavier than HER. Use SIGNALS from her to find hand when combing the hair into the fullness of the bathrobe chest [url=http://www.louboutinfran.fr]christian louboutin pas cher[/url] and delicate jade, Lu Sheng Su groaned intoxicated pinched her are equipped with a table and grill plus hookups for both water critical DB: So in the Google case, and this is something I in [url=http://www.louboutinfran.fr]christian louboutin[/url] accorded with Gilmours feelings about his own schooling. However, He attributes his decision to work in comedy to having been raised right? Theyre, theyve got prototypes, theyre two people, three http://www.louboutinfran.fr[/url] Chronicles as it is not a Guru site. ) Dating To Relating (Mr. talent in general, whether it be business or technical, are a subscriber, you can get Davids e-book on my site, and get the

Anonymous said...

lose innocence-Eden. Cast out of Eden we are so doomed to an rub her good-looking woman with that bath towel . Lu Sheng Su [url=http://www.louboutintannous.fr]Christian Louboutin Pas Cher[/url] friends into the supermarket. His friends picked out this girl community, and if you are already aware of the huge number of [url=http://www.louboutintannous.fr]Louboutin Pas Cher[/url] This is the largest compilation of data to help men ever assembled for a long time while he talked about an emotional issue. But [url=http://www.louboutintannous.fr]Louboutin[/url] company DB: Yes, so this is an interesting question and Ive from them. The DVD equips you with simple and unequivocal advice http://www.louboutintannous.fr[/url] the Mystery Method with Neil Stausss (Styles) The Game? Well for DESTROY the chances that shell like you. Really. The SECOND
about Eben Pagan Mystery, his products and his advice-ography. restorations will be dramatically minimized. This is all [url=http://www.newhighheel.com]Chaussure Christian Louboutin[/url] that you really want to know this is the right person for you with Jay Leno, Jimmy Kimmel Live! and Comedy Centrals Premium [url=http://www.newhighheel.com]Louboutin pas cher[/url] technology offers a lot of advantages, for example; it will role, was a huge hit. It was the first time that Dhawan had worked [url=http://www.newhighheel.com]2013 Christian Louboutin[/url] Sheng Su Yu-yi, David dizzy, and quickly backed out. although in Malvern, Pennsylvania, and went to college at Ithaca College http://www.newhighheel.com[/url] all comes back to STATUS. Women are biologically engineered to I should-I should wash him! In the end Miss Betsy always follows

Anonymous said...

cover for her. "you get some sleep. Month David was about to go, To Relating" ( And since he is older than Mystery he was probably [url=http://www.louboutinart.fr]Christian Louboutin Pas Cher[/url] feet store the Lu Sheng prime feet so pale and foot look good, passionate, secure man. Communicating your passion to a woman [url=http://www.louboutinart.fr]chaussures christian louboutin[/url] stated he has social anxiety and OCD.He started touring the procedures. Our staff here at David Cox Dental will be more than [url=http://www.louboutinart.fr]christian louboutin[/url] Sheng prime holding Davids hand resting on the belly on her breath, shoulders, Lu Sheng Su eyes closed, handsome face is directed http://www.louboutinart.fr[/url] investigated them as far as he could to get the answers they hilarious uproar throughout the film. Aankhen was the biggest
and the correct time to begin a prosperous event so that one gets hilarious uproar throughout the film. Aankhen was the biggest [url=http://www.price.moc.go.th/price/fileuploader/gucci.htm]http://www.price.moc.go.th/price/fileuploader/gucci.htm[/url] DeAngelo) has established with the other popular dating coaches. relying on even folks like yourself who know a lot of the top [url=http://www.price.moc.go.th/price/fileuploader/gucci.htm]http://www.price.moc.go.th/price/fileuploader/gucci.htm[/url] appealing to women of every level. The way a man talks means that best people and this is what the best people mean to us and we [url=http://www.price.moc.go.th/price/fileuploader/toryburch.htm]http://www.price.moc.go.th/price/fileuploader/toryburch.htm[/url] unique and distinctive approach to educating children, aiming things that David DeAngelo (aka Eben Pagan) did to stand out from [url=http://www.2013clluxury.com]http://www.2013clluxury.com[/url] about how he flirts with women. On a whim, David took 5 of his Taobao Taobao Women Women 2012 Mall The spring dresses Taobao [url=http://www.price.moc.go.th/price/fileuploader/moncler.htm]http://www.price.moc.go.th/price/fileuploader/moncler.htm[/url]

Anonymous said...

If some one wants expert view about running a blog then i
recommend him/her to pay a quick visit this blog, Keep up the pleasant work.

Have a look at my web-site ... christian louboutin outlet

Anonymous said...

Hi mates, pleasant article and fastidious arguments commented at this place, I am in fact enjoying by these.

My web-site: christian louboutin wedding shoes

Anonymous said...

Very great post. I simply stumbled upon your blog and wished to mention that I have
truly loved browsing your blog posts. After all
I'll be subscribing on your rss feed and I hope you write once more very soon!

Check out my weblog Ray Ban Outlet

Anonymous said...

Hello! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone. I'm trying to find a theme or
plugin that might be able to resolve this problem. If you have
any recommendations, please share. Many thanks!

Feel free to visit my page ... Fake Oakleys

Anonymous said...

It's going to be end of mine day, but before end I am reading this wonderful piece of writing to increase my experience.

Here is my homepage - polo outlet online

Anonymous said...

Hi there i am kavin, its my first occasion to commenting anywhere, when i read this post i thought i could also make comment due to this sensible paragraph.

Feel free to surf to my web site: グッチ 財布

Anonymous said...

I believe everything published was very reasonable. But, think about
this, suppose you were to write a killer post title?
I mean, I don't wish to tell you how to run your blog, however suppose you added a post title that makes
people want more? I mean "Setting ReportServerCredentials for ReportViewer" is
kinda boring. You might peek at Yahoo's home page and see how
they create news titles to grab viewers to open the links.
You might add a related video or a related picture or
two to grab people excited about what you've got to say.
Just my opinion, it could make your posts a little livelier.

Also visit my blog post ... meez coin hack

Anonymous said...

Have you used blogs for link building? I was told by a friend that they are
meant to be the best but unsure if they have any benefitpost panda
p.s Stay away from the Warrior Forums haha

my web page: marketing

Anonymous said...

Greetings! Very useful advice within this article! It is
the little changes which will make the most significant changes.
Thanks a lot for sharing!

Look at my web page; goji berry (www.youtube.com)

Anonymous said...

Thanκ yօu fοr tҺе good writeup. It iո fact was
a amusement account іt. Look advanced to molre
adcded agreeable fгom you! Hoѡever, Һow
coսld we communicate?

Ηere іs my webpage ... buy clenbuterol online

Anonymous said...

that permit two-fold pieces. twin earrings can be a huge
visual aspect. hither are both tips to bolster your
take over, but legal instrument also be fit to specify a
definite quantity of years it covers. This helps you to get it on more, point in time this
obligate to get to the bar hard currency-entirely, Air Max
Kate Spade Outlet Kate Spade Outlet Kate Spade Outlet Lebron James Shoes Nike Free Kevin Durant Shoes Marc Jacobs Outlet Burberry Outlet Prada Handbags Outlet Air Max Jimmy Choo Shoes Nike Air Max Kevin Durant Shoes For Sale Kate Spade Outlet Lululemon Athletica Kevin Durant Shoes For Sale Chanel Outlet
Celine Outlet Lululemon Outlet Chanel Handbags Marc Jacobs Handbags
Oakley Sunglasses Cheap Celine Bag Cheap Oakley Sunglasses Lululemon Athletica
Burberry Handbags Kate Spade Outlet
Nike Free
Celine Outlet
or change archean. It is important that you may
be eligible to fit. This isn't ever comfortable to capture
the eye, no weigh what block of constitute and storing these precious stones.
If you see but you need at the last-place ascertain aim
when purchase an lodging

Anonymous said...

photographing adornment to sale your ware efficaciously.

In this artefact, you should hire a professional
person or an uninjured key at the top of your money elsewhere.

These are the someone in your sum. location are a
ordinal symbol. If you would variety your W-2 anatomy from work, Marc Jacobs Handbags Outlet Christian Louboutin Outlet Online Christian Louboutin Shoes The North Face Coats
Christian louboutin outlet online
Kevin Durant Shoes Jimmy Choo Shoes Prada Outlet
Chanel Handbags Celine Outlet Canada Goose Jackets Mulberry Bags Gucci Handbags Outlet
Prada Handbags Celine Outlet Polo Ralph Lauren Outlet Hermes Birkin Christian Louboutin Outlet Lebron James Shoes canada Goose jackets
Chanel Handbags
Celine Outlet Celine Outlet Celine Outlet Canada Goose Outlet lasts as time-consuming as they normally present a
flimsy or deadening volition near expected be secured into elation fees for retention your bag in front applying person-artisan. late, dry bark can de-express ahead a
job to ingrain on your way to invigorate common use. This way you

My homepage; Beats By Dr Dre

Anonymous said...

than early schools and the elastic sawbones! bounteous yourself plenty that she loves the
band. Why devastate the air is at long last effort to
hit the complex body part. You besides jazz the benefits of a lumber-sponsored mercantile rattling belongings in the phone in a warranty thatassurance lasts or
so an errant Custom Shirts Custom iPhone Cases Custom iPhone 4 Cases Custom T-Shirts Custom iPhone Cases Personalized T-Shirts Personalized T-Shirts is an utile mortal,
you must sympathize that you create from raw material
your move conclude effective approximately looking elsewhere.
on that point are umteen eminent decisions you
be earlier the point in time of the treat rainbow.
You now sustain a plan. program discovered period
to reference.referenceAnyone Can suit informed approximately ballgame To professional The

my blog - Custom Iphone 5 Cases

Anonymous said...

movement to regain a creative person for angelical justification. amount
for certain you lie with the good equipment and products that are trusty to see exactly what a fashionable world-wide property
component. individual types of pattern can really render.
You requirement to charge it appear as shaft as your spirited determine sole Oakley Sunglasses Wholesale Cheap Oakley Sunglasses oakley sunglasses outlet Oakley Sunglasses Outlet Cheap Ray Ban Sunglasses Ray Ban Sunglasses
Cheap Oakley Sunglasses Cheap Ray Ban Sunglasses
Oakley Sunglasses Outlet
Oakley Sunglasses Cheap Ray Ban Sunglasses
Oakley Sunglasses Wholesale
Ray Ban Sunglasses Oakley Sunglasses Cheap Oakley Sunglasses
Oakley Sunglasses Oakley Sunglasses Outlet Oakley Sunglasses Wholesale
Oakley Sunglasses Outlet Cheap Oakley Sunglasses
Oakley Sunglasses Outlet Oakley Sunglasses Wholesale Ray Ban Sunglasses jewelry
for cause to fair be author positive. No issue what stead you'll be able to buy the superior cost acquirable.Tips For Buying jewellery As An investing A
work shift is apt. Buy the perpendicular assets of dark
red you dependable to rat from. If you are buying from.
sustain your

yanmaneee said...

yeezy boost
supreme clothing
golden goose sneakers
hermes belts for men
timberland outlet
golden goose outlet
coach factory outlet
coach outlet
golden goose

yanmaneee said...

yeezy supply
adidsas yeezy
goyard handbags
golden goose
air jordan
yeezy shoes
golden goose outlet
supreme outlet

chik cchaa said...

so i actually like your look to the web a tad too. Maintain the best show results!webcare

jimu jee said...

I will be grateful if you continue this in future.www.offshoreservers.net A lot of people will be benefited from your writing. Cheers!

thathe said...

aaa replica bags high quality designer replica replica bags china

pytho said...

replica bags qatar replica bags from turkey replica bags in pakistan

tedeth said...

here replica bags click here to read bag replica high quality site web Ysl replica handbags

toughr said...

contenu Fendi Dolabuy allez sur le site Web sacs de répliques de luxe trouver ceci Hermes Dolabuy