Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何在Orchard中注册可以访问DefaultContentManager(或等效工具)的IHttpModule_Asp.net_Asp.net Mvc_Asp.net Mvc 3_Autofac_Orchardcms - Fatal编程技术网

Asp.net 如何在Orchard中注册可以访问DefaultContentManager(或等效工具)的IHttpModule

Asp.net 如何在Orchard中注册可以访问DefaultContentManager(或等效工具)的IHttpModule,asp.net,asp.net-mvc,asp.net-mvc-3,autofac,orchardcms,Asp.net,Asp.net Mvc,Asp.net Mvc 3,Autofac,Orchardcms,我一直在尝试为orchard编写一些东西,它将检查所有表示google ajax爬网请求的“\u转义\u片段”,并将执行301重定向到需要使用DefaultContentManager查找的正确资源 在上一个项目中,我通过扩展IHttpModule并使用 <httpModules> <add name="GoogleRedirect" type="MyNameSpace.GoogleRedirect"/> </httpModules> 不,我认为这是不可能的

我一直在尝试为orchard编写一些东西,它将检查所有表示google ajax爬网请求的“\u转义\u片段”,并将执行301重定向到需要使用
DefaultContentManager
查找的正确资源

在上一个项目中,我通过扩展
IHttpModule
并使用

<httpModules>
<add name="GoogleRedirect" type="MyNameSpace.GoogleRedirect"/>
</httpModules>

不,我认为这是不可能的。您需要在模块中而不是在过滤器中执行此操作的任何特定原因?

设法使其与过滤器一起工作:)已使用我使用的链接更新了问题
_contentManager = DependencyResolver.Current.GetService<IContentManager>();
codegen theme MyTheme /BasedOn:TheThemeMachine /CreateProject:true /IncludeInSolution:true