Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user

Oct 16, 2011

Introduction:

Here I will explain how to solve the problem
The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user during personalization of webpart in application.

Description:

During the time of webpart personalization of application I got error like


The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
To solve above error I followed below steps
For webparts personalization a user should be authenticated either by Windows authentication or Forms authentication. Just follow these simple steps for Forms authentication.

In Web.config just insert

<authentication mode="forms" />
<authorization>
<allow users=* />
<deny users=? />
</authorization>
Now at loginn page write the following code 

MembershipUser mUser = Membership.GetUser(this.UserNameTextBox.Text);
if (mUser == null)
{
mUser = Membership.CreateUser(this.UserNameTextBox.Text, “3rdp@rty”, “xyz@tdsc.com”, “no question”, “no answer”, true, out msStatus);
}
FormsAuthentication.RedirectFromLoginPage(mUser.UserName, false);
Happy Coding………

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

3 comments :

Anonymous said...

plz provide More Example of webparts..

Anonymous said...

great

Unknown said...

Hi suresh,

This is Gangadhar,i need a help from you. I need to display ppt slides in my .net application can you help me out in this. If you have any sample codes please send it to my Mail Id gdhar88bc@gmail.com....

Thanks in advance,
Gangadhar

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.