您好,
现在程序中有两个问题:
1. 缺少 ActiveReports.ReportService.asmx 文件
手动添加ActiveReports.ReportService.asmx 文件, ActiveReports.ReportService.asmx一般是在页面中拖拽WebViewer的时候自动添加的, 所以您可以按照以下操作来生成ActiveReports.ReportService.asmx文件:
1. 选中View 文件夹,右键单击 添加 新建项,选择 MVC 视图页
2. 在新生成的视图页中选择“ 拆分”,将WebViewer 拖拽到设计界面中; 这个时候就会生成ActiveReports.ReportService.asmx 文件。
2. 如果按照以上步骤仍然报错, 请修改Web.config 文件中的<handlers>(用以下代码替换 webconfig文件的<handlers>节点)
- <handlers>
- <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
- <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
- <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
- <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
- <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
- <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
- <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" name="AsmxHandler" resourceType="Unspecified" preCondition="integratedMode" />
- <add verb="*" path="*.ar10" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR10_ReportBinariesStreamer" resourceType="Unspecified" preCondition="integratedMode" />
- <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR10_CompiledReportHandler" resourceType="Unspecified" preCondition="integratedMode" />
- <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR10_RpxHandler" resourceType="Unspecified" preCondition="integratedMode" />
- <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR10_RdlxHandler" resourceType="Unspecified" preCondition="integratedMode" />
- <add verb="*" path="*.ar10Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR10_WebCacheAccessHandler" resourceType="Unspecified" preCondition="integratedMode" />
- </handlers>
复制代码
另外 MVC中使用ActiveReports 博客资源可参考: http://blog.gcpowertools.com.cn/ ... veReports_MVC4.aspx
|