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

4 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

Unknown said...

i ,

I want to create a Menu Control in asp.net, which is placed in the left pane of my UI Screen.

I need this menu control with Collapsible and Expand Menu feature, That is,


Main Menu-1
Sub Menu-1
Sub Menu-2
Main Menu-2
Sub Menu-1
Sub Menu-2

From Above Shown data, When I click 'Main Menu-1', its child items 'Sub Menu-1' & 'Sub Menu-2' should expand, If I click 'Main Menu-2' it should expand its child items and 'Main Menu-1' should be collapsed.

That is, Similarly to Ajax:Accordian Control.

With this menu control, i need to show/hide some of the Menu Items based on User Roles, Say for Example, Executive Role Can have access to only Main Menu-1 and Admin can have access to all Menu Items.

Can you Please, suggest me a better idea to do this.

Thanks in advance.
Dineshkumar Ramakrishnan.

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.