(請注意,這不是第一次運行中唯一的問題,這種情況每次)生成SSRS 2008年從遠程PC C#R2報告比從本地PC慢
我想知道是否有人遇到以下情況。
我們創建了一個c#應用程序,可以從SSRS實例生成報告。
當我在SSRS實例所在的服務器上運行此應用程序時,報告生成時間爲+ - 6秒。
當我從遠程盒子運行完全相同的應用程序(同一個nework,只是不同的pc到SSRS實例),同一個報告需要18秒。
使用的代碼是一樣的東西
ServerReport report = new ServerReport();
report.ReportServerUrl = new System.Uri(reportSetup.ConnectionString);
report.ReportServerCredentials.NetworkCredentials = System.Net.CredentialCache.DefaultCredentials;
report.ReportPath = reportName;
report.SetParameters(reportParams);
byte[] bytes = report.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);
其中 ServerReport
是Microsoft.Reporting.WinForms
從C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll
(但也嘗試了網頁版),其餘被聲明爲
Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;
List<ReportParameter> reportParams
和reportSetup.ConnectionString是http://<server name>/ReportServer
的形式(這裏的服務器名稱是實際的名稱,但我也嘗試過使用IP)。
我定時了上述每個步驟,anf發現罪魁禍首是在它設置參數的行上。所以我將參數值存儲在實際報告中的默認值中,並刪除了該步驟。然後渲染花費的時間比以前更長。
進一步說我也試圖改變從網絡報告服務配置管理器服務帳戶的本地帳戶,並在配置文件在C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer
最初發現的身份驗證設置(rsreportserver.config)發揮各地身份驗證設置爲
<Authentication>
<AuthenticationTypes>
<RSWindowsNegotiate/>
<RSWindowsNTLM/>
</AuthenticationTypes>
<RSWindowsExtendedProtectionLevel>Off</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
<EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>
我刪除行<RSWindowsNegotiate/>
當我從Authentication Types in Reporting Services
閱讀RSWindowsNegotiate
RSWindowsNegotiate指示報表服務器處理指定協商身份驗證 請求。協商首先嚐試Kerberos 身份驗證,但如果Active Directory 無法爲客戶端請求授予票證給報表服務器,則會首先嚐試進行身份驗證,但會回退到NTLM。 如果票證不可用,協商將只能回退到NTLM。 如果第一次嘗試導致錯誤而不是丟失票證, 報表服務器不會再次嘗試。
但這沒有幫助。
有沒有人有任何想法如何糾正代碼或SSRS安裝?我希望應用程序在SSRS實例的服務器上運行。
非常感謝你的努力。 ,但作爲第一行讀取**(請注意,這不是第一次運行唯一的問題,這種情況每次都會發生)** – 2013-03-21 06:54:03