none
Loader having "An exception has occurred during a WebClient request" Error. RRS feed

  • Question

  • Hello I'm coding a loader for a a cheat that is still in development. I am trying to figure out the error code of "an exception has occurred during a webclient request" but I can't find out whats causing it here is my code:
    private void button1_Click(object sender, EventArgs e)
    {
    checkonline();
    WebClient wb = new WebClient();
    string HWIDLIST = wb.DownloadString("url that im not telling u"); // HWID List to make sure the program has the right users and not some kid with this loader.
    if (HWIDLIST.Contains(textBox1.Text)) // You can add ! before the url to make it blacklisted instead of whitelisted.
    string mainpath = "C:\\ProgramFiles\\KingSense\\KingSense.dll"; // path to cheat dll
    wb.DownloadFile("url that im not telling u", mainpath); //Add the url to the dll that the cheats gonna have.
    var name = "csgo"; //csgo's process name
    var target = Process.GetProcessesByName(name).FirstOrDefault();
    var path = mainpath;
    var file = File.ReadAllBytes(path);


    Saturday, March 14, 2020 8:13 PM

All replies

  • Two things to try.

    First wrap the offending code in a try/catch, when the exception happens inspect if there are inner exceptions.

    Second, have Fiddler running and watch for issues.

    Edit: cheats are not the sort of thing we get into here.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange


    Saturday, March 14, 2020 10:34 PM
  • The error means something went wrong with the web request, obviously.  Does the site you're downloading from require logging in?  Is it HTTPS?

    Are you able to copy-and-paste your URLs into a browser and have them succeed?  Even an "incognito" window that doesn't have your cookies memorized?

    Did you create the folder C:\ProgramFiles\KingSense before you started?  WebClient won't do that for you.

    Is that a web site you control?  Because only an idiot would download and execute code from a random web page -- especially one dealing in cheating.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, March 16, 2020 4:28 AM
  • Hi Varrious,

    Thank you for posting here.

    Do you mean you are making a cheat program?

    This is a bad behavior for any reason, and we don't support it.

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 16, 2020 6:24 AM