Click to See Complete Forum and Search --> : Microsoft Reporting Service webservice throwing an exception


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");
}

exterminator
February 24th, 2006, 01:10 AM
Is this related to databases? :rolleyes:

Try using the debugger to see if it helps reach to the cause of the exception. There must be some message to explain the exception - what does it say?

See if this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_2yt2.asp) helps. Do you have the required access rights to do the operation on the server? Regards.