閱讀: 64 評論: 0 作者: Terry Sun 發(fā)表于 2009-12-09 16:22 原文鏈接
以調(diào)用SQL 2005的Reporting Service為例, 此Web Service需要進(jìn)行windows身份驗(yàn)證:
string userName = "admin"; string password = "1"; string domain = "TestDomain"; // ReportingService 是 Web Service的代理類 // ConfigurationSettings.AppSettings["RptServer"] web.config中讀取web servcie的地址,如:http://ReportService/ReportService.asmx ReportingService rs = new ReportingService(ConfigurationSettings.AppSettings["RptServer"]); // 設(shè)置Credentials rs.Credentials = new System.Net.NetworkCredential(userName, password, domain); // 調(diào)用Web Service的Render方法 rs.Render();
新聞頻道:甲骨文與太陽:十年生死兩茫茫
推薦鏈接:Windows 7專題發(fā)布
網(wǎng)站導(dǎo)航:博客園首頁 個人主頁 新聞 社區(qū) 博問 閃存 知識庫
文章來源:http://www.cnblogs.com/badboy168/archive/2009/12/09/1620419.html