# Unable to install dot net framework 4.5.2 using win\_feature

**URL:** <https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 22, 2017, 1:47pm UTC](https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803 "2017-06-22T13:47:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arpi.89](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@arpi.89](https://forum.ansible.com/u/arpi.89)\
**Post date:** [June 22, 2017, 1:47pm UTC](https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803/1 "2017-06-22T13:47:36Z")

</div>

Hi

I am facing two issues:

1. I am trying to install Dot Net framework 4.5.2 using win\_feature:

- win\_feature:  
name: DotNet-4-5-2  
state: present

I am getting below error message:

fatal: [13.90.93.211]: FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“msg”: “The process C:\ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\MSFT\_PackageResource\confirmation.aspx could not be started”,  
“name”: “[https://www.microsoft.com/en-us/download/confirmation.aspx?id=42643](https://www.microsoft.com/en-us/download/confirmation.aspx?id=42643)”  
}

1. I am trying to install Advanced Logging for IIS using below code. Only partial file is getting downloaded and it doesnt show any error response. Is there any other way for installing Advanced Logging?

- name: Downloading Advanced Logging x64  
win\_get\_url:  
url: “[https://www.microsoft.com/en-us/download/confirmation.aspx?id=7211](https://www.microsoft.com/en-us/download/confirmation.aspx?id=7211)”  
dest: C:\WebAPI\AdvancedLogging.msi

Can someone help me with these issues?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 3, 2017, 7:31am UTC](https://forum.ansible.com/t/unable-to-install-dot-net-framework-4-5-2-using-win-feature/24803/2 "2017-07-03T07:31:57Z")

</div>

Hi,

I’ve not had that error you encountered when installing .net 4.5.2 using win\_feature.

Is .net 4.5.2 already in the running windows image?

You can probably tell by running Get-WindowsFeature on the machine where you want to install. If it isn’t already present in windows I imagine it will fail.

If its an older windows version before server 2012 there is a standalone installer for .net 4.5. In fact ansible includes a script which will install it on older windows machines that don’t yet have powershell 3.0. Its mentioned here in the documentation. [http://docs.ansible.com/ansible/intro\_windows.html#getting-to-powershell-3-0-or-higher](http://docs.ansible.com/ansible/intro_windows.html#getting-to-powershell-3-0-or-higher)

So you can probably workaround it by either using the script mentioned above or tweaking it to just install .net 4.5.2.

Regarding your second problem, I think the issue is that win\_get\_url is not following the confirmation redirect. You can probably workaround that by finding the static download location, which you can do by using Ctrl-Shift-I or F12 to open developer tools in your web browser, then go through a manual download of the .msi and watch the network traffic - you will see the actual location the file downloads from after you click on the download link.

Personally I’d recommend capturing all the things you want to install to somewhere where you control and then serving up any .msi files or whatever via your own web server. Yes its an extra step and more complexity to manage, but it means when you run your playbooks you aren’t dependent on having remote web servers running.

Hope this helps,

Jon
