Hi,

I am creating an event handler for sharepoint document libraries and am
seeking some advice as to where is the best place to save the username and
password for the impersonated user?



I looked at the web.config file for the virtual server but did not see an
AppSettings section.



Should I store them in the registry? Should I create a separate config
file, if so where do you put that file?



Any thoughts or samples are welcome.



Thanks in advance,

Jeff Richardson

Re: Best place to store passwords? by Bil

Bil
Fri Jan 06 13:28:54 CST 2006

There are tons of ways and places to do it as it's a development issue,
not a SharePoint one however here's one technique that most people use:
http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp

--
Bil Simser
SharePoint MVP, BSc., MCSD
Calgary, Alberta
http://weblogs.asp.net/bsimser



"Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
news:utwj6iuEGHA.3200@tk2msftngp13.phx.gbl:

> Hi,
>
> I am creating an event handler for sharepoint document libraries and am
> seeking some advice as to where is the best place to save the username
> and
> password for the impersonated user?
>
>
>
> I looked at the web.config file for the virtual server but did not see
> an
> AppSettings section.
>
>
>
> Should I store them in the registry? Should I create a separate config
> file, if so where do you put that file?
>
>
>
> Any thoughts or samples are welcome.
>
>
>
> Thanks in advance,
>
> Jeff Richardson


Re: Best place to store passwords? by Jeff

Jeff
Fri Jan 06 13:48:39 CST 2006

Thanks for the information! Is there a better news group for SharePoint
development issues?

"Bil Simser [SPS MVP]" <bsimser@shaw.ca> wrote in message
news:eI41udvEGHA.2704@TK2MSFTNGP15.phx.gbl...
> There are tons of ways and places to do it as it's a development issue,
> not a SharePoint one however here's one technique that most people use:
> http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp
>
> --
> Bil Simser
> SharePoint MVP, BSc., MCSD
> Calgary, Alberta
> http://weblogs.asp.net/bsimser
>
>
>
> "Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
> news:utwj6iuEGHA.3200@tk2msftngp13.phx.gbl:
>
>> Hi,
>>
>> I am creating an event handler for sharepoint document libraries and am
>> seeking some advice as to where is the best place to save the username
>> and
>> password for the impersonated user?
>>
>>
>>
>> I looked at the web.config file for the virtual server but did not see
>> an
>> AppSettings section.
>>
>>
>>
>> Should I store them in the registry? Should I create a separate config
>> file, if so where do you put that file?
>>
>>
>>
>> Any thoughts or samples are welcome.
>>
>>
>>
>> Thanks in advance,
>>
>> Jeff Richardson
>



Re: Best place to store passwords? by Engelbert

Engelbert
Fri Jan 06 13:54:27 CST 2006

SharePoint development issues -

either (WSS) microsoft.public.sharepoint.windowsservices.development or
(SPS) microsoft.public.sharepoint.portalserver.development

But as Bil points out storing passwords is probably not a *SharePoint*
development issue.

Engelbert

"Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
news:u8H7wovEGHA.3612@TK2MSFTNGP11.phx.gbl...
> Thanks for the information! Is there a better news group for SharePoint
> development issues?
>
> "Bil Simser [SPS MVP]" <bsimser@shaw.ca> wrote in message
> news:eI41udvEGHA.2704@TK2MSFTNGP15.phx.gbl...
>> There are tons of ways and places to do it as it's a development issue,
>> not a SharePoint one however here's one technique that most people use:
>> http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp
>>
>> --
>> Bil Simser
>> SharePoint MVP, BSc., MCSD
>> Calgary, Alberta
>> http://weblogs.asp.net/bsimser
>>
>>
>>
>> "Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
>> news:utwj6iuEGHA.3200@tk2msftngp13.phx.gbl:
>>
>>> Hi,
>>>
>>> I am creating an event handler for sharepoint document libraries and am
>>> seeking some advice as to where is the best place to save the username
>>> and
>>> password for the impersonated user?
>>>
>>>
>>>
>>> I looked at the web.config file for the virtual server but did not see
>>> an
>>> AppSettings section.
>>>
>>>
>>>
>>> Should I store them in the registry? Should I create a separate config
>>> file, if so where do you put that file?
>>>
>>>
>>>
>>> Any thoughts or samples are welcome.
>>>
>>>
>>>
>>> Thanks in advance,
>>>
>>> Jeff Richardson
>>
>
>



Re: Best place to store passwords? by Jeff

Jeff
Fri Jan 06 14:32:30 CST 2006

Thank you both for your replies!

According to Microsoft when you are developing an event handler for
SharePoint lists the manipulates the site via the SharePoint APIs, you must
impersonate a user that has enough rights to perform the desired actions.
Microsoft examples include code like this:

void IListEventSink.OnEvent(SPListEvent listEvent)
{

/* TODO: ***** PROVIDE YOUR IMPLEMENTATION HERE ****

Get the credentials (User_Alias, Domain, Password) that this event sink
instance should run as

and initialize the wic object by calling the CreateIdentity method*/

WindowsImpersonationContext wic = CreateIdentity(User_Alias, Domain,
Password).Impersonate();
.
.
.
}

I'm I missing something or is this a task that every SharePoint event
handler developer needs to deal with?

Thanks again!
Jeff.
"Engelbert" <Engelbert@discussions.nospam.com> wrote in message
news:ulqfBsvEGHA.336@TK2MSFTNGP14.phx.gbl...
> SharePoint development issues -
>
> either (WSS) microsoft.public.sharepoint.windowsservices.development or
> (SPS) microsoft.public.sharepoint.portalserver.development
>
> But as Bil points out storing passwords is probably not a *SharePoint*
> development issue.
>
> Engelbert
>
> "Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
> news:u8H7wovEGHA.3612@TK2MSFTNGP11.phx.gbl...
>> Thanks for the information! Is there a better news group for SharePoint
>> development issues?
>>
>> "Bil Simser [SPS MVP]" <bsimser@shaw.ca> wrote in message
>> news:eI41udvEGHA.2704@TK2MSFTNGP15.phx.gbl...
>>> There are tons of ways and places to do it as it's a development issue,
>>> not a SharePoint one however here's one technique that most people use:
>>> http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp
>>>
>>> --
>>> Bil Simser
>>> SharePoint MVP, BSc., MCSD
>>> Calgary, Alberta
>>> http://weblogs.asp.net/bsimser
>>>
>>>
>>>
>>> "Jeff Richardson" <Jeff.Richardson@Promega.com> wrote in message
>>> news:utwj6iuEGHA.3200@tk2msftngp13.phx.gbl:
>>>
>>>> Hi,
>>>>
>>>> I am creating an event handler for sharepoint document libraries and am
>>>> seeking some advice as to where is the best place to save the username
>>>> and
>>>> password for the impersonated user?
>>>>
>>>>
>>>>
>>>> I looked at the web.config file for the virtual server but did not see
>>>> an
>>>> AppSettings section.
>>>>
>>>>
>>>>
>>>> Should I store them in the registry? Should I create a separate config
>>>> file, if so where do you put that file?
>>>>
>>>>
>>>>
>>>> Any thoughts or samples are welcome.
>>>>
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Jeff Richardson
>>>
>>
>>
>
>