why app_start start

 

 

 

Add following code for your class:

[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(WeChatSchools.App_Start.MyStartPoint), "Initialize")]

 

 

ex:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(WeChatSchools.App_Start.MyStartPoint), "Initialize")]

namespace WeChatSchools.App_Start
{
    public class MyStartPoint 
    {

        public static void Initialize()
        {
            Start();
        }


        public static void Start()
        {
            BLL.Helpers.EntityHelper.Log("start point");
        }

    }
}

 

posted @ 2014-02-26 13:04  zyip  阅读(265)  评论(0编辑  收藏  举报