2013-05-14 104 views
0

我最近将我们开发区域中的多个网站从x86 Windows 2003(IIS6)迁移到x64 Windows 2008 R2(IIS7)。我使用“msdeploy”来执行迁移。最初我迁移了整个服务器,但遇到了问题,所以我最终只是迁移IIS配置,而不是脚本映射。经过几次配置更改后,我终于能够以集成模式获得.NET 3.5站点的服务页面。但是,我有主母版页的这一部分的问题:jsdebug Web服务方法名称无效

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"> 
<Services> 
    <asp:ServiceReference Path="~/AjaxServices/FormSubmissionService.asmx" /> 
    <asp:ServiceReference Path="~/AjaxServices/GMapDataService.asmx" /> 
    <asp:ServiceReference Path="~/AjaxServices/ImageGalleryService.asmx" /> 
    <asp:ServiceReference Path="~/AjaxServices/MyFavoritesService.asmx" /> 
</Services> 

每一种产生像脚本标签:

<script src="../AjaxServices/FormSubmissionService.asmx/jsdebug" type="text/javascript"></script> 
<script src="../AjaxServices/GMapDataService.asmx/jsdebug" type="text/javascript"></script> 
<script src="../AjaxServices/ImageGalleryService.asmx/jsdebug" type="text/javascript"></script> 
<script src="../AjaxServices/MyFavoritesService.asmx/jsdebug" type="text/javascript"></script> 

正在达成的网络服务,但试图访问“jsdebug”时出现以下错误:

System.InvalidOperationException: jsdebug Web Service method name is not valid. 
    at System.Web.Services.Protocols.HttpServerProtocol.Initialize() 
    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) 
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) 
  • 该网站的应用程序池是v2.0.050727集成的。
  • “启用32位应用程序= false”(翻转这并没有帮助)。
  • 该网站是为“任何CPU”构建的。
  • 我有我的本地Win7框中运行II7下的相同网站和 一切运行良好。我看到的唯一区别是在“经典”模式下运行的应用程序池是 。我试图用 将服务器切换到“经典”模式,结果相同。
  • 我试过设置debug="false"但我得到相同的错误(除了/ js而不是/ jsdebug)
  • 我已经运行了aspnet_regiis -i几次。 2.0和4.0
  • 的64位版本我已经重新安装过角色管理IIS和.NET 3.5.1几次
  • 我能够得到每个Web服务定义页面的

我想重新安装/修复.net 2.0,但在WinServer 2008中似乎不可能。我在其他地方读过,重新安装操作系统是实现此目的的唯一方法。这不是一个选项。

我是否在某处丢失了一个配置?任何帮助将不胜感激!

+0

同样的问题出现后? http://stackoverflow.com/questions/5382239/request-for-wstestservice-asmx-jsdebug-returns-500-error-on-server-fine-in-deve – 2013-05-14 18:22:25

+0

这是同样的错误,但不幸的是答案没有解决我的问题。 – BFK 2013-05-14 21:14:01

回答

2

想通了。我将此处理程序添加到web.config中system.webServer/handlers下的列表顶部。脚本现在加载OK

<add name="ScriptHandlerFactory" path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304"/> 

我其实是有这个处理程序列表中,但它是引用4.0和它的2.0处理程序“*的.asmx”