Re: Read-only access to SPGlobalConfig without administrator rights
- From: andersonwebdev@xxxxxxxxxxx
- Date: 10 May 2005 07:20:32 -0700
Thank you very much for your reply. Would have an example of how to
retrieve the app pool identity from the Metabase? I have not seen that
done before.
Thanks
Nikander and Margriet Bruggeman wrote:
> Hello Matt,
>
> Well, back to the impersonation thing again. We agree you shouldn't
hardcode
> admin user names and passwords in code, but you can have
impersonation using
> other options. One way would be to use to application pool identity
which
> is always a local administrator and SharePoint database administrator
(it's
> credentials are stored safely in the IIS metabase), another approach
would
> be to store the credentials in the SPPT credential mapping database
(where
> it's kept encrypted). So, you have other options besides hard coding
names
> and passwords...
>
> Kind regards,
> Nikander & Margriet Bruggeman
>
> > Does anyone know how to simply READ (not update) the settings in
> > SPGlobalAdmin and SPGlobalConfig without impersonation? We need to
> > read the BlockedFileTypes property in SPGlobalAdmin.Config for a
> > custom Web Part we're building that allows file uploads. We want
to
> > use the BlockedFileTypes property for the upload validation code.
> >
> > It is a standard Portal site with Windows integrated security. The
> > users are not portal admin users, so impersonation doesn't work,
and I
> > don't want to hard-code admin user names and passwords in code or
in
> > web.config.
> >
> > // Obtain a reference to the SharePoint admin class
> > SPGlobalAdmin admin = new SPGlobalAdmin();
> > // Test reading output << Prompts for admin logon here >>
> > output.write(admin.Config.BlockedFileTypes.ToString());
> > Thanks,
> >
> > Matt
> >
.
- References:
- Read-only access to SPGlobalConfig without administrator rights
- From: andersonwebdev
- Re: Read-only access to SPGlobalConfig without administrator rights
- From: Nikander and Margriet Bruggeman
- Read-only access to SPGlobalConfig without administrator rights
- Prev by Date: Re: Programmatic Subsite Creation
- Next by Date: File and Folder GUID?
- Previous by thread: Re: Read-only access to SPGlobalConfig without administrator rights
- Next by thread: sending mail using smtp in a dwp file
- Index(es):
Relevant Pages
|