gpt4 book ai didi

reporting-services - rs.exe报告脚本-无法连接到服务器ReportService2005.asmx

转载 作者:行者123 更新时间:2023-12-04 07:51:49 26 4
gpt4 key购买 nike

我正在调用此rs.exe脚本来运行和导出报告:

rs -i RunReport.rss -s http://localhost/reportserver -u myUsername -p myPassword -e Exec2005

我得到的错误是:
Could not connect to server: http://localhost/reportserver/ReportService2005.asmx

目前,我们所有的报告都设置为使用“用户提供的凭据”。如果我转到报告并输入用户名和密码,它就可以正常运行。运行脚本只是行不通。

当我将报表的数据源更改为使用Windows Integrated Security时,脚本将起作用。

关于我做错了什么的任何想法?或者,是否可以将报告的权限更改为Windows Auth,然后再将其更改回?

SSRS 2012

我的rss脚本是
Public Sub Main()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim format as string = "EXCEL"
Dim fileName as String = "C:\test.xls"
Dim reportPath as String = "/MyDirectory/Report1"

' Prepare Render arguments
Dim historyID as string = Nothing
Dim deviceInfo as string = Nothing
Dim extension as string = Nothing
Dim encoding as string
Dim mimeType as string
Dim warnings() AS Warning = Nothing
Dim streamIDs() as string = Nothing
Dim results() as Byte

rs.LoadReport(reportPath, historyID)

results = rs.Render(format, deviceInfo, extension, _
mimeType, encoding, warnings, streamIDs)

' Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite(fileName)
stream.Write(results, 0, results.Length)
stream.Close()
End Sub

最佳答案

我遇到了同样的错误,这是由于配置错误造成的:脚本被设置为针对报表管理器URL而不是针对Web服务URL运行(均可在Reporting Services配置管理器中找到)。切换到Web服务URL可以为我解决。

(我认为您在过去三年中找到了解决方法,但是如果其他人也遇到同样的问题,我将其放在此处)

关于reporting-services - rs.exe报告脚本-无法连接到服务器ReportService2005.asmx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13298922/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com