Spring.Net 问题求解

shuergogo 2011-06-07 10:26:39

public AllManagerFactory ManagerFactory
{
get
{
var webApplicationContext =
ContextRegistry.GetContext() as WebApplicationContext;
AllManagerFactory manager =
webApplicationContext.GetObject("ManagerFactory") as AllManagerFactory;

return manager;
}
}


Resource handler for the 'web' protocol is not defined.
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.UriFormatException: Resource handler for the 'web' protocol is not defined.

源错误:

行 14: get
行 15: {
行 16: var webApplicationContext =
行 17: ContextRegistry.GetContext() as WebApplicationContext;
行 18: AllManagerFactory manager =
UriFormatException: Resource handler for the 'web' protocol is not defined.]
Spring.Core.IO.ConfigurableResourceLoader.GetResource(String resourceName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\IO\ConfigurableResourceLoader.cs:146
Spring.Objects.Factory.Support.AbstractObjectDefinitionReader.LoadObjectDefinitions(String location) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectDefinitionReader.cs:218


用VS2010自带的IIS使用没任何问题
部署上去就出错,哪位大侠遇到过这种问题.
...全文
527 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
shuergogo 2011-06-07
  • 打赏
  • 举报
回复
非常感谢 truecoffeefox
修改了配置文件 就解决了
truecoffeefox 2011-06-07
  • 打赏
  • 举报
回复
是iis7吧
应用程序池,要么是经典模式
要么用这样的方式配置
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" />
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate30" />
</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>
truecoffeefox 2011-06-07
  • 打赏
  • 举报
回复
spring看代码没用亮亮配置
shuergogo 2011-06-07
  • 打赏
  • 举报
回复
是的 本机IIS
子夜__ 2011-06-07
  • 打赏
  • 举报
回复
部署本机的IIS上吗?

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧