下面是访问web的一个程序 大概样子
其中ReportingService2005 rs = new ReportingService2005();这个创建的实例是怎么回事
“未能找到类型或命名空间名称 reportingService2005 是什么??????”
人太浅薄
using System;using GetPropertiesSample.ReportService2005;
static void Main(string[] args)
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = http://<Server Name>/reportserver/reportservice2005.asmx;
Property name = new Property(); name.Name = "Name";
Property description = new Property();
description.Name = "Description";
Property[] properties = new Property[2];
properties[0] = name; properties[1] = description;
try {
Property[] returnProperties = rs.GetProperties( "/AdventureWorks 2008 Sample Reports/Company Sales 2008",properties);
foreach (Property p in returnProperties)
{
Console.WriteLine(p.Name + ": " + p.Value);
}
} catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
四季花海