Fix error SCCM 2012 : Cannot Connect to the application server


If you get this error: Cannot connect to the application server. It may be because you are missing WCF activation.


  • Start Server Manager > Features > Add Features > .NET Framework 3.5.1 Features > WCF Activation > HTTP Activation.
Then:
  • Open Command Prompt (start > run > cmd)
  • %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –i –enable

Demo Lab SCCM 2012 : Create an Application

In this part we will create an Application, and create a deployment type for that application to only install if the Primary User is True for that device (User Device Affinity), we will then copy our Task Sequence (duplicate it), deploy the new Task Sequence, add a computer to the new collection and then PXE boot the computer to the Deployment Menu.

Applications are new in System Center 2012 Configuration Manager and have the following characteristics:

  • Applications contain the files and information necessary to deploy a software package to a computer or a mobile device. Applications contain multiple deployment types that contain the files and commands necessary to install the software. For example, an application could contain deployment types for a local installation of a software package, a virtual application package or a version of the application for mobile devices.
  • Requirement rules define conditions that specify how an application is deployed to client devices. For example, you can specify that the application should not be installed if the destination computer has less than 2GB RAM or you could specify that a virtual application deployment type is installed when the destination computer is not the primary device of the user.
  • Global conditions are similar to requirement rules but can be reused with any deployment type.
  • User device affinity allows you to associate a user with specified devices. This allows you to deploy software to a user rather than a device. For example, you could deploy an application so that it only installs on the primary device of the user. On devices that are not the primary device of the user, you could deploy a virtual application that is removed when the user logs out.
  • Deployments are used to distribute applications. A deployment can have an action which specifies whether to install or uninstall the application and a purpose which specifies whether the application must be installed or whether the user can choose to install it.
  • System Center 2012 Configuration Manager can use detection methods to determine if a deployment type has already been installed on a device by using product information, or a script.
  • Application management supports the new monitoring features in System Center 2012 Configuration Manager. The status of an application deployment can be monitored directly in the Configuration Manager console.
  • Packages and programs from Configuration Manager 2007 are supported in System Center 2012 Configuration Manager and can use some of the new deployment and monitoring features.
  • You can now deploy a task sequence on the Internet, as a method to deploy a script, for example, prior to installing a package and program. It is still not supported to deploy an operating system over the Internet.
  • Software Center is a new client interface that allows users to request and install applications, control some client functionality, and to access theApplication Catalog, which contains details about all available applications.
Step 1. Create an Application

Perform the following on your SCCM 2012 server as SMSadmin.

Now we will create an application in this case FireFox, you can download an MSI of it from here (The files contained in this MSI are the official binaries with no modifications). Save the application in your package sources share (I have shared a root folder on D:\ called Sources with sub folders within, one is called Apps). Copy the downloaded FireFox MSI to a subdirectory of your sources\apps\msi share just like I have done in the screenshot below.

firefox msi in Apps.png 

In the Configmgr Console, click on Software Library, Applications, in the ribbon click on Create Application

create application.png

When the Create Application wizard appears click on browse then point it to the UNC of where the MSI is stored eg: \\sccm\sources\apps\msi\firefox\Firefox-7.0.1-en-US.msi

browse to firefox msi.png 

click next and you'll get to the Imported Information screen,

imported info.png 

click next again to enter General Information about this application, verify that the installation switches are ok and click next

general info about this application.png 

click next at the summary through to completion

application wizard done.png 



Step 2. Edit the Deployment Type

Perform the following on your SCCM 2012 server as SMSadmin.

As we have selected the default values during the wizard, a Deployment Type has already been setup but we want to edit it so that this application only installs if a primary user has been associated with the device (UDA), so right click on the Application and choose Properties

mozilla firefox properties.png 

the Applications properties are revealed, click on the Deployment Types Tab

firefox properties.png 

select the Deployment type and click on Edit

edit deployment type.png 

the Deployment Type properties are revealed, click on the Requirements Tab

requirements.png 

there are no requirements listed, click on Add

add requirement.png 

on the Create Requirement screen, select the Category drop down menu and select User, verify that it's set as below (primary device equals true)

create requirement.png 

click Apply

primary device equals true.png 

and click ok, then click apply and ok again to exit from the Deployment Type menu


Step 3. Create a Deployment for our Application

Perform the following on your SCCM 2012 server as SMSadmin.

Select the Firefox application and in the ribbon click on Deployment and select Deploy from the menu

deploy firefox.png

when the Deploy Software wizard appears, browse to All Users for collection

all users.png 

for Content, click on Add and select our Distribution Point

deploy software wizard - content.png 

next change the Purpose from Available to Required and place a checkmark in Deploy Automatically according to schedule whether or not a user is logged on

purpose required.png 

for User Experience set it to hide in software center and all notifications

hide in software center and all notifications.png 

click next through the rest of the wizard to completion (no other changes)

deploy firefox wizard complete.png 



Step 4. Copy our Task Sequence

Perform the following on your SCCM 2012 server as SMSadmin.

We want to be able to both Refresh our computers (reinstall and migrate data) and do a New Computer installation, to do this we need another task sequence, so lets copy (duplicate) the one we have as we've already created one Deploy Windows 7 X64 task sequence, so select it right click and choose Copy

copy ts.png 

you'll be notified of the copy completion

copy complete.png 

Rename the First task sequence to Deploy Window 7 X64 - Refresh by right clicking on it, properties, edit the name

rename ts.png 

Now we need to edit the second Task sequence, right click it and choose edit

As this is a New Computer Task Sequence, we don't need to migrate data, so Disable the Capture Files and Settings group and the Restore User files and settings Group, click on the Options tab for each group and place a checkmark in Disable, click Apply.

disable usmt.png 

Now we need to add a new step in the Install Operating system group just after Restart in Windows PE step, so select that step and choose Add from the drop down menu

add step.png 

select Disks, Format and Paritition Disk

disks format and partition disk.png 

so that it looks like so

format and partition disk.png 

Apply the changes and rename this task sequence to Deploy Windows 7 X64 - New Computer, so now we have two Deploy Task Sequences

two deploy ts.png


Step 5. Deploy our new Task Sequence to the Deploy Windows 7 X64 collection

Perform the following on your SCCM 2012 server as SMSadmin.

To make the task sequence available to computers we need to Deploy it. In Software Library, select our Deploy Windows 7 X64 - New Computertask sequence and choose Deploy, point the wizard collection to Deploy Windows 7 X64

deploy 7 collection.png 

change purpose to Available, place a checkmark in Make available to boot media and PXE

available and pxe.png 

click next through to completion

deploy windows 7 x64 new computer.png 



Step 6. Import a computer into the Deploy Windows 7 X64 collection

Perform the following on your SCCM 2012 server as SMSadmin.

We need a new Virtual Machine to be imported into ConfigMgr's database to add it to our Deploy Windows 7 X64 collection. In the ConfigMgr console, click on Assets and ComplianceDevices, and in the Ribbon click on Import Computer Information. If you havn't already created a Virtual Machine do so now, we need one with 1 gig of Virtual Ram and we need to know it's MAC address.

import computer information.png 

choose import single computer, filll in the computername and mac address (if you want to import multiple comptuers using a file follow this guide)

w72.png 

add it to our Deploy Windows 7 X64 collection

add it to our deploy windows 7 x64 collection.png 

done

w72 added.png 

Verify it's in the collection (right click and choose Update Membership)

and after a few minutes there it is

w72 in deploy collection.png




Step 7. PXE boot the New Computer

Perform the following on your SCCM 2012 server as SMSadmin.

PXE boot the new Virtual Machine, and you should get to the familiar password prompt

pxe password.png 

and two new task sequences are ready for us, select Deploy Windows 7 X64 - New Computer

new computer.png 

and there's that Format and Partition disk step in action

format disc.png 

and our captured OS get's applied

windows 7 getting applied.png 

In the Next Part we will review how Firefox get's deployed automatically to this computer based on the UDA variables we set, and we will review the logs involved and we'll edit our boot image to support prestart and add some extrafiles, these will be some VBS scripts to prompt for the UDA user instead of setting the variable on the collection as we really don't want all computers that get deployed to have one user as the primary user. 

Part 8 : USMT 4 package to migrate for SCCM 2012

Step 1. Create the USMT 4 package

Perform the following on your SCCM 2012 server as SMSadmin.

If you want to migrate data in a Deploy Task Sequence you'll need to have the USMT 4 package ready, so let's create it now so that we can access the necessary migration files in our Deploy Windows 7 X64 task sequence.

On your SCCM server in Windows Explorer, browse to C:\Program Files\Windows AIK\Tools\

Right click on the USMT folder and choose Copy,

copy usmt package.png 

select your sources folder (mine is on D:\) and paste the USMT folder in sources\os so that it's path is sources\os\usmt

sources os usmt.png 

In the ConfigMgr Console, select Software Library, Application Management, Packages, right click and choose Create Package.

create package.png

fill in the details about the package, call it USMT version 4 and point to the UNC path of our newly copied files, \\sccm\sources\os\usmt

this package contains source files.png 

for Program Type select Do not create a program

do not create a program.png 

Complete the Wizard

complete the wizard.png 



Step 2. Distribute the USMT package to our Distribution Points

Select the USMT package and click on Distribute Content in the Ribbon

distribute content usmt.png

for Content Destination, click on Add, select Distribution point, select our DP,

add dp usmt.png 

click through the rest of the wizard

usmt done.png 



Step 3. Import the captured Windows 7 X64 wim file

Perform the following on your SCCM 2012 server as SMSadmin.

In the Software Library, Operating Systems section of the Configmgr console, click on Operating System Images, you'll note that it is empty because we havn't imported any images yet. Right click and choose Add Operating System Image

add operating system image.png

browse to the UNC of where we captured the image in Part 7 and select the captured wim file

eg: \\sccm\sources\os\captures\windows7x64.wim

add captured wim.png 

fill in some details about the image

image details.png 

click through the summary, progress to completion

completion.png 


Step 4. Distribute the image to the Distribution points

Perform the following on your SCCM 2012 server as SMSadmin.

We now need to distribute our imported image to our distribution points. Select Our Windows 7 Enterprise X64 image and in the ribbon above click onHome and then Distribute Content

distribute content.png

when the Distribute Content Wizard appears, click next

distribute content next.png 

to specify the destination, click on add and select distribution point

add dp.png 

select our Distribution Point from the list

select our dp.png 

the DP appears selected

dp selected.png 

click next through summary/progress to completion

image added to dp.png 



Step 5. Create the Deploy Task Sequence

Perform the following on your SCCM 2012 server as SMSadmin.

Now that we have added our captured operating system image to Configmgr, and distributed it to our dp's we want to create a Deploy Task sequenceto Deploy the image. In Task Sequences, right click and choose Create Task Sequence.

create deploy task sequence.png

choose to Install an existing image package

Install an existing image package.png 

fill in some details about the image and click browse and select the X86 boot image, click next to proceed

browse to x86 boot image.png 

now select the Windows 7 image by clicking on browse and set an administrator password, uncheck Partition and format the target computer before installing the operating system if you want to use hardlinking for User state migration, otherwise files cannot be stored locally

install windows uncheck partition and format.png 

for the Configure the Network step, we want to join the domain so click on browse beside join a domain

browse to select domain.png 

and now we need to specify the user that has permissions to join the domain, i use the DomJoin user just or this task (create the user and delegate them enough permissions to add computers to the domain)

domjoin.png 

I'm not specifying an OU in this step, you can, but don't select the Computers Container if you do...

configure the network step.png 

for the Install the Configuration Manager client step click on browse and select the client package from defintion we created in the last part

install the configuration manager client.png

click next and for State Migration, select our USMT 4 package

usmt 4 package.png 

change the setting to Save user settings Locally (this will mean we can use Hard Links)

save user settings locally.png 

for Include Updates select All Software Updates

all software updates.png 

and click next through to completion (we are not installing any applications at this point).

ts completion.png 



Step 6. Create a Deploy Windows 7 X64 collection

Perform the following on your SCCM 2012 server as SMSadmin.

In the ConfigMgr console, click on Assets and Compliance, select Device Collections, click on Create Device Collection in the Ribbon

create device collection for deploy windows 7.png 

fill in the collection details, call it Deploy Windows 7 X64, limit it to All Systems

deploy windows 7 x64 collection.png 

click next through the wizard, we will not add any computers to it yet, and we will not create any queries.

deploy 7 collection done.png 



Step 7. Create Collection variables

Perform the following on your SCCM 2012 server as SMSadmin.

We want to set UDA variables on our collection, so that a UDA user gets assigned as the primary user of computers deployed in this collection. We are doing this to show you that you can set a primary user to a device based on Collection Variables.

We could do this in other ways, for example using task sequence steps to set the variables or prestart commands or a frontend HTA, I will come back to this subject later, but for now, let's just see it in action by specifying the two variables below.

Right click on the Deploy Windows 7 X64 Collection and choose Properties

collection properties.png 

click on the Collection Variables tab, click on the yellow startburst and add a new variable called SMSTSAssignUsersMode, set the value to Autoand remove the checkmark from Do not display this value in the Configuration Manager console

smstsassignusersmode.png 

do the same again for another variable called SMSTSUdaUsers, specify the user as domain\user

smstsudausers.png 


Step 8. Deploy our Task Sequence

Perform the following on your SCCM 2012 server as SMSadmin.

To make the task sequence available to computers we need to Deploy it. In Software Library, select our Deploy Windows 7 X64 task sequence and choose Deploy

deploy task sequence.png

select our Deploy Windows 7 X64 collection and click ok to the warning

ok no members.png 

change purpose to Available (this keeps it optional, Required is Mandatory ! and dangerous as a result), place a checkmark in Make available to boot media and PXE

purpose.png 

click next through the task sequence, until distribution points, by Default it will be set to Download content locally when needed by running task sequence, you can get this to change to Access content directly by editing each package referenced in the task sequence and setting the Data Access tab for each package, place a checkmark in Copy the content in this package to a package share on Distribution points

download content locally.png 

click next through the wizard to completion.

deploy wizard completed successfully.png 

In our next part we will create an Application, and create a deployment type for that application to only install if the Primary User is True for that device (User Device Affinity), we will then add a computer to the new collection, PXE boot it and watch the process from start to finish.