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. [游戏学习25] MFC 橡皮筋画线效果

    >_<:这是给出窗口内外不同情况的处理展示的例子. >_<:MouseCap.h #include<afxwin.h> class CMyApp :public C ...

  2. Gershgorin圆盘定理

    众所周知,对一个$n$阶方阵求取特征值需要解一个一元$n$次方程,当$n$很大时,这是很难实现的.但是,在有些涉及矩阵的实际问题中,我们并不需要知道矩阵特征值的准确值,而只需要知道其大概范围就行了,例 ...

  3. atitit.组件化事件化的编程模型--服务端控件(1)---------服务端控件与标签的关系

    atitit.组件化事件化的编程模型--服务端控件(1)---------服务端控件与标签的关系 1. 服务器控件是可被服务器理解的标签.有三种类型的服务器控件: 1 1.1. HTML 服务器控件  ...

  4. paip.gui控件form窗体的原理实现以及easyui的新建以及编辑实现

    paip.gui控件form窗体的原理实现以及easyui的新建以及编辑实现 //////新建 与编辑  var  EditForm=new Form_easyui();    if(row)     ...

  5. Avizo - 高级三维可视化及分析软件

    今天从材料科学应用角度介绍Avizo的基本功能. Avizo是一款先进的三维可视化及分析应用,可用来探索从断层扫描.显微镜.核磁共振成像及更多其他技术获得的材料科学数据.从简单的可视化与测量到高级的图 ...

  6. mysql 创建用户并赋予权限

    mysql> create user 'zhangsan'@'localhost' identified by '123456'; Query OK, 0 rows affected (0.00 ...

  7. 【转】Swift开源项目精选

    https://github.com/ipader/SwiftGuide/blob/master/Featured.md 目录 “轮子” 工具类 存储类 网络类 图片类 界面类 框架类 “车子” 示例 ...

  8. 汇编语言学习笔记(5)——[bx]和loop

    1.[bx]代表将bx寄存器中的值作为偏移地址. 2.loop与循环有关 3.inc bx的含义为bx中的内容+1 4.loop指令的格式为: loop 标号 CPU运行loop指令的时候.要进行两步 ...

  9. redis 配置文件 append only file(aof)部分---数据持久化

    ############################## 仅追加方式 ############################### #默认情况下Redis会异步的将数据导出到磁盘上.这种模式对许 ...

  10. spring和ehcache整合,实现基于注解的缓存实现

    要实现基于注解的缓存实现,要求Spring的版本在3.1或以上版本. 首先需要在spring的配置文件中添加对缓存注解的实现: <?xml version="1.0" enc ...