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
相關文章
- jedis異常:Could not get a resource from the pool
- You can‘t specify target table ‘Person‘ for update in FROM clause
- mysql中You can’t specify target table for update in FROM clMySql
- multiprocessing pool AttributeError: Can't get attribute 'func'Error
- redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolRedisclientException
- 【MySQL】Can't get stat of './mysql/slow_log.CSV' (Errcode: 2)MySql
- MySQL錯誤1042-Can't get hostname for your addressMySql
- java.util.MissingResourceException: Can't find resource for bundle oracle.sysman.db.rsc.LoginResourcJavaExceptionOracle
- Proxy handler.get() 方法
- SOAP(Simple Object Access Protocol) (轉)ObjectProtocol
- eclise 部署web工程報 There are no resources that can be added or removed from the server.WebREMServer
- mysql啟動時報錯Can't read from messagefile errmsg.sysMySql
- js: get event handler bound to the elementJS
- rman: can't open target
- MySQL錯誤1042-Can't get hostname for your address解決方法MySql
- Get data style from ExcelExcel
- get_data_from_yml
- 資源路由resource index 不是get路由Index
- mail can't send title on SolarisAI
- MySQL 5.7向表匯入資料包錯"ERROR 13 (HY000): Can't get stat of"MySqlError
- mac提交svn提示CHECKOUT can only be performed on a version resourceMacORM
- datastage7.5 can't view data?ASTView
- get_object_vars 學習Object
- "_dns_free_resource_record", referenced from:問題DNS
- OSError: [E050] Can‘t find model ‘en_core_web_sm‘. It doesn‘t seem to be a shortcut link, a Python pErrorWebPython
- Mysql update in報錯 [Err] 1093 - You can't specify target table 'company_info' for update in FROM clauseMySql
- Get your Windows product key from a scriptWindows
- Cannot decode object of class Employee for key (NS.object.0); the class may be defined in source cod...Object
- TypeError: can‘t concat str to bytesError
- Mongoose can't update timestampGo
- [ERROR] Can't open the mysql.plugin tableErrorMySqlPlugin
- mysql遇到Variable can’t be set to the value of ‘NULL’MySqlNull
- Oracle dbconsole can't startOracle
- mysql can't start dues to the disk space is fullMySql
- Swift代理報錯Optional can only be applied to members of an @objc protocolSwiftAPPOBJProtocol
- How can I get the followling results?
- deleted object would be re-saved by cascade (remove deleted object from associatdeleteObjectREM
- How to get ORACLE_HOME from data dictionaryOracle