Setting up the Deployment Web Service
The information in this post is provided as-is, please use at your own risk and test appropriately.
Been meaning to create a post on this for quite some time. I just want to cover the basic setup of the Deployment Web Service created by Maik Koster. The latest download can be located here. (V7 as of this posting) There is some documentation on the Codeplex site, and i urge you to review that as well. CodePlex Documentation. If you are going to be using the MDT functions of the web service, then you need to configure the Stored Procedures as well, and I recommend you read Maik's blog post on this topic as i won’t be covering that in this post.
This will just be a quick-start guide for Server 2003 and IIS 6. So lets get started!
1) First download the files from the site linked above.
2) Extract out the web service files into a directory of your choosing, I still like to put items in Inetpub if it’s IIS related. So \Inetpub\DeploymentWebService in my case.
3) Next we need to create a Virtual Directory in IIS.
Right-Click on Default Web-Site and select New – Virtual Directory
Next
Name the Virtual Directory and click Next
Browse to the path of the files you extracted
Select Next
Make sure to check “Read” and “Run Scripts”, then click Next
Click Finish
4) Next we need to setup the Application Pool, I generally like to create a separate pool so you can recycle the pool without effecting anything else you might have running on that IIS server.
Right-click on Applications Pools and select New – Application Pool
Name the Web Pool appropriately, then click OK
Next we want to configure the identity of the web pool, here you can select the account that will run the Web Pool, most people will use a service account and specify those credentials here, this account will be the default account the web service is running under, so it will need rights to perform the web service functions you want to use:
5) Next we need to setup the Web Service to use the new Pool:
Go into the properties of the Virtual Directory you created and change the Application Pool to the web pool you previously created (MDTWebPool in screenshot):
You’ll also want to make sure under the ASP.NET tab that ASP.NET versions 2.0 is selected:
6) Next we need to configure the web service settings in the web.config (this step copied from Maik’s documentation)
On default, the webservice will use the configured application pool user for authentication. It requires only a couple Application Settings to be set:
- RootServer - The SCCM Root Server
- SLPServer - One SCCM Server with the SLP Role
- RootSiteCode - The Root site code
For Access to the MDT Database you need to configure at least
- MDTDBServer - The MDT Database server (with Instance if necessary)
- MDTDBName - The MDT Database name
- MDTDBIntegratedSecurity - Set to "True" if you want to use the application pool account for authentication. If set to "False" you need to supply the following two settings
- MDTDBUser - Username to access the MDT Database
- MDTDBPassword - Password to access the MDT Database
For Active Directory access, you can optionally configure the following Application Settings. This is only necessary, if the application pool user account does not have enough permissions to do execute the required functions, and/or if you need to access a different domain as the application pool User is member of:
- ADDomain - Domain to query (use either "domain.com" or "DC=Domain,DC=COM" format)
- ADUsername - Username for authentication
- ADPassword - Password for authentication
7) Make sure to recycle the app pool for your web service after you’ve made changes to the web.config
8) You should now be able to use the Web Service. Open your browser and go to the following sites to verify they load correctly:
- http://YourWebServer/YourWebserviceFolder/ad.asmx - For Active Directory related functions
- http://YourWebServer/YourWebserviceFolder/mdt.asmx - For MDT related functions
- http://YourWebServer/YourWebserviceFolder/sccm.asmx - for SCCM related functions.
Test a few functions and make sure it returns the data you expect.
There you go, you should now have a functioning web service to use with your deployments!
-Chris