Error Reporting behing proxy for winform application

SwissCheeseSwissCheese Posts: 3
edited May 25, 2016 12:44PM in SmartAssembly
Hello,

I have mostly been using smartassembly for obfuscation and dll merging so far.
I have recently started to use smartassembly for error reporting for a winform application.
However, many of the users are behind a proxy and the error reporting process fails to connect and send the error report with the message "Connecting to server. (ERR 2001: The request failed with HTTP status 407: Proxy Authentication Required)"

I have come across some posts to fix this issue for web applications using the useDefaultCredentials="true" in the congig file. However I am struggling to find a solution for a VB.NET winform application.
Any help appreciated
Thank you
Best regards,
Cyril

Comments

  • Jessica RJessica R Posts: 1,019 Rose Gold 3
    Hi Cyril,

    Thanks for your post!

    You can add the useDefaultCredentials="true" option for a VB.NET winform application in the same way as for a web application. You'll just need to create a config file for the application (if it doesn't yet exist) with the same name as the application (for example, for WindowsFormApplication1.exe, the config file would be WindowsFormApplication.exe.config) and place it alongside the .exe file. Then you need to edit the config file to include the proxy option. For example, it may look like:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.net>
    <defaultProxy useDefaultCredentials="true" />
    </system.net>
    </configuration>

    I hope that helps! Please let us know how you get on.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Thank you Jessica

    I finally got it to work with a twist

    I was initially trying to modify directly the existing application config file in the debug/release folder with no success
    After adding the additional xml node, It was generating an error about the config file not atching the manifest and forcing me to rebuild to application.

    However, if I take the .exe at the end of the process, once the release exe is built and the smartassembly obfuscation process is completed, I am able to add the application config file with the statement you provided and it then seems to work fine.

    Thanks again
    Best regards,
    Cyril
  • Jessica RJessica R Posts: 1,019 Rose Gold 3
    Hi Cyril,

    I'm so glad to hear you've got things working!

    Please let us know if anything else comes up.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.