- Remove From My Forums
-
Question
-
Прошу помочь мне с этой ошибкой, раньше программа запускалась нормально но через какое-то время начало выдавать такую ошибку.
подробная информация об использовании оперативной
(JIT) отладки вместо данного диалогового
окна содержится в конце этого сообщения.************** Текст исключения **************
System.Net.WebException: Удаленный сервер возвратил ошибку: (404) Не найден.
в System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
в System.Net.WebClient.DownloadString(Uri address)
в System.Net.WebClient.DownloadString(String address)
в WeAreDevs_API.ExploitAPI.IsUpdated()
в WeAreDevs_API.ExploitAPI.LaunchExploit()
в c.g(Object , EventArgs )
в System.Windows.Forms.Control.OnClick(EventArgs e)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Загруженные сборки **************
mscorlib
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3416.0 built by: NET472REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
—————————————-
Pain Exist
Версия сборки: 1.0.0.0
Версия Win32: 1.0.0.0
CodeBase: file:///C:/Users/%D0%96%D0%B5%D0%BD%D1%8F/Desktop/%D0%9D%D0%BE%D0%B2%D0%B0%D1%8F%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B0%20(3)/%5BFilter%5D%20Pain%20Exist%20v2.9/%5BFilter%5D%20Pain%20Exist%20v2.9/Pain%20Exist%20V2.9%20by%20Filter.exe
—————————————-
System.Windows.Forms
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3324.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3416.0 built by: NET472REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Drawing
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
WeAreDevs_API
Версия сборки: 1.0.0.0
Версия Win32: 1.0.0.0
CodeBase: file:///C:/Users/%D0%96%D0%B5%D0%BD%D1%8F/Desktop/%D0%9D%D0%BE%D0%B2%D0%B0%D1%8F%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B0%20(3)/%5BFilter%5D%20Pain%20Exist%20v2.9/%5BFilter%5D%20Pain%20Exist%20v2.9/WeAreDevs_API.DLL
—————————————-
System.Configuration
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
—————————————-
System.Core
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3362.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
—————————————-
System.Xml
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
—————————————-
FlatUI
Версия сборки: 1.0.0.0
Версия Win32: 1.0.0.0
CodeBase: file:///C:/Users/%D0%96%D0%B5%D0%BD%D1%8F/Desktop/%D0%9D%D0%BE%D0%B2%D0%B0%D1%8F%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B0%20(3)/%5BFilter%5D%20Pain%20Exist%20v2.9/%5BFilter%5D%20Pain%20Exist%20v2.9/FlatUI.DLL
—————————————-
FastColoredTextBox
Версия сборки: 2.16.23.0
Версия Win32: 2.16.23.0
CodeBase: file:///C:/Users/%D0%96%D0%B5%D0%BD%D1%8F/Desktop/%D0%9D%D0%BE%D0%B2%D0%B0%D1%8F%20%D0%BF%D0%B0%D0%BF%D0%BA%D0%B0%20(3)/%5BFilter%5D%20Pain%20Exist%20v2.9/%5BFilter%5D%20Pain%20Exist%20v2.9/FastColoredTextBox.DLL
—————————————-
System.resources
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.resources.dll
—————————————-
System.Windows.Forms.resources
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.Windows.Forms.resources.dll
—————————————-
mscorlib.resources
Версия сборки: 4.0.0.0
Версия Win32: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll
—————————————-************** Оперативная отладка (JIT) **************
Для подключения оперативной (JIT) отладки файл .config данного
приложения или компьютера (machine.config) должен иметь
значение jitDebugging, установленное в секции system.windows.forms.
Приложение также должно быть скомпилировано с включенной
отладкой.Например:
<configuration>
<system.windows.forms jitDebugging=»true» />
</configuration>При включенной отладке JIT любое необрабатываемое исключение
пересылается отладчику JIT, зарегистрированному на данном компьютере,
вместо того чтобы обрабатываться данным диалоговым окном
- Remove From My Forums
-
Question
-
User668774724 posted
Hi Al,
Can’t get pass the httpResponse.Any idea what I could be missing
//Configure URI WebRequest request = WebRequest.Create(@"https://xxxx.xxxx.com/v1/operators/" + queryParameter); //Add Content type request.ContentType = "application/json"; //Add Api key authorization request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey); //Set request method request.Method = "GET"; //Perform the request var httpResponse = (HttpWebResponse)request.GetResponse(); if (httpResponse.StatusCode.ToString().ToLower() == "ok") { Response.Write("Y"); }
Thanks in advance
I’ve copied both js files from electron auto-updater into my app
auto-updater-win.js
'use strict'
const {app} = require('electron')
const {EventEmitter} = require('events')
const squirrelUpdate = require('./squirrel-update-win')
class AutoUpdater extends EventEmitter {
quitAndInstall () {
if (!this.updateAvailable) {
return this.emitError('No update available, can't quit and install')
}
squirrelUpdate.processStart()
app.quit()
}
getFeedURL () {
return this.updateURL
}
setFeedURL (updateURL, headers) {
this.updateURL = updateURL
}
checkForUpdates () {
console.log("checkForUpdates/zzzzz");
if (!this.updateURL) {
return this.emitError('Update URL is not set')
}
if (!squirrelUpdate.supported()) {
return this.emitError('Can not find Squirrel')
}
this.emit('checking-for-update')
squirrelUpdate.download(this.updateURL, (error, update) => {
console.log("squirrelUpdate.download");
if (error != null) {
return this.emitError(error)
}
if (update == null) {
return this.emit('update-not-available')
}
this.updateAvailable = true
this.emit('update-available')
squirrelUpdate.update(this.updateURL, (error) => {
if (error != null) {
return this.emitError(error)
}
const {releaseNotes, version} = update
// Date is not available on Windows, so fake it.
const date = new Date()
this.emit('update-downloaded', {}, releaseNotes, version, date, this.updateURL, () => {
this.quitAndInstall()
})
})
})
}
// Private: Emit both error object and message, this is to keep compatibility
// with Old APIs.
emitError (message) {
this.emit('error', new Error(message), message)
}
}
module.exports = new AutoUpdater()
and squirrel-update-win.js
In renderer.js I have set up the auto-updater to use the local files not those from electron
const autoUpdater = require(‘./auto-updater-win’);
checkForUpdates gets fired,
the url looks like http://test.com:3000/updates/latest?v=1.0.4
it can be accesed from the browser and returns the url to the zip file of the new version in json
this.emit('checking-for-update')
squirrelUpdate.download(this.updateURL, (error, update) => {
console.log("squirrelUpdate.download");
…
also gets called from auto-updater-win.js
then from squirrel-update-win.js
when
// Download the releases specified by the URL and write new results to stdout.
exports.download = function (updateURL, callback) {
console.log(updateURL);
return spawnUpdate(['--download', updateURL], false, function (error, stdout) {...}
is hit
it gives me this error
System.AggregateException: One or more errors occurred. —> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
Any Ideea how to solve it? Please I need some help
Many thanks.
I’ve copied both js files from electron auto-updater into my app
auto-updater-win.js
'use strict'
const {app} = require('electron')
const {EventEmitter} = require('events')
const squirrelUpdate = require('./squirrel-update-win')
class AutoUpdater extends EventEmitter {
quitAndInstall () {
if (!this.updateAvailable) {
return this.emitError('No update available, can't quit and install')
}
squirrelUpdate.processStart()
app.quit()
}
getFeedURL () {
return this.updateURL
}
setFeedURL (updateURL, headers) {
this.updateURL = updateURL
}
checkForUpdates () {
console.log("checkForUpdates/zzzzz");
if (!this.updateURL) {
return this.emitError('Update URL is not set')
}
if (!squirrelUpdate.supported()) {
return this.emitError('Can not find Squirrel')
}
this.emit('checking-for-update')
squirrelUpdate.download(this.updateURL, (error, update) => {
console.log("squirrelUpdate.download");
if (error != null) {
return this.emitError(error)
}
if (update == null) {
return this.emit('update-not-available')
}
this.updateAvailable = true
this.emit('update-available')
squirrelUpdate.update(this.updateURL, (error) => {
if (error != null) {
return this.emitError(error)
}
const {releaseNotes, version} = update
// Date is not available on Windows, so fake it.
const date = new Date()
this.emit('update-downloaded', {}, releaseNotes, version, date, this.updateURL, () => {
this.quitAndInstall()
})
})
})
}
// Private: Emit both error object and message, this is to keep compatibility
// with Old APIs.
emitError (message) {
this.emit('error', new Error(message), message)
}
}
module.exports = new AutoUpdater()
and squirrel-update-win.js
In renderer.js I have set up the auto-updater to use the local files not those from electron
const autoUpdater = require(‘./auto-updater-win’);
checkForUpdates gets fired,
the url looks like http://test.com:3000/updates/latest?v=1.0.4
it can be accesed from the browser and returns the url to the zip file of the new version in json
this.emit('checking-for-update')
squirrelUpdate.download(this.updateURL, (error, update) => {
console.log("squirrelUpdate.download");
…
also gets called from auto-updater-win.js
then from squirrel-update-win.js
when
// Download the releases specified by the URL and write new results to stdout.
exports.download = function (updateURL, callback) {
console.log(updateURL);
return spawnUpdate(['--download', updateURL], false, function (error, stdout) {...}
is hit
it gives me this error
System.AggregateException: One or more errors occurred. —> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
Any Ideea how to solve it? Please I need some help
Many thanks.
To summarize, the URLs that WebDriverManager uses to download an updated driver have changed, but the NuGet package has not been updated to use the new URLs (more info)
Original:
So I am having the same issue, if you break your code and step into it at driverManager.SetUpDriver(new EdgeConfig());
and view the details you’ll see the URL it’s using and trying to go to is here https://msedgedriver.azureedge.net/103.0.1264.51/edgedriver_win64.zip which doesnt exist (in checking my own up to date edge driver it is .49, so .51 doesnt exist because the updates didnt get that high yet.
That version exists for MAC and Linux, but not Windows. For a fix I think you can set the type to be Windows only or something so it stops picking up a version that doesnt exist for Windows. This fix is in theory as I haven’t tried it yet. Hope it helps.
Nicole
Editing this to give an update: I tried this and there’s no way to set the OS and it is recognizing the OS since the URL extension is win64…I think this is a bug with webdriver manager that needs to be resolved on their end because it’s recognizing the OS properly and even if you manually set it in code to grab latest it tries to grab the latest which was only released to Linux and Macs (seems like they need to include a filter to find latest and match on OS, not sure where to report this though to get it fixed). If you manually set the version to «100.0.1154.0» which is the latest for win64 then it works again. You can see all the releases at their website (https://msedgedriver.azureedge.net), but like I said its a but where latest or default is looking at date only and not filtering by the OS so when they drop a new one and its not for all the OS’s then it breaks (this is my assumption, having trouble finding it in their source code which I dont think is available via VS when you install the package).
If anyone finds anything please chime in! Would love to know if there was a workable solution to filter ourselves until it’s fixed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
// using System.IO; using System.Xml.Linq; using System.Net; using System.Web; namespace rsh { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { button1.PerformClick(); } private void button1_Click(object sender, EventArgs e) { string[] st = richTextBox1.Lines; string langTo = "ru"; // Я зык на который нужно перевести Test1(st, langTo); } public void Test1(string[] args, string langTo) // static void Test1(string[] args, string langTo) { try { // инфо сообщение // string languagesForTranslate = "албанский sq,nанглийский en,nарабский ar,nармянский hy,nазербайджанский az,nафрикаанс af,nбаскский eu,nбелорусский be,nболгарский bg,nбоснийский bs,nваллийский cy,nвьетнамский vi,nвенгерский hu,nгаитянский(креольский) ht,nгалисийский gl,nголландский nl,nгреческий el,nгрузинский ka,nдатский da,nиврит he,nиндонезийский id,nирландский ga,nитальянский it,nиспанский es,nказахский kk,nкаталанский ca,nкиргизский ky,nкитайский zh,nкорейский ko,nлатынь la,nлатышский lv,nлитовский lt,nмалагасийский mg,nмалайский ms,nмальтийский mt,nмакедонский mk,nмонгольский mn,nнемецкий de,nнорвежский no,nперсидский fa,nпольский pl,nпортугальский pt,nрумынский ro,nрусский ru,nсербский sr,nсловацкий sk,nсловенский sl,nсуахили sw,nтаджикский tg,nтайский th,nтагальский tl,nтатарский tt,nтурецкий tr,nузбекский uz,nукраинский uk,nфинский fi,nфранцузский fr,nхорватский hr,nчешский cs,nшведский sv,nэстонский et,nяпонский ja"; // Console.WriteLine("Перечень языков переводаnn" + languagesForTranslate + "n"); // string text = File.ReadAllText(args[0]); string text = args[0]; TextTranslationAPI api = new TextTranslationAPI(); TranslateCommand languageOfText = new TranslateCommand { Type = RequestType.Detect, Parameters = new Dictionary<string, string> { { "text", text } }, ResultSelector = x => x.Attribute("lang").Value }; string languageFrom = api.GetResult(languageOfText); //Console.WriteLine("Язык текста для перевода " + languageFrom + "n"); //Console.WriteLine("Выберите из перечня языков, язык на который будет переводится текст в вашем файле:n"); //Console.WriteLine("Пример: -enn"); // string languageTo = Console.ReadLine(); // ИСХ string languageTo = langTo; string translateLanguage = languageFrom + languageTo; TranslateCommand translate = new TranslateCommand { Type = RequestType.Translate, Parameters = new Dictionary<string, string> { { "lang", translateLanguage }, { "text", text } }, ResultSelector = x => x.Element("text").Value }; string result = api.GetResult(translate); richTextBox2.Text = result; string adresOutPutFile = string.Format(@"C:Temp{0}.txt", translateLanguage); File.WriteAllText(adresOutPutFile, result); } catch (Exception ex) { richTextBox3.Text += ex.ToString(); richTextBox3.Text += "ОШИБКА, НЕВЕРНО ВВЕЛИ ЯЗЫК НА КОТОРЫЙ БУДЕТ ПЕРЕВОДИТСЯ ТЕКСТ В ВАШЕМ ФАЙЛЕ: " + ex.Message; // Console.WriteLine("ОШИБКА, НЕВЕРНО ВВЕЛИ ЯЗЫК НА КОТОРЫЙ БУДЕТ ПЕРЕВОДИТСЯ ТЕКСТ В ВАШЕМ ФАЙЛЕ: " + ex.Message); } } enum RequestType { Translate, Detect } struct TranslateCommand { public RequestType Type; public Dictionary<string, string> Parameters; public Func<XElement, string> ResultSelector; } class TextTranslationAPI { private readonly string Url; private readonly string Key; public TextTranslationAPI(string url, string key) { Url = url; Key = key; } public TextTranslationAPI() : this(@"https://translate.yandex.net/api/v1.5/tr/translate/", "trnsl.1.1.20180930T111308Z.5e8e8b704ad292c9.f7780e2f1ef62bd0d0301cae74e677ef8a62be7a") { } private string GetAction(RequestType type) { switch (type) { case RequestType.Detect: return "detect"; case RequestType.Translate: return "translate"; default: throw new ArgumentOutOfRangeException(); } } public string GetResult(TranslateCommand command) { string strUrl = Url + GetAction(command.Type) + "?key=" + Key; foreach (var parameter in command.Parameters) strUrl += "&" + parameter.Key + "=" + HttpUtility.UrlEncode(parameter.Value); WebClient webClitnt = new WebClient(); webClitnt.Encoding = Encoding.UTF8; string stringXml = webClitnt.DownloadString(strUrl); // ОШИБКА XDocument document = XDocument.Parse(stringXml); string textTranslate = command.ResultSelector(document.Root); return textTranslate; } } } } |