zoukankan      html  css  js  c++  java
  • Spring.Net Resource handler for the 'web' protocol is not defined.

    在ASP.NET MVC 中 Spring.NET 配置注入的时候,下面这方式是可行的。

    <spring>
      <context>
        <resource uri="config://spring/objects" />    
      </context>
      <objects xmlns="http://www.springframework.net"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd"  default-autowire="byName" default-lazy-init="true">    
        <object id="CategoryDao" type="VipSoft.CMS.Dao.CategoryDao,VipSoft.CMS.Dao" singleton="false"></object>
      </objects>
    </spring>

    将 Objects 的内容移到单独的文件中。

    <spring>
      <context>
          <resource uri="~/Configs/Service.config" />   
      </context>  
    </spring>

    此时出现了 Resource handler for the 'web' protocol is not defined. 错误,

    解决方案如下在Web.config文件中修改

    <system.webServer>
      <validation validateIntegratedModeConfiguration="false" />  
        <modules runAllManagedModulesForAllRequests="true">
          <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" />                                          
        </modules>
        <handlers>
          <add name="Spring.WebPageHandler" path="*.aspx" verb="*" type="Spring.Web.Support.PageHandlerFactory, Spring.Web" />
          <add name="Spring.WebSupportHandler" path="ContextMonitor.ashx" verb="*" type="Spring.Web.Support.ContextMonitor, Spring.Web" />
        </handlers>        
    </system.webServer>
  • 相关阅读:
    bt5设置IP
    flyCoding
    [Cocoa][译]苹果 Cocoa 编码规范中文版
    [BZOJ4569] [Scoi2016]萌萌哒
    BZOJ4899]记忆的轮廓
    [BZOJ1701] [Usaco2007 Jan]Cow School牛学校
    [Poi2011]Lightning Conductor
    [BZOJ4709] [Jsoi2011] 柠檬
    决策单调性优化dp 专题练习
    2369. 区间
  • 原文地址:https://www.cnblogs.com/vipsoft/p/2820917.html
Copyright © 2011-2022 走看看