asp.net服务以集成模式响应500

时间:2016-06-15 10:28:41

标签: asp.net vb.net web-services

我有一个网站,里面有网络服务。它看起来像这样:

<ScriptService> _
<WebService(Namespace := "http://tempuri.org/")> _
<WebServiceBinding(ConformsTo := WsiProfiles.BasicProfile1_1)> _
<DesignerGenerated>
Public Class FooWebService
    Inherits WebService

    <WebMethod>
    Public Shared Function HelloWorld() As String
        Return "Hello World"
    End Function
End Class

根目录中有一个文件FooWebService.asmx

<%@ WebService Language="VB" CodeBehind="~/Src/FooWebService.vb" Class="FooWebService" %>

我在我的.ascx中以这种方式注册:

<asp:ScriptManagerProxy runat="server">
    <Services>
        <asp:ServiceReference Path="~/FooWebService.asmx"/>
    </Services>
</asp:ScriptManagerProxy>

只要我在经典模式下运行网站,这项工作就可以了。一旦我切换到集成,这将不再工作。我在js控制台上加载了这条消息:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
路径上的

http://localhost:3874/FooWebService.asmx/jsdebug(localy调试)

这是什么原因?

0 个答案:

没有答案