# WinRMTransportError: Bad HTTP response returned from server. Code 500

**URL:** <https://forum.ansible.com/t/winrmtransporterror-bad-http-response-returned-from-server-code-500/18484>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 12, 2015, 1:19pm UTC](https://forum.ansible.com/t/winrmtransporterror-bad-http-response-returned-from-server-code-500/18484 "2015-06-12T13:19:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrrkiran12](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rrrkiran12](https://forum.ansible.com/u/rrrkiran12)\
**Post date:** [June 12, 2015, 1:19pm UTC](https://forum.ansible.com/t/winrmtransporterror-bad-http-response-returned-from-server-code-500/18484/1 "2015-06-12T13:19:55Z")

</div>

Hi ,

I am trying to copy file to windows using win\_copy and file size is around 20 mb , i am getting following error

Traceback (most recent call last):  
File “/usr/lib/python2.6/site-packages/ansible/runner/connection\_plugins/winrm.py”, line 198, in put\_file  
result = self.\_winrm\_exec(cmd\_parts[0], cmd\_parts[1:])  
File “/usr/lib/python2.6/site-packages/ansible/runner/connection\_plugins/winrm.py”, line 125, in \_winrm\_exec  
command\_id = self.protocol.run\_command(self.shell\_id, command, args)  
File “/usr/lib/python2.6/site-packages/winrm/protocol.py”, line 232, in run\_command  
rs = self.send\_message(xmltodict.unparse(rq))  
File “/usr/lib/python2.6/site-packages/winrm/protocol.py”, line 173, in send\_message  
return self.transport.send\_message(message)  
File “/usr/lib/python2.6/site-packages/winrm/transport.py”, line 95, in send\_message  
raise WinRMTransportError(error\_message)  
WinRMTransportError: Bad HTTP response returned from server. Code 500

Any idea on this … please suggest me if anyone faced this issue.

Thanks  
Ravi

---

<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:** [June 12, 2015, 3:26pm UTC](https://forum.ansible.com/t/winrmtransporterror-bad-http-response-returned-from-server-code-500/18484/2 "2015-06-12T15:26:38Z")

</div>

I think there are others who have experienced something similar:

[https://github.com/ansible/ansible/issues/9980](https://github.com/ansible/ansible/issues/9980)

It is possible that you are hitting one of the quota limits set in the winrm configuration - [https://msdn.microsoft.com/en-us/library/ee309367(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/ee309367%28v=vs.85%29.aspx)

Personally I only use win\_copy to push out small files usually less than 1Mb. To transfer large binary files it is much quicker to use the win\_get\_url module to make the remote host retrieve them.

Jon
