代码之家  ›  专栏  ›  技术社区  ›  Younes

实现URLRewriter.Net会给出一个引用异常

  •  0
  • Younes  · 技术社区  · 14 年前

    按照指示操作后 here

    如何用UrlRewriter.Net实现URL重写?

    我收到一个引用异常-->


    “/”应用程序中的服务器错误。

    对象引用未设置为对象的实例。 [空引用异常:对象引用未设置为对象的实例。] Intelligencia.UrlRewriter.Configuration.RewriterConfiguration.Load()+109 Intelligencia.UrlRewriter.Configuration.RewriterConfiguration.get_Current()+216 Intelligencia.UrlRewriter.RewriterHttpModule..cctor()+47

    [类型初始化异常:“Intelligencia.UrlRewriter.RewriterHttpModule”的类型初始化器引发异常。]

    [目标职业异常:调用的目标引发了异常。] System.RuntimeTypeHandle.CreateInstance(RuntimeType type,Boolean publicOnly,Boolean noCheck,Boolean&canBeCached,RuntimeMethodHandle&ctor,Boolean&bNeedSecurityCheck)+0 System.RuntimeType.CreateInstanceSlow(布尔publicOnly,布尔fillCache)+86 System.RuntimeType.CreateInstanceImpl(布尔publicOnly,布尔skipVisibilityChecks,布尔fillCache)+230 System.Activator.CreateInstance(类型类型,布尔非公共)+67 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr、Binder Binder、Object[]args、CultureInfo culture、Object[]activationAttributes)+1051 System.Activator.CreateInstance(类型类型,BindingFlags bindingAttr,绑定器绑定器,对象[]参数,文化信息区域性,对象[]activationAttributes)+111 System.Web.Configuration.Common.moduleEntry.Create()+39 System.Web.Configuration.HttpModulesSection.CreateModules()+164 System.Web.HttpApplication.InitModules()+28 System.Web.HttpApplication.InitInternal(HttpContext上下文,HttpApplication state,MethodInfo[]处理程序)+729 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext上下文)+298 System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext上下文)+107

    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)+289

    我添加了标记,因为我读到,当web.config中没有指定“重写器”部分时,大多数情况下都会弹出此错误。 那么现在会有什么问题呢? 我正试图在IIS 6.0(windows 2003)服务器上运行此程序。

    1 回复  |  直到 14 年前
        1
  •  1
  •   Younes    14 年前

    此模块将无法在IIS 6.0上运行,因为URLRewrite模块2.0仅作为扩展可用于IIS 7.0。