sac77
February 20th, 2006, 12:47 AM
I am trying out the following code to fetch list of items under specified path, but ListChildren()
is throwing System.InvalidOperationException exception.
What are the steps to avoid getting this exception, & how do I resolve this after I get it?
// Code snippet
string path = "/";
ReportingService rs = new ReportingService();
rs.Url = "http://localhost/ReportServer/ReportService.asmx";
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = null;
try
{
items = rs.ListChildren(path, true);
}
catch(System.InvalidOperationException)
{
Console.WriteLine("ListChildren() caused an exception");
}
is throwing System.InvalidOperationException exception.
What are the steps to avoid getting this exception, & how do I resolve this after I get it?
// Code snippet
string path = "/";
ReportingService rs = new ReportingService();
rs.Url = "http://localhost/ReportServer/ReportService.asmx";
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = null;
try
{
items = rs.ListChildren(path, true);
}
catch(System.InvalidOperationException)
{
Console.WriteLine("ListChildren() caused an exception");
}