467,894 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,894 developers. It's quick & easy.

ASP.NET Membership

Tem
Im making a photo gallery application where users can only see their own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership provider
Can someone points me to the right direction

Thanks

Tem

Dec 27 '07 #1
  • viewed: 1057
Share:
6 Replies
You'll need to create your own custom provider if you wish to manage, not
only the users & roles but also the photo data.

http://www.devx.com/asp/Article/29256


"Tem" <te*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Im making a photo gallery application where users can only see their own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership provider
Can someone points me to the right direction

Thanks

Tem

Dec 27 '07 #2
On 27 Dec, 20:39, "Tem" <tem1...@yahoo.comwrote:
Im making a photo gallery application where users can only see their own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership provider
Can someone points me to the right direction

Thanks

Tem
I'm not sure what you mean by "integrate" but the requirement you
describe could be met by filtering the data table on Membership
username (if that differs from PhotoUser then add an extra column)
which is easily read with the Membership.getuser() function.
Dec 27 '07 #3
Tem
Thanks

If I understand this correctly PhotoUser would store the username of the
user the photo belongs to. Wouldn't this be slow performance wise?
(searching a string)
would it be faster to use UserID uniqueidentifier instead?

"Phil H" <go****@philphall.me.ukwrote in message
news:aa**********************************@e6g2000p rf.googlegroups.com...
On 27 Dec, 20:39, "Tem" <tem1...@yahoo.comwrote:
>Im making a photo gallery application where users can only see their own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership
provider
Can someone points me to the right direction

Thanks

Tem

I'm not sure what you mean by "integrate" but the requirement you
describe could be met by filtering the data table on Membership
username (if that differs from PhotoUser then add an extra column)
which is easily read with the Membership.getuser() function.
Dec 28 '07 #4
Not if you indexed the PhotoUser column.

--
Mohamad Elarabi
MCP, MCTS, MCPD.
"Tem" wrote:
Thanks

If I understand this correctly PhotoUser would store the username of the
user the photo belongs to. Wouldn't this be slow performance wise?
(searching a string)
would it be faster to use UserID uniqueidentifier instead?

"Phil H" <go****@philphall.me.ukwrote in message
news:aa**********************************@e6g2000p rf.googlegroups.com...
On 27 Dec, 20:39, "Tem" <tem1...@yahoo.comwrote:
Im making a photo gallery application where users can only see their own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership
provider
Can someone points me to the right direction

Thanks

Tem
I'm not sure what you mean by "integrate" but the requirement you
describe could be met by filtering the data table on Membership
username (if that differs from PhotoUser then add an extra column)
which is easily read with the Membership.getuser() function.

Dec 28 '07 #5
Tem
how would I do that?

"Mohamad Elarabi [MCPD]" <Mo****************@discussions.microsoft.com>
wrote in message news:58**********************************@microsof t.com...
Not if you indexed the PhotoUser column.

--
Mohamad Elarabi
MCP, MCTS, MCPD.
"Tem" wrote:
>Thanks

If I understand this correctly PhotoUser would store the username of the
user the photo belongs to. Wouldn't this be slow performance wise?
(searching a string)
would it be faster to use UserID uniqueidentifier instead?

"Phil H" <go****@philphall.me.ukwrote in message
news:aa**********************************@e6g2000 prf.googlegroups.com...
On 27 Dec, 20:39, "Tem" <tem1...@yahoo.comwrote:
Im making a photo gallery application where users can only see their
own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership
provider
Can someone points me to the right direction

Thanks

Tem

I'm not sure what you mean by "integrate" but the requirement you
describe could be met by filtering the data table on Membership
username (if that differs from PhotoUser then add an extra column)
which is easily read with the Membership.getuser() function.

Dec 28 '07 #6
To index the PhotoUser column run the following SQL command

CREATE INDEX PhotoUserIndex ON Photos (PhotoUser)

The syntax is

Create Index [IndexName] On [TableName] ([ColumnName])

Imho there isn't much wrong with your current approach, and as far as
efficiency this is just fine. There may be benifits to taking advantage of
..Net membership but if you can't implement it you're just wasting your time.
Put it down on your "to learn" list but my advice is to move on with this
project and start a little test project where you can play around with
membership, roles, authorization, personalization, themes, webparts, etc.
These are all very cool and good to know features of the .Net 2.0 framework.

Good luck.

--
Mohamad Elarabi
MCP, MCTS, MCPD.
"Tem" wrote:
how would I do that?

"Mohamad Elarabi [MCPD]" <Mo****************@discussions.microsoft.com>
wrote in message news:58**********************************@microsof t.com...
Not if you indexed the PhotoUser column.

--
Mohamad Elarabi
MCP, MCTS, MCPD.
"Tem" wrote:
Thanks

If I understand this correctly PhotoUser would store the username of the
user the photo belongs to. Wouldn't this be slow performance wise?
(searching a string)
would it be faster to use UserID uniqueidentifier instead?

"Phil H" <go****@philphall.me.ukwrote in message
news:aa**********************************@e6g2000p rf.googlegroups.com...
On 27 Dec, 20:39, "Tem" <tem1...@yahoo.comwrote:
Im making a photo gallery application where users can only see their
own
photos.
My photos table looks like this
Id, PhotoName, PhotoURL, PhotoUser

I need to know how I can integrate this with ASP.NET's membership
provider
Can someone points me to the right direction

Thanks

Tem

I'm not sure what you mean by "integrate" but the requirement you
describe could be met by filtering the data table on Membership
username (if that differs from PhotoUser then add an extra column)
which is easily read with the Membership.getuser() function.

Dec 30 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Paul Keegstra | last post: by
4 posts views Thread by Pony Tsui | last post: by
3 posts views Thread by ryan.mclean | last post: by
4 posts views Thread by =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post: by
4 posts views Thread by =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post: by
1 post views Thread by =?Utf-8?B?ZVByaW50?= | last post: by
1 post views Thread by =?Utf-8?B?ZVByaW50?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.