473,545 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ReportViewer Control Permission

AG
I am using a ReportViewer control in an ASP.NET 2.0 WAP aspx page in remote
processing mode.

The report server is on a shared web host.

Can anyone tell me or point me to an example of how to pass user name and
password to the report server via the ReportViewer control?

--

AG
Email: discuss at adhdata dot com
Sep 18 '07 #1
7 10756
Hi AG,

Have you tried ReportViewer.Se rverReport.SetD ataSourceCreden tials:

http://msdn2.microsoft.com/en-us/lib...ebforms.server
report.setdatas ourcecredential s(VS.80).aspx
Further reference:

#How to bypass/disable the authentication for reportviewer in a web form? -
MSDN Forums
http://forums.microsoft.com/MSDN/Sho...30501&SiteID=1
<quote>
You can disable prompting for data source credentials by using
ReportViewer.Sh owCredentialPro mpts = false. But you will still need to
manually supply the credentials to run the report using
ReportViewer.Se rverReport.SetD ataSourceCreden tials().
</quote>
Please feel free to let me know if there's anything unclear. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 19 '07 #2
AG
Thanks Walter.

As usual, help is wofully lacking on SetDataSourceCr edentials, but it seems
like that applies to the report's datasource, not the report (server)
itself.

What I need is ReportServerCre dentials.
I found this http://forums.asp.net/t/986174.aspx

When running the WAP on my development machine (Win XP IIS5), I can set the
report server to be the one on the shared web host and pass the credentials.
The reports work.
However, when I run the WAP on the shared web host and pass the same
credentials, I get the 401 unauthorized error.

Any ideas as to how to correct this?
--

AG
Email: discuss at adhdata dot com
""Walter Wang [MSFT]"" <wa****@online. microsoft.comwr ote in message
news:UD******** *******@TK2MSFT NGHUB02.phx.gbl ...
Hi AG,

Have you tried ReportViewer.Se rverReport.SetD ataSourceCreden tials:

http://msdn2.microsoft.com/en-us/lib...ebforms.server
report.setdatas ourcecredential s(VS.80).aspx
Further reference:

#How to bypass/disable the authentication for reportviewer in a web
form? -
MSDN Forums
http://forums.microsoft.com/MSDN/Sho...30501&SiteID=1
<quote>
You can disable prompting for data source credentials by using
ReportViewer.Sh owCredentialPro mpts = false. But you will still need to
manually supply the credentials to run the report using
ReportViewer.Se rverReport.SetD ataSourceCreden tials().
</quote>
Please feel free to let me know if there's anything unclear. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 20 '07 #3
Hi AG,

Sorry for the misunderstandin g.

The new issue you mentioned is actually about how to make two IIS
server/web application accessing each other.

By default, a web application on IIS 6.0 runs in the default Application
Pool, which by default is running under the NETWORK SERVICE account. This
account is very limited, although it have network access, but you need to
grant it in either your local or remote sql/report server:

http://msdn2.microsoft.com/en-us/library/ms998320.aspx
<quote>
If you are accessing a database on another server in the same domain (or in
a trusted domain), the Network Service account's network credentials are
used to authenticate to the database. The Network Service account's
credentials are of the form DomainName\AspN etServer$, where DomainName is
the domain of the ASP.NET server and AspNetServer is your Web server name.

For example, if your ASP.NET application runs on a server named SVR1 in the
domain CONTOSO, the SQL Server sees a database access request from
CONTOSO\SVR1$.

To access a remote SQL Server using Network Service

To grant access to a remote database server in the same domain or a trusted
domain, follow the steps described earlier for a local database, except in
step 4, use the DomainName\AspN etServer$ account to create the database
login.
</quote>
Also:

http://msdn2.microsoft.com/en-us/library/ms998320.aspx
<quote>
In some scenarios, using a custom domain service account is a better
approach than using the Network Service account. You should use a custom
domain service account if:
You want to isolate multiple applications on a single server from one
another.
You need different access controls for each application on local and remote
resources. For example, other applications cannot access your application's
databases if access is restricted to your application's account.
You want to use Windows auditing to track the activity of each application
separately.
You want to prevent any accidental or deliberate changes to the access
controls or permissions associated with the general purpose Network Service
account from affecting your application.
</quote>

In this case, you will need to create a separate Application Pool in IIS
6.0 and configure it to use a custom domain service account; then configure
your web application to run in this Application Pool.

Pleaset let me know if you have anything unclear. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 20 '07 #4
AG
Thanks Walter,

The problem is not authenticating to the SQL Server, but to the report
server.
I am checking with the webhost to find out if both machines are on the same
domain.

So, lets say the 'WebServer' is on 'Domain1' and the 'ReportServer' is on
'Domain2'.
There are three parameters to pass to the NetworkCredenti al - username,
password and domain.
Obviously username and password would be that for a user on the ReportServer
with the appropriate permissions to view the report in question.
What do I pass for the domain parameter? Domain1, Domain2, Domain1\Webserv er
or what?

What if they are on the same domain?

Why would it work from my machine? My machine is definitely not in the
ReportServer's domain.

--

AG
Email: discussATadhdat aDOTcom
""Walter Wang [MSFT]"" <wa****@online. microsoft.comwr ote in message
news:4p******** ********@TK2MSF TNGHUB02.phx.gb l...
Hi AG,

Sorry for the misunderstandin g.

The new issue you mentioned is actually about how to make two IIS
server/web application accessing each other.

By default, a web application on IIS 6.0 runs in the default Application
Pool, which by default is running under the NETWORK SERVICE account. This
account is very limited, although it have network access, but you need to
grant it in either your local or remote sql/report server:

http://msdn2.microsoft.com/en-us/library/ms998320.aspx
<quote>
If you are accessing a database on another server in the same domain (or
in
a trusted domain), the Network Service account's network credentials are
used to authenticate to the database. The Network Service account's
credentials are of the form DomainName\AspN etServer$, where DomainName is
the domain of the ASP.NET server and AspNetServer is your Web server name.

For example, if your ASP.NET application runs on a server named SVR1 in
the
domain CONTOSO, the SQL Server sees a database access request from
CONTOSO\SVR1$.

To access a remote SQL Server using Network Service

To grant access to a remote database server in the same domain or a
trusted
domain, follow the steps described earlier for a local database, except in
step 4, use the DomainName\AspN etServer$ account to create the database
login.
</quote>
Also:

http://msdn2.microsoft.com/en-us/library/ms998320.aspx
<quote>
In some scenarios, using a custom domain service account is a better
approach than using the Network Service account. You should use a custom
domain service account if:
You want to isolate multiple applications on a single server from one
another.
You need different access controls for each application on local and
remote
resources. For example, other applications cannot access your
application's
databases if access is restricted to your application's account.
You want to use Windows auditing to track the activity of each application
separately.
You want to prevent any accidental or deliberate changes to the access
controls or permissions associated with the general purpose Network
Service
account from affecting your application.
</quote>

In this case, you will need to create a separate Application Pool in IIS
6.0 and configure it to use a custom domain service account; then
configure
your web application to run in this Application Pool.

Pleaset let me know if you have anything unclear. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 21 '07 #5
Hi AG,

Not sure if it's the same issue, but give it a try:

#The request failed with HTTP status 401: Unauthorized? in
dotnet.framewor k.aspnet.webser vices
http://msdn.microsoft.com/newsgroups...icrosoft.publi
c.dotnet.framew ork.aspnet.webs ervices&tid=e1d cda98-a208-430c-96ed-a35e0a2460
25&m=1&p=1
<quote>
This solution solved my problem:
http://aspadvice.com/blogs/ssmith/ar...ting-Services-
401-Error.aspx
</quote>

Basically it's fixed by this KB:

#You receive error 401.1 when you browse a Web site that uses Integrated
Authentication and is hosted on IIS 5.1 or IIS 6
http://support.microsoft.com/default...b;en-us;896861
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 21 '07 #6
AG
Walter,

I have found out that the report server and web server are the same machine,
so I don't understand why there should be a problem, especially since
running the web app on my machine (far removed from both), the reports work
fine.

Since it works from my development machine, could it be that something needs
to be different in the passed network credential when the web app and report
server are on the same machine?

I am passing the credential using the code from
http://forums.asp.net/t/986174.aspx.
--

AG
Email: discussATadhdat aDOTcom
""Walter Wang [MSFT]"" <wa****@online. microsoft.comwr ote in message
news:In******** *****@TK2MSFTNG HUB02.phx.gbl.. .
Hi AG,

Not sure if it's the same issue, but give it a try:

#The request failed with HTTP status 401: Unauthorized? in
dotnet.framewor k.aspnet.webser vices
http://msdn.microsoft.com/newsgroups...icrosoft.publi
c.dotnet.framew ork.aspnet.webs ervices&tid=e1d cda98-a208-430c-96ed-a35e0a2460
25&m=1&p=1
<quote>
This solution solved my problem:
http://aspadvice.com/blogs/ssmith/ar...ting-Services-
401-Error.aspx
</quote>

Basically it's fixed by this KB:

#You receive error 401.1 when you browse a Web site that uses Integrated
Authentication and is hosted on IIS 5.1 or IIS 6
http://support.microsoft.com/default...b;en-us;896861
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 24 '07 #7
Hi AG,

I'm glad to hear to that the issue is not solved. Thanks for sharing the
cause here.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 27 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7719
by: Raghu | last post by:
I have developed a web portal that uses ReportViewer web control to connect to a remote SQL 2005 Report server and displays the reports on the client side. The asp.net page has been coded to automatically impersonate a specific user who has access to the report server so that the customer don't get a pop-up asking for login credentials. Once...
1
15851
by: steve | last post by:
Hi All I need help on how to manipulate the data returned from the database for displaying in the new reportviewer at runtime So far I have an rdlc file with a dataset, binding source and Tableadapter as created by the wizard and all work fine However I want to be able to change the displayed report at runtime when the user selects a...
4
4462
by: Sevu | last post by:
I am working with ASP.NET.I am using ReportViwer Control to show my report.I like to add dropdownlist with in the reportviewer control. ( Not top to the control some thing like that).I need to place dropdown near to Export link ( Excel and PDF Export).Is it possible to add at the dropdown list with in report viewer control?. I found the...
1
17925
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't...
0
2001
by: Rich | last post by:
Hello, I started using the Reportviewer control (very nice) for generating Reporting Services type reports in my VB2005 app. I have been experimenting using a designer Reportviewer control from the toolbox - created at design time - (VB2005) and also creating a Reportviewer control at runtime on the fly. The runtime Reportviewer will...
0
1679
by: Fred G. Sanford | last post by:
Firstly, I am a fairly new .Net developer, so please excuse any dumb/ignorant questions or comments. Thanks. I created a VWD Express project, which uses the ReportViewer control, on my local machine. I had to download the ReportViewer control from MS and install it on my machine in order for this to work. I have the project working on my...
10
3738
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a datasource. I would like to use an existing class object. The examples I have found state that the class should be in the App_Code folder. However a WAP...
1
2233
by: ajaykhedekar | last post by:
I am Showing Mulitple MSRS Reports on Single ASP.Net WEB Page using Mulitple ReportViewer Controls. If User wants to Print the Reports, then user has to click Print button provided by ReportViewer Control multiple times, So I want to do this with one button Click.This Button Click event will handle the Printing process of ReportViewer Control. ...
5
10327
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 I would like to add a checkbox or dropdown control to the .RLDC and have Item #1, Item #2, or Item #3 display conditionally based on a checkbox being...
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7682
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7449
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6009
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5351
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3479
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.