Can't get WebApplicationContext object from ContextRegistry.GetContext(): Resource handler for the 'web' protocol is not defined
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的更多相关文章
- spring.net 框架分析(三)ContextRegistry.GetContext()
我们通过ContextRegistry.GetContext()建立了一个IApplicationContext得实例,那么这个实例具体是怎么建立的了. 我们来分析一下容器实例建立的过程: 我们在配置 ...
- 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& ...
- Object.keys() https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
Object.keys() 方法会返回一个由一个给定对象的自身可枚举属性组成的数组,数组中属性名的排列顺序和使用for...in 循环遍历该对象时返回的顺序一致 (两者的主要区别是 一个 for-in ...
- Object.create() __https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/create
Object.create() 方法会使用指定的原型对象及其属性去创建一个新的对象. 语法 Object.create(proto[, propertiesObject]) 参数 proto 新创建对 ...
- Asp.net MVC + EF + Spring.Net 项目实践(四)
这篇写一写如何使用Spring.net来解耦各个项目 1. 在接口层添加IStudentBLL文件,里面有GetStudent和GetAllStudents两个方法:然后在StudentBLL类里实现 ...
- 【转载】关于ActionContext.getContext().getParameters()获值问题
ActionContext.getContext().getParameters():一个学员问题的解答 2012-11-12 15:12:05| 分类: 默认分类 | 标签:struts2 ...
- c# sharepoint client object model 客户端如何创建中英文站点
c# sharepoint client object model 客户端如何创建中英文站点 ClientContext ClientValidate = tools.GetContext(Onlin ...
- 前端开发者进阶之ECMAScript新特性【一】--Object.create
Object.create(prototype, descriptors) :创建一个具有指定原型且可选择性地包含指定属性的对象 参数:prototype 必需. 要用作原型的对象. 可以为 nul ...
- 【JavaScript】Registering JavaScript object methods as callbacks
The registration of callback functions is very common in JavaScript web programming, for example to ...
随机推荐
- Lingo 做线性规划 - Asset allocation and Portfolio models
Reference: <An Introduction to Management Science Quantitative Approaches to Decision Making, Rev ...
- js 函数提升和变量提升
总结: 函数提升比变量提升优先级高! 词法分析 词法分析方法: js运行前有一个类似编译的过程即词法分析,词法分析主要有三个步骤: 分析参数 再分析变量的声明 分析函数说明 具体步骤如下: 函数在运行 ...
- MySQL 存储过程 定时任务
drop procedure if exists move_track_data; delimiter // create procedure move_track_data() begin ; st ...
- CSS3 圆角制作的消息提示图标
CSS3 圆角制作的消息提示图标,如果你想知道它是如何被开发的,请点击连接查看.http://www.gbtags.com/gb/rtreplayerpreview/142.htm
- .net使用cefsharp开源库开发chrome浏览器(一)
一.背景 公司现在使用.NET技术,有web组.有winfrom桌面组.而这两组团队业务部分有分多相似的地方,使用的数据源也是相同的,以此造成两组团队之间做了很多彼此都已经做过的工作. 有什么办法使得 ...
- paip.字符串操作uapi java php python总结..
paip.字符串操作uapi java php python总结.. java and php 相互转换.. import strUtil>>> requiry(strUtil.p ...
- 为什么移动Web应用很慢?
前些日子,看到Herb Sutter在自己的博客中推荐了一篇文章<Why mobile web apps are slow>,在推荐里他这样写道: “I don’t often link ...
- C#中使用委托、接口、匿名方法、泛型委托实现加减乘除算法
使用C#实现加减乘除算法经常被用作新手练习.本篇来分别体验通过委托.接口.匿名方法.泛型委托来实现. 使用委托实现 加减乘除拥有相同的参数个数.类型和返回类型,首先想到了使用委托实现. //创建一个委 ...
- Diameter消息应用层路由
1. 创建和发送Request消息: 1) 产生一个Request消息时,必须遵守下列规则: · 设置头部的Command code: · 设置头部的 'R' 位: · 设置头部的End-to-End ...
- 统一回复《怎么学JavaScript?》
作者:小不了链接:https://zhuanlan.zhihu.com/p/23265155来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 鉴于时不时,有同学私信问我( ...