コード例 #1
0
ファイル: Global.asax.cs プロジェクト: ashtonangel7/Tweets
 protected void Application_BeginRequest(object sender, EventArgs e)
 {
     if (!StaticResourcesConfig.IsInitialized)
     {
         try
         {
             StaticResourcesConfig.RegisterStaticResources(Settings.Default.UserFilePath,
                                                           Settings.Default.TweetFilePath);
         }
         catch (Exception ex)
         {
             HttpContext.Current.Items["Error"] = ex;
             HttpContext.Current.RewritePath("~/Error");
         }
     }
 }
コード例 #2
0
ファイル: Global.asax.cs プロジェクト: ashtonangel7/Tweets
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            try
            {
                StaticResourcesConfig.RegisterStaticResources(Settings.Default.UserFilePath,
                                                              Settings.Default.TweetFilePath);
            }
            catch (Exception /*ex*/)
            {
                //TODO: Log exception.
            }
        }