WPF应用程序中的bing映射无效的凭证 [英] Invalid Credentials for bing maps in wpf application
本文介绍了WPF应用程序中的bing映射无效的凭证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
无法显示地图.我仍然有一条错误消息: 无效的凭据.在以下位置注册开发人员帐户: http://www.microsoft.com/地图/开发人员"
Impossible to display the map. I still have a error message: "Invalid Credentials. Sign up for a developer account at: http://www.microsoft.com/maps/developers"
但是,我正确地创建了一个帐户并获得了一个有效的密钥:
However, I created a account correctly and obtained a valid key:
- 应用名称:地理位置
- 密钥: *我的密钥*
- 应用程序网址:
- 键类型:基本/开发/测试
- 创建日期:2015年8月12日
- 有效期:无
- Application name: Geography
- Key: *My key*
- Application Url:
- Key type: Basic / Dev/Test
- Created date: 08/12/2015
- Expiration date: None
我的xaml代码:
<Window x:Class="Geography.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
Title="MainWindow" Height="350" Width="525">
<Grid>
<m:Map CredentialsProvider="*My key*">
</m:Map>
</Grid>
</Window>
推荐答案
这是我忽略其存在的代理.
It was a proxy whose I ignore the existence.
因此,我在app.config文件中设置了以下配置,并且不再显示错误消息:
So, I set the following config in my app.config file and the error message no longer appears:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy bypassonlocal="True" proxyaddress="http://ProxyAddress:Port"/>
</defaultProxy>
</system.net>
这篇关于WPF应用程序中的bing映射无效的凭证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文