Search Results

Search found 5 results on 1 pages for 'bigb'.

Page 1/1 | 1 

  • Custom ASPNetMembership FailureInformation always null, OnValidatingPassword issue

    - by bigb
    As stated here http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.onvalidatingpassword.aspx "When the ValidatingPassword event has completed, the properties of the ValidatePasswordEventArgs object supplied as the e parameter can be examined to determine whether the current action should be canceled and if a particular Exception, stored in the FailureInformation property, should be thrown." Here is some details/code which really shows why FailureInformation shouldn't be always null http://forums.asp.net/t/991002.aspx if any password security conditions not matched. According with my Membership settings i should get an exception that password does not match password security conditions, but it is not happened. Then i did try to debug System.Web.ApplicationServices.dll(in .NET 4.0 System.Web.Security located here) Framework Code to see whats really happens there, but i cant step into this assembly, may be because of this [TypeForwardedFrom("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")] public abstract class MembershipProvider : ProviderBase Easily i may step into any another .NET 4.0 assembly, but in this one not. I did check, symbols for System.Web.ApplicationServices.dll loaded. Now i have only one idea how ti fix it - to override method OnValidatingPassword(ValidatePasswordEventArgs e). Thats my story. May be some one may help: 1) Any ideas why OnValidatingPassword not working? 2) Any ideas how to step into it?

    Read the article

  • Inner join and outer join options in Entity Framework 4.0

    - by bigb
    I am using EF 4.0 and I need to implement query with one inner join and with N outer joins I started to implement this using different approaches but get into trouble at some point. Here is two examples how I started of doing this using ObjectQuery<'T' and Linq to Entity 1)Using ObjectQuery<'T' I implement flexible outer join but I don't know how to perform inner join with entity Rules in that case (by default Include("Rules") doing outer join, but i need to inner join by Id). public static IEnumerable<Race> GetRace(List<string> includes, DateTime date) { IRepository repository = new Repository(new BEntities()); ObjectQuery<Race> result = (ObjectQuery<Race>)repository.AsQueryable<Race>(); //perform outer joins with related entities if (includes != null) foreach (string include in includes) result = result.Include(include); //here i need inner join insteard of default outer join result = result.Include("Rules"); return result.ToList(); } 2)Using Linq To Entity I need to have kind of outer join(somethin like in GetRace()) where i may pass a List with entities to include) and also i need to perform correct inner join with entity Rules public static IEnumerable<Race> GetRace2(List<string> includes, DateTime date) { IRepository repository = new Repository(new BEntities()); IEnumerable<Race> result = from o in repository.AsQueryable<Race>() from b in o.RaceBetRules select new { o }); //I need here: // 1. to perform the same way inner joins with related entities like with ObjectQuery above //here i getting List<AnonymousType> which i cant cast to //IEnumerable<Race> when i did try to cast like //(IEnumerable<Race>)result.ToList(); i did get error: //Unable to cast object of type //'System.Collections.Generic.List`1[<>f__AnonymousType0`1[BetsTipster.Entity.Tip.Types.Race]]' //to type //'System.Collections.Generic.IEnumerable`1[BetsTipster.Entity.Tip.Types.Race]'. return result.ToList(); } May be someone have some ideas about that.

    Read the article

  • Int PK inner join Vs Guid PK inner Join on SQL Server. Execution plan.

    - by bigb
    I just did some testing for Int PK join Vs Guid PK. Tables structure and number of records looking like that: Performance of CRUD operations using EF4 are pretty similar in both cases. As we know Int PK has better performance rather than strings. So SQL server execution plan with INNER JOINS are pretty different Here is an execution plan. As i understand according with execution plan from attached image Int join has better performance because it is taking less resources for Clustered index scan and it is go in two ways, am i right? May be some one may explain this execution plan in more details?

    Read the article

  • IList<T> vs IEnumerable<T>. What is more efficient IList<T> or IEnumerable<T>

    - by bigb
    What is more efficient way to make methods return IList<T> or IEnumerable<T>? IEnumerable<T> it is immutable collection but IList<T> mutable and contain a lot of useful methods and properties. To cast IList<T> to IEnumerable<T> it is just reference copy: IList<T> l = new List<T>(); IEnumerable<T> e = l; To cast IEnumerable<T> to List<T> we need to iterate each element or to call ToList() method: IEnumerable<T>.ToList(); or may pass IEnumerable<T> to List<T> constructor which doing the same iteration somewhere within its constructor. List<T> l = new List<T>(e); Which cases you think is more efficient? Which you prefer more in your practice?

    Read the article

  • EF 4.0 Guid or Int as A primary Key

    - by bigb
    I am Implementing custom ASPNetMembership using EF 4.0 Is there any reason why i should use Guid as a primary key in User tables? As far as i know Int as a PK on SQL Server more performanced than strings. And Int is easier to iterate. Also, for security purpose if i need to pass this it id somewhere in url i may encrypt it somehow and pass it like a strings with no probs. But if i want to use auto generated Guid on SQL Server side using EF 4.0 i need to do this trick http://leedumond.com/blog/using-a-guid-as-an-entitykey-in-entity-framework-4/ I can't see any cases why i should use Guid as PK, may be only one if system going to have millions ans millions users, but also, theoretically, Guid could be duplicated sometime isn't so? Anyway Int32 size is 2,147.483.647 it is pretty much even for very-very big system, but if this number is still not enough I may go with Int64, in that cases I may have 9,223.372.036.854.775.807 rows. Pretty much huh? From another hand, M$ using Guids as PK in their ASPNetMembership implementation. [aspnetdb].[aspnet_Users] - PK UserId Type uniqueidentifier, should be some reasons/explanation why the did it?! May be some one has any ideas/experience about that?

    Read the article

1