By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,677 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,677 IT Pros & Developers. It's quick & easy.

WebParts Question

P: n/a
I have an INTRAnet site that need to add some content management
feature. And I thought that I can use the WebParts.

Since this is an internal site, I use Windows authentication so the use
don't have to logon. But for authorization, I uses an EXISTING
corporate database (nothing to do with aspnet_Membership etc.). In
short, I created GenericIdentity and GenericPrincipal for the
application so the security part works well.

Now my trouble is how can I integrate WebParts personalization.
Following are something with the EXISTING db.
1. Applications table - It contains all application the company
developed. Not just web applications.
2. Users table - User information with the NT login as the ID.
3. ApplicationUsers (AppID, UserID) - Users who can use the
application. (Not exactly but I made up this way for simple
illustration)

My Question is how can I do the WebParts Personalization.

Any suggestion?

Thanks

John

Dec 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You can just inherit the MembershipProvider class and then override the methods
you need. For those methods that you do not need or plan to use throw a
NotSupportedException. As far as the Personalization you can use the ASP stuff
right out of the box. To create a SQLMembershipProvider see aspnet_regsql.exe
utility then just use the pieces you need.
Imports Microsoft.VisualBasic
Imports System.Web.Security

Public Class YourNewMembershipProvider : Inherits MembershipProvider

Public Overrides Function GetNumberOfUsersOnline() As Integer
Throw New NotSupportedException
End Function

Public Overrides Function ValidateUser(ByVal username As String, ByVal
password As String) As Boolean
'Your Validation Code Here.

End Function
End Class
On 8 Dec 2006 14:31:54 -0800, "Q. John Chen" <qj****@email.comwrote:
>I have an INTRAnet site that need to add some content management
feature. And I thought that I can use the WebParts.

Since this is an internal site, I use Windows authentication so the use
don't have to logon. But for authorization, I uses an EXISTING
corporate database (nothing to do with aspnet_Membership etc.). In
short, I created GenericIdentity and GenericPrincipal for the
application so the security part works well.

Now my trouble is how can I integrate WebParts personalization.
Following are something with the EXISTING db.
1. Applications table - It contains all application the company
developed. Not just web applications.
2. Users table - User information with the NT login as the ID.
3. ApplicationUsers (AppID, UserID) - Users who can use the
application. (Not exactly but I made up this way for simple
illustration)

My Question is how can I do the WebParts Personalization.

Any suggestion?

Thanks

John
Dec 8 '06 #2

P: n/a
I am using Windows Authentication. All the membership stuff is out of
the context.

Let me have another question. Can I do webParts personalization with
Windows Authentication?

Thanks

John

Jay Pondy wrote:
You can just inherit the MembershipProvider class and then override the methods
you need. For those methods that you do not need or plan to use throw a
NotSupportedException. As far as the Personalization you can use the ASP stuff
right out of the box. To create a SQLMembershipProvider see aspnet_regsql.exe
utility then just use the pieces you need.
Imports Microsoft.VisualBasic
Imports System.Web.Security

Public Class YourNewMembershipProvider : Inherits MembershipProvider

Public Overrides Function GetNumberOfUsersOnline() As Integer
Throw New NotSupportedException
End Function

Public Overrides Function ValidateUser(ByVal username As String, ByVal
password As String) As Boolean
'Your Validation Code Here.

End Function
End Class
On 8 Dec 2006 14:31:54 -0800, "Q. John Chen" <qj****@email.comwrote:
I have an INTRAnet site that need to add some content management
feature. And I thought that I can use the WebParts.

Since this is an internal site, I use Windows authentication so the use
don't have to logon. But for authorization, I uses an EXISTING
corporate database (nothing to do with aspnet_Membership etc.). In
short, I created GenericIdentity and GenericPrincipal for the
application so the security part works well.

Now my trouble is how can I integrate WebParts personalization.
Following are something with the EXISTING db.
1. Applications table - It contains all application the company
developed. Not just web applications.
2. Users table - User information with the NT login as the ID.
3. ApplicationUsers (AppID, UserID) - Users who can use the
application. (Not exactly but I made up this way for simple
illustration)

My Question is how can I do the WebParts Personalization.

Any suggestion?

Thanks

John
Dec 10 '06 #3

P: n/a
I should do some test before I post previous one.

Yes, I can do WebParts Personalization using Windows Authentication. It
will still create set of aspnet_ tables except there is no data in
membership. It will create an entry in aspnet_Users with my NT login as
the UserName.

Now I have another issue:
I also use AJAX extension and as long as there is a ScriptManager.
The page alway crashes when I (as the user) try to personalize the page
(e.g. Minimizing the part from the manual) even the personalized info
is saved. Any clue on this?

Thanks

John
Q. John Chen wrote:
I am using Windows Authentication. All the membership stuff is out of
the context.

Let me have another question. Can I do webParts personalization with
Windows Authentication?

Thanks

John

Jay Pondy wrote:
You can just inherit the MembershipProvider class and then override the methods
you need. For those methods that you do not need or plan to use throw a
NotSupportedException. As far as the Personalization you can use the ASP stuff
right out of the box. To create a SQLMembershipProvider see aspnet_regsql.exe
utility then just use the pieces you need.
Imports Microsoft.VisualBasic
Imports System.Web.Security

Public Class YourNewMembershipProvider : Inherits MembershipProvider

Public Overrides Function GetNumberOfUsersOnline() As Integer
Throw New NotSupportedException
End Function

Public Overrides Function ValidateUser(ByVal username As String, ByVal
password As String) As Boolean
'Your Validation Code Here.

End Function
End Class
On 8 Dec 2006 14:31:54 -0800, "Q. John Chen" <qj****@email.comwrote:
>I have an INTRAnet site that need to add some content management
>feature. And I thought that I can use the WebParts.
>
>Since this is an internal site, I use Windows authentication so the use
>don't have to logon. But for authorization, I uses an EXISTING
>corporate database (nothing to do with aspnet_Membership etc.). In
>short, I created GenericIdentity and GenericPrincipal for the
>application so the security part works well.
>
>Now my trouble is how can I integrate WebParts personalization.
>Following are something with the EXISTING db.
>1. Applications table - It contains all application the company
>developed. Not just web applications.
>2. Users table - User information with the NT login as the ID.
>3. ApplicationUsers (AppID, UserID) - Users who can use the
>application. (Not exactly but I made up this way for simple
>illustration)
>
>My Question is how can I do the WebParts Personalization.
>
>Any suggestion?
>
>Thanks
>
>John
Dec 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.