PDA

View Full Version : Personalization in webparts in asp.net(c#)


amolr
10-14-2011, 02:36 AM
We are facing problem while implementing the webparts in our web application. The concern application is working fine on local host but having problem while running it on server.

we have used following namespaces :-

Microsoft.Web.Preview.dll and Sample.Web.UI.WebParts.dll

And

our conection string is :-


<add name="LocalSqlServer" connectionString="Data Source=servername;Initial Catalog=aspnetdb;User ID=username;Password=Password;" providerName="System.Data.SqlClient" />


we are getting error message like this :-

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



Please kindly help us if some one knows solution.

Thanks.

keikoraca
10-14-2011, 09:54 AM
Do you have a URL we might be able to look at and see the entire error message?

jayc
10-14-2011, 12:57 PM
make sure the connection string reference the live database and the scope is shared for all users

<webParts>
<personalization>
<authorization>
<allow users="[Replace the text and brackets with a user name or group.]" roles="admin" verbs="enterSharedScope" />
</authorization>
</personalization>
</webParts>

see the MSDN article here
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.webpartmanager. personalization.aspx