Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the network credentials used for authentication with the report server.
Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in Microsoft.ReportViewer.WinForms.dll)
Syntax
public ICredentials NetworkCredentials { get; set; }
public:
property ICredentials^ NetworkCredentials {
virtual ICredentials^ get() sealed;
virtual void set(ICredentials^ value) sealed;
}
abstract NetworkCredentials : ICredentials with get, set
override NetworkCredentials : ICredentials with get, set
Public Property NetworkCredentials As ICredentials
Property Value
Type: System.Net.ICredentials
A NetworkCredentials object containing the network credentials used for authentication with the report server.
Implements
IReportServerCredentials.NetworkCredentials
Examples
Legacy Code Example
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace ReportServerCredentialsSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
reportViewer1.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportPath =
@"/Adventureworks Sample Reports/Company Sales";
NetworkCredential myCred = new
NetworkCredential(<UserName>, <Password>, <DomainName>);
reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials =
myCred;
reportViewer1.RefreshReport();
}
}
}
See Also
ReportServerCredentials Class
Microsoft.Reporting.WinForms Namespace
Return to top