远程资源的代理身份验证问题-错误407. [英] Proxy authentication problems with remote resources - error 407.

查看:49
本文介绍了远程资源的代理身份验证问题-错误407.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定这是否是正确的论坛...但是,很可能这里有人解决了此问题.

我正尝试使用以下XAML显示图像:

<图像宽度="50";高度="50">
< Image.Source>
< BitmapImage UriSource ="http://www.somedomain.com/image.jpg" />
</Image.Source>
</Image>

www.somedomain.com是一个互联网站点,我需要通过代理才能到达那里.代理返回错误407(需要身份验证).

在这种情况下,解决方案必须基于代码.


="h2_lin">解决方案

一些其他信息:

1.根据一些研究,我添加了以下代码:

公共 部分 class 应用 : 应用

{

class ProxyCredentials : ICredentialPolicy

{

布尔 ICredentialPolicy . ShouldSendCredential ( Uri challengeUri WebRequest request NetworkCredential 凭据 IAuthenticationModule authenticationModule <字体大小= 2>)

{

返回 true ;


Not sure if this is the correct forum... But, most likely, someone here has resolved this problem.

I'm trying to display an image using the following XAML:

<Image Width="50" Height="50">
   <Image.Source>
      <BitmapImage UriSource="http://www.somedomain.com/image.jpg" />
   </Image.Source>
</Image>

www.somedomain.com is an internet site and I need to go though a proxy to get there.  The proxy is returning error 407 (Authentication required).   What do I need to do to use the default IE proxy settings and default credentials?

In this case, the solution would need to be code based.

Thanks.

解决方案

Some additional information:

 

1.  I added the following code as per some research:

 

public partial class App : Application

{

class ProxyCredentials : ICredentialPolicy

{

bool ICredentialPolicy.ShouldSendCredential(Uri challengeUri, WebRequest request, NetworkCredential credential, IAuthenticationModule authenticationModule)

{

return true;


这篇关于远程资源的代理身份验证问题-错误407.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆