Mercurial > pub > bltoolkit
view Demo/Asp.Net/Web/Global.asax @ 3:1ef98bd70424
!bug 100 +3h
Исправление проблемы BLToolkit + mono 3.4
author | cin |
---|---|
date | Fri, 22 Aug 2014 17:34:46 +0400 |
parents | f990fcb411a9 |
children |
line wrap: on
line source
<%@ Application Language="C#" %> <%@ Import Namespace="System.Diagnostics" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="PetShop.ObjectModel" %> <script RunAt="server"> // Carry over profile property values from an anonymous to an authenticated state. // void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e) { ProfileCommon anonProfile = Profile.GetProfile(e.AnonymousID); // Merge anonymous shopping cart items to the authenticated shopping cart items. // foreach (CartItem cartItem in anonProfile.ShoppingCart.Items) Profile.ShoppingCart.Add(cartItem); // Merge anonymous wishlist items to the authenticated wishlist items. // foreach (CartItem cartItem in anonProfile.WishList.Items) Profile.WishList.Add(cartItem); // Clean up anonymous profile. // ProfileManager.DeleteProfile(e.AnonymousID); AnonymousIdentificationModule.ClearAnonymousIdentifier(); // Save profile. // Profile.Save(); } private static string LOG_SOURCE = ConfigurationManager.AppSettings["Event Log Source"]; // If an exception is thrown in the application then log it to an event log. // protected void Application_Error(object sender, EventArgs e) { Exception x = Server.GetLastError().GetBaseException(); EventLog.WriteEntry(LOG_SOURCE, x.ToString(), EventLogEntryType.Error); } </script>