I'm stucked in configuring my web.config file under a web forms project in order to get an instance of WebApplicationContext (at Global.asax) and then being able to use scope="application | session | request"
<sectionGroup name="spring"> <section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/> <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" /> </sectionGroup>  <spring> <context type="Spring.Context.Support.WebApplicationContext, Spring.Web"> <resource uri="~/Configuration/Spring.xml" /> </context> </spring>  <httpHandlers> <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/> </httpHandlers>  <httpModules> <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/> </httpModules>

I'm then trying to add the WebApplicationContext to my Application object, in order to cosume on any .aspx page;

protected void Application_Start(object sender, EventArgs e) { //Exception happens on next line! Application.Add("ContainerID", ContextRegistry.GetContext()); }

Exception I'm getting is;

"Error creating context 'spring.root': Resource handler for the 'web' protocol is not defined. Spring.NET"

Add this to system.webServer config node:

<modules runAllManagedModulesForAllRequests="true">
<add name="Spring" preCondition="integratedMode" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
</modules>

If you use integratedMode in IIS7

pasting

Can't get WebApplicationContext object from ContextRegistry.GetContext(): Resource handler for the 'web' protocol is not defined的更多相关文章

  1. spring.net 框架分析(三)ContextRegistry.GetContext()

    我们通过ContextRegistry.GetContext()建立了一个IApplicationContext得实例,那么这个实例具体是怎么建立的了. 我们来分析一下容器实例建立的过程: 我们在配置 ...

  2. eclipse环境Dynamic web module version 3.1版本的进步,简化Dynamic web object 中Servlet类的配置,不用web.xml配置<Servlet>

    eclipse环境Dynamic web module version 3.1版本之前,Dynamic web object 中Servlet类的配置,要在web.xml 配置<Servlet& ...

  3. Object.keys() https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/keys

    Object.keys() 方法会返回一个由一个给定对象的自身可枚举属性组成的数组,数组中属性名的排列顺序和使用for...in 循环遍历该对象时返回的顺序一致 (两者的主要区别是 一个 for-in ...

  4. Object.create() __https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/create

    Object.create() 方法会使用指定的原型对象及其属性去创建一个新的对象. 语法 Object.create(proto[, propertiesObject]) 参数 proto 新创建对 ...

  5. Asp.net MVC + EF + Spring.Net 项目实践(四)

    这篇写一写如何使用Spring.net来解耦各个项目 1. 在接口层添加IStudentBLL文件,里面有GetStudent和GetAllStudents两个方法:然后在StudentBLL类里实现 ...

  6. 【转载】关于ActionContext.getContext().getParameters()获值问题

    ActionContext.getContext().getParameters():一个学员问题的解答 2012-11-12 15:12:05|  分类: 默认分类 |  标签:struts2   ...

  7. c# sharepoint client object model 客户端如何创建中英文站点

    c# sharepoint client object model 客户端如何创建中英文站点 ClientContext ClientValidate = tools.GetContext(Onlin ...

  8. 前端开发者进阶之ECMAScript新特性【一】--Object.create

    Object.create(prototype, descriptors) :创建一个具有指定原型且可选择性地包含指定属性的对象 参数:prototype 必需.  要用作原型的对象. 可以为 nul ...

  9. 【JavaScript】Registering JavaScript object methods as callbacks

    The registration of callback functions is very common in JavaScript web programming, for example to ...

随机推荐

  1. servlet/jsp GET/POST

    GET请求方式 当需要向服务器请求指定的资源时使用的方法 它不应该用于一些会造成副作用的操作中(在网络应用中用它来提交请求是一种常见的错误用法) 什么情况浏览器发送get请求 -在地址栏输入一个地址 ...

  2. linux php环境搭建以及magento安装教程

    听朋友用magento在搭建电商系统,我好奇.遂自己下载了一个包部署了一套. 主机采用linux center os6.5,安装程序非常顺利,部署一套大概费时一个小时左右.   ########### ...

  3. duilib进阶教程 -- 总结 (17)

    整个教程的代码下载:http://download.csdn.net/detail/qq316293804/6502207 (由于duilib进阶教程主要介绍界面,所以这个教程只给出界面相关的代码,完 ...

  4. Atitit org.eclipse.jdt 的ast 架构 Eclipse JDT API spec

    Atitit org.eclipse.jdt 的ast 架构 Eclipse JDT API spec 继承树1 Expression的子类1 获取子类2 继承树 Astnode>express ...

  5. iOS开发-代理模式

    代理模式有的时候也被称之为委托模式,但是实际上两者是有分别的,代理模式为另一个对象提供一个替身或占位符访问这个对象,代理对象和控制访问对象属于同一类,委托对象和对象不一定属于同一类.两者都可以控制类的 ...

  6. DOS命令中的For

    前几天做安装包,需要获取某个目录下所有文件夹的名字和路径.本来想用C++写段代码,后来想起DOS有可能满足需求,于是研究了一下FOR命令,竟然非常容易的达到目的,看来小看了DOS这个门口的东西. 说下 ...

  7. php-fpm的配置和优化

    php-fpm的安装目录 下面是我的平时的环境搭建php的各种安装目录,大家的基本也差不多. centos等linux平台 /usr/local/php/php /usr/local/php/etc/ ...

  8. 如何在servlet取得spring beans (autowired)(转)

    在应用中一般普通的JavaPojo都是由Spring来管理的,所以使用autowire注解来进行注入不会产生问题,但是有两个东西是例外的,一个是 Filter,一个是Servlet,这两样东西都是由S ...

  9. 关于C++ const 的全面总结

    http://blog.csdn.net/Eric_Jo/article/details/4138548 C++中的const关键字的用法非常灵活,而使用const将大大改善程序的健壮性,本人根据各方 ...

  10. C#WebBrowser控件使用教程与技巧收集--苏飞收集

    C#WebBrowser控件使用教程与技巧收集--苏飞收集 先来看看常用的方法 Navigate(string urlString):浏览urlString表示的网址 Navigate(System. ...