位错误代码

发布于 2024-10-07 01:58:15 字数 499 浏览 0 评论 0原文

我正在编写一个应用程序更新程序,它使用后台智能下载服务设施将安装包从我们的分发网站拉到用户的 PC 上。

现在或多或少一切都工作正常,但我在让应用程序对所有可恢复错误做出良好反应时遇到了一些问题。具体来说,我希望应用程序能够正确处理代理身份验证的情况。

在 HTTP 中,这很简单:发出请求,获取“407”HTTP 响应代码,提示输入用户名/密码,然后重复,直到您完成或用户按“取消”。

对于 BITS,事情就没那么简单了。我没有收到 HTTP 状态代码。我得到几个代码:上下文(在我的例子中应该是 BG_ERROR_CONTEXT_REMOTE_FILE)和一个应该依赖于上下文的“ErrorCode”。

如果我通过 GetErrorDescription 请求错误的文本描述,我会得到正确的“407 代理身份验证需要”文本。但我的错误代码是 0x80190197,与 407 相差甚远。

那么,有谁知道我可以在哪里获得 BITS 错误代码的完整列表?如果做不到这一点,包含最常见错误的部分列表会很好。

I'm writing an application updater that pulls installation package from our distribution web site to the user's PC using the background intelligent download service facility.

More or less everything is working fine now but I'm having a bit of problem getting the application react well to all recoverable errors. Specifically, I'd like the application to handle properly the case of proxy authentication.

In HTTP, it's simple: make a request, get a "407" HTTP response code, prompt for user name/password and repeat until you ether go through or the user press "cancel".

With BITS, it's not that simple. I don't get the HTTP status code. I get a couple of codes: the context (which should be BG_ERROR_CONTEXT_REMOTE_FILE in my case) and an "ErrorCode" that is supposed to depend on the context.

If I request the textual description of the error through GetErrorDescription, I get the correct "407 proxy authentication require" text. But the error code I have is 0x80190197 which is nowhere near 407.

So, does anyone know where I can get a full list of the BITS error code ? Failing that, partial list with the most common errors would be nice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

若沐 2024-10-14 01:58:15

严格来说,0x80190197 并不是一个 BITS 错误,而是一个 HTTP 堆栈错误。该列表位于此处:错误(019)FACILITY_HTTP

0x80190197 is not strictly speaking a BITS error, it's an HTTP stack error. The list is available here: Errors (019) FACILITY_HTTP

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文