Friday, May 6, 2011

SharePoint web services

It's interesting how SharePoint Web Services works. Will add here useful links and my own comments based on my research.
Useful links:
Getting Started With SharePoint Web Services
The SharePoint web services are implemented in ASP.NET Web Services (ASMX), and you will find the physical files for most of these web services in the "Microsoft Shared" directory under "web server extensions\12\ISAPI" typically located at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI". The admin web service for the Central Administration tool is located in the ADMISAPI folder for which the central administration console contains a virtual directory named "_vti_adm". When a SharePoint site is created it will contain a virtual directory named "_vti_bin" that points to this location. IIS does not contain any application or virtual directories for subwebs, they do however contain mapping to the _vti_bin virtual directory through SharePoint metadata and HttpModules.
List of SharePoint services includes the following:
WSS Web ServicesWeb Reference
Administration Servicehttp://server/_vti_adm/admin.asmx
Alerts Servicehttp://server/_vti_bin/alerts.asmx
Document Workspace Servicehttp://server/_vti_bin/dws.asmx
Forms Servicehttp://server/_vti_bin/forms.asmx
Imaging Servicehttp://server/_vti_bin/imaging.asmx
List Data Retrieval Servicehttp://server/_vti_bin/dspsts.asmx
Lists Servicehttp://server/_vti_bin/lists.asmx
Meetings Servicehttp://server/_vti_bin/meetings.asmx
Permissions Servicehttp://server/_vti_bin/permissions.asmx
Site Data Servicehttp://server/_vti_bin/sitedata.asmx
Site Servicehttp://server/_vti_bin/sites.asmx
Users and Groups Servicehttp://server/_vti_bin/usergroup.asmx
Versions Servicehttp://server/_vti_bin/versions.asmx
Views Servicehttp://server/_vti_bin/views.asmx
Web Part Pages Servicehttp://server/_vti_bin/webpartpages.asmx
Webs Servicehttp://server/_vti_bin/webs.asmx

Wednesday, December 15, 2010

UAC prevents execution of custom actions during msi installation

In the previous post there was a link to the Robert Flaming's blog where he describes how MSI works with UAC. But I have some additional comments and want write them here:

In the following post Robert describes how permissions change under UAC:

















But what does the NoImpersonate bit means? There are different explanations in different articles. Based on my testing I've found out the following:
When you set Impersonate="no" in WIX for you custom action, it means that the custom action will be executed under the Local System account. And it is fine if you need to do changes with your local system. But if your custom action accesses a remote server it fails.

So, the only way that I've found is to prohibit the msi execution under unprivileged user. You should set the MSIUSEREALADMINDETECTION property to 1 and add a Launch Condition for Privileged that gives an error message about running via an elevated command prompt and then quits the installation.

<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

<Condition Message="The installation should be running with full administrative account. Please run an administrative command prompt and launch installation using msiexec.">
Privileged
</Condition>