# Exporting ASM Policies in C#?

**URL:** <https://community.f5.com/t/exporting-asm-policies-in-c/52798>\
**Category:** Technical Forums\
**Tags:** icontrol, security, asm-advanced-waf, c\
**Created:** [July 13, 2017, 8:06pm UTC](https://community.f5.com/t/exporting-asm-policies-in-c/52798 "2017-07-13T20:06:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cory\_Blankenshi](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Cory\_Blankenshi](https://community.f5.com/u/Cory_Blankenshi)\
**Post date:** [July 13, 2017, 8:06pm UTC](https://community.f5.com/t/exporting-asm-policies-in-c/52798/1 "2017-07-13T20:06:02Z")

</div>

I am exploring the .NET API, and as a test case I’d like to use the export\_policy\_xml method to export a policy and save the output file to my desktop. I’ve looked at code samples and read through the API documentation but I haven’t found anything that will get me going in the right direction. I am able to connect to our f5 and return bits of information here and there, but I’ve hit a roadblock trying to export the policy. Thoughts, comments, or suggestions?

Thanks!

---

<div class="post-metadata">

**Author:** ![cjunior](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@cjunior](https://community.f5.com/u/cjunior)\
**Post date:** [July 14, 2017, 9:54pm UTC](https://community.f5.com/t/exporting-asm-policies-in-c/52798/2 "2017-07-14T21:54:38Z")

</div>

I have no full experience with iControl SOAP.

But, I think you need to export a policy first then download file created.

export\_policy\_xml( in String policy\_name, in String filename );

FileTransferContext download\_policy( in String policy\_name, in long chunk\_size, inout long file\_offset );

[DevCentral](https://devcentral.f5.com/wiki/iControl.ASM __Policy__ export_policy_xml.ashx) [DevCentral](https://devcentral.f5.com/wiki/iControl.ASM __Policy__ download_policy.ashx)

Consider move to iControlREST and get more functionalities.

Regards.
