System net webexception удаленный сервер возвратил ошибку 403 запрещено osu

Обновлено: 08.07.2024

I've written an app that has worked fine for months, in the last few days I've been getting the error below on the installed version only.

If I run the source code in VS everything works fine. Also, the .exe in the bin folders work fine. It's only the installed version which generates the error, if I recompile and reinstall I get the same error.

I'm a bit stumped as to what's causing this and hoped for a few pointers. It seems to be a WebRequest response through IE is not being returned but I'm stumped as to why it works fine in VS without any errors. Are there any new IE security measures/polices that may cause this?

Things I've tried so far include:

  • Disabled all AntiVirus & Firewall
  • Run as Administrator

This is installed as a standalone app. When I've run as Administrator, I've opened the program folder and run the exe as administrator rather than the shortcut.

Problem details:Привет всем, сегодня произошла проблема. Сегодня заметил, что на моём диске C стало мало место и я решил переместить осу, но не просто вырезать и вставить, а через cmd (хотя мне кажется всё равно так и сделалось). После того как переместил игру на D диск я зашёл в игру и заметил, что часть моих карт пропало, и я конечно же обновил список, но ранкед карты не показывали топ, не регались скоры и не было аватарок. я решил открыть osu!repair. И там сразу же появилась проблема. Ну и решил переустановить осу, удалил игру предварительно вырезал от туда битмапы и скины и скачал установщик. Но не помогло, скачал старый инстайлер и тоже не робит. Логи я тоже сейчас (ведь там всё что я пытался сделать) скопировал:


В конкретно этом случае веб-сервер (h92761ae.beget.tech) "не любит" обращения от "не реальных" браузеров, например:

вернет код 403 Forbidden . Так как User-Agent в этом случае был curl/7.29.0

Поэтому нам можно попробовать притвориться реальным браузером с User-Agent-ом, например, Mozilla/5.0 . И это решит данную проблему.

Естественно, такой подход не решит проблемы, если вам будет запрещено ходить на этот сервер, например, по ip-адресу. Но это уже не вопрос данной темы.

I read in other stackoverflow posts that to enable access through the proxy that I would need to include the following in my project's app.config:

. but it did not work for me. I receive the same error message.

Here is the code that I am attempting to execute:

. and there is further code to handle the response to a POST; but I didn't include it because it doesn't seem germane to solving the proxy issue.

To make things even more confusing for me, I noticed that Internet Explorer is not using a single proxy server, but instead is executing an automatic configuration script. This script has many "if" statements checking to see which proxy ip to use depending on the desired ip address.

Читайте также: