Monday, September 12, 2005

ASP.Net 2.0 membership error - Create new user

At some point you must have used the "Administer Website" option in order to create a user, and right when u enter the details and click to create a user, VS throws this error :
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider. GetWebAdminMembershipProviderHelperProperty(String propertyName) at System.Web.Administration.WebAdminMembershipProvider. get_MinRequiredNonAlphanumericCharacters() at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard. OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable. OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI. IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page. RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Looks familiar?
This is a problem, but not exactly what the error describes...
For a quick fix just make sure that you use a password meeting the requirements of the password settings. For the default password settings, a password like "RohanT!" would suffice... There you go! Now you can create users successfully.... :)
P.S : You also can also change the password settings if you dont wanna type the special character everytime ;)
Cheers!

Referral Link

TechED Asia 2005 in Singapore - Awesome!

TechED Asia 2005 happened right here in Singapore from the 24th of August to the 26th of August 2005! A great experience for developers and IT professionals here in Singapore and those who came in to join the fun!
There has been a big hype about TechED finally being organized here in Singapore for the first time, (we definitely hope, not for the last time!) for quite long. And I must say - the turn up rate was pretty good compared to the rest of the MSDN meets.
The TechED Asia 2005 was a dream-come-true for many developers and IT professionals in Singapore, who were unable to attend the TechED’s held in other parts of Asia over the past years.
Free passes went off like hot cakes to some lucky ones but the rest did not hesitate to pay for the TechED 3 day passes. Microsoft helped by reducing the prices and providing concessions for members of various User Groups.
Obviously, a lot of attention was paid to the upcoming Microsoft technologies - ASP.NET 2.0, SQL Server 2005, Visual Studio 2005, Windows Vista and .Net 2.0 in general just to name a few. The presenters did a great job of promoting these technologies and injecting the developers with great confidence to use them!
Apart from TechED, Microsoft also helped arrange the User Group Confluence; which was a joint User Group meeting of three of the Singapore’s User Groups (Singapore’s .Net UG, Singapore’s SQL Server UG and Singapore’s Windows UG). This User Group meeting was held during the after hours of TechED. Steve Riley, Rick Samona and Jay Roxe presented in this User Group Confluence.
Microsoft also organized “Meet the experts” and “discussions” sessions where the experts were ready to answer any queries you might have – a brilliant idea indeed. Besides from being the dream of developers, it was definitely a massive help to many of them. After all, how many times do you really get a chance like this?
Event Breakdown:Day 1:Day one covered a lot of technical topics from ASP.NET 2.0 to web-services to VS.NET 2005. Undoubtedly, a heavy concentration of .Net was all around! The developers were quite satisfied by the topics and its deliveries. Given this time, when everyone is anticipating SQL Server 2005 and VS.NET 2005, the .Net 2.0 topics really propelled the enthusiasm amidst the audience.Day 2:Day two went easier on .Net 2.0 technical presentations and the event changed gear to data tracks. Excellent presentations were lined up on database design and performance tuning.Day 3:Now came day three which covered topics like BI and Data Warehouse. But that’s not all; long queues were formed for the Hands-On Labs. Yes, finally time to put everything seen and heard to practice. And of course, who can forget the lunch? Skewed Lamb, fish, sherry chicken, oysters, slurp…
The audience had mixed feelings over the organization. Some felt that the discussions were not in depth enough and that the information provided could easily be found online. But the majority was ok with the depth of topics delivered by the speakers. Quite a few of them also criticized the idea of multiple tracks running parallel which cost them quite a few of the important tracks that they came for, and most importantly – paid for! Well, you gain some, you loose some. But overall, everyone was satisfied with the event organization.
In all, TechED presenters spruced up the interest of the developers regarding the upcoming products like VS.NET 2005, SQL Server 2005, VSTS and the various new tools which are going to be bundled along with them.
Presenters like Steve Riley, Jay Roxe, Jesper Johansson, Rick Samona, Joe Yong, William Tay and many others were the main attraction of the event. The audience made sure that they get their money’s worth by bombarding the speakers with questions after every presentation!
At the end of third day, everyone went home with a lot of goodies in their hands and a lot of new ideas zooming through their minds.

Referral Link

Configure WebParts as a menu in the Masterpage!!

For long time we have been trying to use webparts in our application's menu. Something like what My MSN does. But an interesting observation is that all the web part links to pages that open up on seperate pages. But in our application: webparts are located in the master pages and all the links in the webparts are supposed to open up in the content pages, we have may webparts according to the different modules and each webpart contains serveral links pertaining to that module. So far so good; no probs. But then comes the moving around of webparts. Once the user moves around the webpart menus according to his own convenience, it should stay the same for all pages! But we found out that the webpart only stays the same for the particular aspx page that it was arranged for!! But what we are trying to do is to arrange the menu for all the pages for that particular user!
This kinda seemed impossible to achieve as the webparts are located in the masterpages and the personlization uses URL of the content page as the personlzation key!
So wondering how to achieve this? This is how my colleague got it to work!!!
You need to overwrite "System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider" class with your own custom class. You need to perform a small hack here when you get or set the path. You can now put the web part in the master pages, drag, minimize, etc and when you navigate to a different page, the same arragement of webparts will be displayed. You just need to ensure the web.config is pointing to this custom class for personalization.
Web.Config:
Custom SqlPersonalization:public class CustomSqlPersonalizationProvider : SqlPersonalizationProvider{
private string GetPath{get{return "default.aspx";}}
protected override void LoadPersonalizationBlobs(WebPartManager webPartManager, string path, string userName, ref byte[] sharedDataBlob, ref byte[] userDataBlob){base.LoadPersonalizationBlobs(webPartManager, this.GetPath, userName, ref sharedDataBlob, ref userDataBlob);}
protected override void SavePersonalizationBlob(WebPartManager webPartManager, string path, string userName, byte[] dataBlob){base.SavePersonalizationBlob(webPartManager, this.GetPath, userName, dataBlob);}
protected override void ResetPersonalizationBlob(WebPartManager webPartManager, string path, string userName){base.ResetPersonalizationBlob(webPartManager, this.GetPath, userName);}}This solution has also been published in the asp.net forums
Enjoy!

Referral Link

This page is powered by Blogger. Isn't yours?

© Copyright 2005, Rohan Thomas
Disclaimer
This Blog contains findings that are self-explored and expressions that are self-evoked. They are by no meanss representions of my employer's view.