Re: Read-only access to SPGlobalConfig without administrator rights
- From: Nikander and Margriet Bruggeman <news@xxxxxxxxxxx>
- Date: Tue, 10 May 2005 05:08:59 -0700
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
.
- Follow-Ups:
- Re: Read-only access to SPGlobalConfig without administrator rights
- From: andersonwebdev
- Re: Read-only access to SPGlobalConfig without administrator rights
- References:
- Read-only access to SPGlobalConfig without administrator rights
- From: andersonwebdev
- Read-only access to SPGlobalConfig without administrator rights
- Prev by Date: User rights: Sharepoint 2003:
- Next by Date: Re: Programmatic Subsite Creation
- Previous by thread: Read-only access to SPGlobalConfig without administrator rights
- Next by thread: Re: Read-only access to SPGlobalConfig without administrator rights
- Index(es):
Relevant Pages
|