English 中文(简体)
会议ScopeWeb Module在哪里?
原标题:Where is SessionScopeWebModule?

我试图在我的“世界儿童论坛”评估中根据要求设立一个积极的记录网站。 我将这一点列入我的网页:

<httpModules>
      <add
          name="ar.sessionscope"
          type="Castle.ActiveRecord.Framework.SessionScopeWebModule, Castle.ActiveRecord" />
    </httpModules>

这是《古典》建议的解决办法:

rel=“nofollow”http://www.城堡project.org/activerecord/documentation/trunk/usersguide/web.html

然而,这给我带来了错误:

Could not load type Castle.ActiveRecord.Framework.SessionScopeWebModule from assembly Castle.ActiveRecord .

会议ScopeWeb Module是否搬迁? I m 使用了最新的手工开采金。 NET 4

最佳回答
问题回答

请注意,即使有网络,下列工作仍有效。 混淆的解决办法不是:

public void Application_BeginRequest(object sender, EventArgs e)
        {
            HttpContext.Current.Items.Add("ar.sessionscope", new SessionScope());
        }

        public void Application_EndRequest(object sender, EventArgs e)
        {
            try
            {
                var scope = HttpContext.Current.Items["ar.sessionscope"] as SessionScope;
                if (scope != null)
                    scope.Dispose();
            }
            catch (Exception ex)
            {
                HttpContext.Current.Trace.Warn("Error", "EndRequest: " + ex.Message, ex);
            }
        }




相关问题
Codeigniter WHERE on "AS" field

I have a query where I need to modify the selected data and I want to limit my results of that data. For instance: SELECT table_id, radians( 25 ) AS rad FROM test_table WHERE rad < 5 ORDER BY rad ...

Problem find joined table in rails

I have model represent association rule (Body => Head) def Item has_many :heads has_many :bodies ... end def Rule has_many :heads has_many :bodies ... end def Body belongs_to :item belongs_to :rule ...

FreeTDS Bad token from the server (SQL Server)

Today we had a lot more activity than normal between our Ruby on Rails application and our remote legacy SQL Server 2005 database, and we started getting the error below intermittently. What is is? ...

Castle ActiveRecord: one-to-one

While playing around with one-to-one associations in castle activerecord I stumbled upon the following problem: I m trying to model a one-to-one relationship (user-userprofile in this case). I ...

Sending email updates: model or observer?

I have an Event model, which stores an event feed for each user. I also need to email the updates to users which have enabled email notifications in their profile. From an architectural point of view,...

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

热门标签