Dear all,
I have 2 server, Server_A is IIS, Server_B is Reporting Server(SQL2005).
I create a web project under Server_A and drop a reportviewer on the
default.aspx.
I then enter the Server URL and Report path. And build the project.
I can then browse the report without any problem if URL is typing
localhost/web_project/default.aspx
But problem comes up if change into Server_A/webproject/default.aspx.
The message is
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP
status 401: Unauthorized.
Regards,
Ken Linhai
this ragu
u have iis server security problem u verify ur admin
i have the same problem occur i verify my admin
i sent the coading
private void button1_Click_1(object sender, EventArgs e)
{
RunRemote();
}
private void RunRemote()
{
try
{
// this.Cursor = Cursors.WaitCursor;
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportServerUrl = new Uri(Settings.Default.ReportServerEndPoint);
reportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
reportViewer1.RefreshReport();
}
catch (Exception ex)
{
throw ex;
}
finally
{
//this.Cursor = Cursors.Default;
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||use this code easily retrive your report
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
Microsoft.Reporting.WebForms.ReportParameter [1]=new Microsoft.Reporting.WebForms.ReportParameter (0);
}
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||No, I can sucess to view the report from the IE in Web Server.
But when I go to toher computers, got the 401 error.
Regards,
Ken Lin
<ragu> wrote in message news:2006122114446ragu1100@.yahoo.com...
> use this code easily retrive your report
>
> protected void Page_Load(object sender, EventArgs e)
> {
>
> if (!Page.IsPostBack)
> {
> ReportViewer1.ProcessingMode => Microsoft.Reporting.WebForms.ProcessingMode.Remote;
> ReportViewer1.ServerReport.ReportPath = "/Report
> Project3/TestReortForFunds";
> ReportViewer1.ServerReport.ReportServerUrl = new
> Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
> Microsoft.Reporting.WebForms.ReportParameter [1]=new
> Microsoft.Reporting.WebForms.ReportParameter (0);
>
> }
> }
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
No comments:
Post a Comment