问题描述
|
我试图将登录的用户名从我的网络应用程序传递到Report Services。这是我的代码:
string usern = WindowsIdentity.GetCurrent().Name.ToString();
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl =
new Uri(@\"http://myserver/reportServer/\");
ReportViewer1.ServerReport.ReportPath = @\"/path/subpath/reportName\";
ReportParameter[] rp = new ReportParameter[1];
rp[0] = new ReportParameter(\"paramTest\",usern);
ReportViewer1.ServerReport.SetParameters(rp);
ReportViewer1.ServerReport.Refresh();
在本地运行时,一切正常,我可以在参数文本框中看到我的用户名。在服务器上运行它,我得到的是\“ NT AUTHORITY \\ NETWORK SERVICE \”而不是我的用户名。
有任何想法吗?提前致谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)