zoukankan      html  css  js  c++  java
  • web.config配置

    1.提示:The test form is only available for requests from the local machine是因为没有加入

    <webServices>
    <protocols>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
    </protocols>
    </webServices>

    **完整配置信息:

    <?xml version="1.0" encoding="utf-8"?>

    <!--
    有关如何配置 ASP.NET 应用程序的详细信息,请访问
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <webServices>
    <protocols>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
    </protocols>
    </webServices>
    </system.web>
    <system.webServer>
    <handlers>
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
    </system.webServer>
    </configuration>

    2.提示:Only Web services with a [ScriptService] attribute on the class definition can be called from script,需要在asmx文件中加入:

    [ScriptService]

    完整信息:

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ScriptService]

  • 相关阅读:
    Can't use Subversion command line client: svn
    SpringMVC配置easyui-datagrid
    找不到提交和更新按钮,subversion不见了,无法更新和上传代码
    静态资源[org.springframework.web.servlet.PageNotFound]
    Field 'id' doesn't have a default value
    MySql 插入数据中文乱码
    Junit 测试 Spring
    mybatis动态SQL
    Mybatis 3.3.0 Log4j配置
    MappingJacksonHttpMessageConverter过期
  • 原文地址:https://www.cnblogs.com/net5x/p/11290741.html
Copyright © 2011-2022 走看看