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

Friday, August 19, 2005

The truth about USELESS people? Hacker Attitude?

Paul Glen wrote The truth about "useless" people, which is very interesting. Paul Glen, as you might know is the author of the award-winning book "Leading Geeks: How to Manage and Lead People Who Deliver Technology" (Jossey Bass Pfeiffer, 2003) and Principal of C2 Consulting.
With all due respect to Paul, I'd like to add a little something about The truth about these "useless" people.
Paul clearly mentions more than one time, that these "useless" people are intelligent and talented! They are good at technical analysis, documentation and strategy, but unfortunately not at delivery!
Paul catagorizes these people under "people who are seemingly paralyzed by ambiguity and are incapable of moving forward until every possible question has been answered".
From my experience, I would like to induce another notion here and catagorize these people under "Hackers" (not "Crackers")!
Now before you start running about screaming, perhaps you should take a look at the Hacker FAQ which talks about managing Hackers. Also, check out How To Become A Hacker!
All those who are planning to sue me for trying to make hackers out of people, pls do read the above mentioned papers which are very possitive and helpfull in understanding people.
Note : I didn't say Hackers are useless, I am merely suggesting catagorizing those "useless" people Paul talks about under the category of "Hackers"!
Why do I catagorize those "useless" people under Hackers?
Consider this : These useless people are undoubtedly talented, but they are unable to deliver! Why? Perhaps because their energy is not focused to the right direction?
Most of the students who like programming want to start off as programmers. But for most of them, "too much" programming at some point becomes mundane! They are so good at programming by this stage that programming does not pose the same challenge to them as it used to in the begining. They need more! More challenge!Consider the Hacker Attitude mentioned in How To Become A Hacker :1. The world is full of fascinating problems waiting to be solved.2. No problem should ever have to be solved twice.3. Boredom and drudgery are evil.4. Freedom is good.5. Attitude is no substitute for competence.
Clearly the third point takes effect - Programming becomes 'Boredom' from 'Challenge'!
Similary consider EmployeeA engaged in a project yeilds excellent results in analysis and stratergy, but when he is required to do coding, his performance suddenly goes slump!
So what's the solution?
Enter 'Project Manager'!
Paul mentioned the importance of Project Managers and I totally agree.
As you can see in the above scenario, the Project Manger should be able to see this performance slump of EmployeeA and assign him something that he will focus on with enthusiasm thus, boosting his performance. After all, as most of you would agree, a good Project Manager manages people well!
I've been in a similar scenario in the begining of my career, the CTO is happy with my performance, all projects sped up, I introduced time saving methodologies and framework, now the whole company is settling down and just doin projects, so my next task? Programming! And there is comes, drudgery! My head started screaming "Lord, Save Me!". I even bought this upto the CTO, but the company at this point simply had nothing to be done, but programming for the numerous projects running simultaneously!What happened? I quit!It was an obvious choice, either I quit, or suffer the drudgery... 'Have Road, Will Travel'...
Another question raised would be "Who will do the programming then?". Well, there are always people around who love programming, if not there is Mr. Project Manager,to provide incentives and apply other stratergies to make people do programming productively! :)
Any comments appreciated...

Sunday, August 14, 2005

IE6 Vs IE7

An interesting observation :
While I was posting my previous blog entry, I realised something, the formatting toolbars provided by Community Server are blocked by IE7! Cant bold, cant hyperlink!!
The whole toolbar of Community Server is gone!
Anyone else has a similar experience? Care to share?
Cheers!

Wednesday, August 10, 2005

Try IE 7 - Totally Risk Free!!

Finally, an excellent way for those who wanna try IE7 without messing with any of the IE6 current settings.For those who want quick instructions take a look at Jon Galloway's post and for those who want more technical details and wanna try other versions of IE other than 7, check out the entry by Joe Maddalone!
So hurry, what are u waiting for? :)

Tuesday, August 02, 2005

Unit Testing - You should read this!

LoneStar is now somewhat in a visible shape, wobbling, but atleast it has a shape... Yes, its stucture still changes for the better, but again, it still has a shape...
I am looking into making some unit testing models for LoneStar, Yea we all have done unit testings here and there, implemented it maybe, or just wrote more tests into the test files...
But i came across this valuable post by Brian Button, followed by another one from Roy Osherove.
Very valuable indeed...
I have seen the test files written in the project files when i was working with Accenture, and trust me, ppl working in that project really need to read the above posts!
In accenture, we used N-Unit for testing purposes, but after using VSTS, the project created by VSTS looks nicer and easier to use and maintain...
But since we have moved to VS.NET 2005 Professional Edtion from VSTS, I'm planning to follow the test project pattern generated by VSTS to make testing models for LoneStar..

Saturday, July 30, 2005

My Blue sky holiday - KL (Malaysia) trip

Just came back from a _small_ vacation in KL, Malaysia with friends. We drove all the way to KL and drove back... phew...
Nothing much to do there except to eat and drive around..
Please be carefull driving in KL, all the women seem to be F1 trained!
Lovely place, except the killer traffic!
And The Pertronas looks _amazing_ in the night time, so beautifully lit up... worth a second trip...

Tuesday, July 19, 2005

VS.NET 2005 and VSS 2005 July CTP

VS.NET 2005 and VSS 2005 July CTP were released on 12th of July. Now upgrading my version from June CTP to July CTP.June CTP has some major changes over its predecessor including the Membership API changes which was pretty scary to fix. But we got all the api differences fixed and now anticipating what changes will the July CTP bring.. Hopefully nothing that breaks the code...
Anyone working with July CTP yet?

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.