我们将一个asp.net网站从2008R2 Windows和SQL Server服务器复制到带有SQL Server 2016的Windows 2016服务器,当我们尝试从浏览器打开网站时,它失败并出现以下错误和堆栈跟踪。
Message: E:\shared\apps\RepairTrak\About.aspx.vb(19): error BC30002: Type 'ReportExecutionService' is not defined.
Stack Trace:
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
以下是名为About.aspx的整个代码隐藏页面,它抛出错误。
Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution
部分类关于 继承页面
Private Sub About_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim virtualFolderPath As String = "~/Photos/_Rotated/"
'Get information about the files in the specified folder
Dim strPhysicalPath As String = Server.MapPath(virtualFolderPath)
strPhysicalPath &= "IMG_061749.JPG"
'Get information about the image
'Dim currentImage As System.Drawing.Image = System.Drawing.Image.FromFile(strPhysicalPath)
ImageRounded.ImageUrl = strPhysicalPath
ImageThumb.ImageUrl = strPhysicalPath
' ReportExecution object prepare
Dim rs As New ReportExecutionService()
End Sub
结束班
答案 0 :(得分:0)
结果我必须在新服务器上安装ReportViewer运行时exe。