Windows phone 7 Bing通过代理在Windows phone Emulator上映射路由

Windows phone 7 Bing通过代理在Windows phone Emulator上映射路由,windows-phone-7,Windows Phone 7,我使用下面给出的代码在Bing地图上绘制路线。当系统直接连接到internet时,在仿真器上运行良好。但当我在最后一行代码的第二行接受公司的代理时,它抛出异常,说:需要代理授权:407 BingMaps.RouteService.RouteServiceClient routeService = new BingMaps.RouteService.RouteServiceClient("BasicHttpBinding_IRouteService"); BingMaps.

我使用下面给出的代码在Bing地图上绘制路线。当系统直接连接到internet时,在仿真器上运行良好。但当我在最后一行代码的第二行接受公司的代理时,它抛出异常,说:需要代理授权:407

BingMaps.RouteService.RouteServiceClient routeService = new BingMaps.RouteService.RouteServiceClient("BasicHttpBinding_IRouteService");
            BingMaps.RouteService.RouteRequest RouteReq = new BingMaps.RouteService.RouteRequest();
            RouteReq.Credentials = new BingMaps.RouteService.Credentials();
            RouteReq.Credentials.ApplicationId = ((ApplicationIdCredentialsProvider)Map.CredentialsProvider).ApplicationId;


            RouteOptions rOptions = new RouteOptions();
            rOptions.Mode = TravelMode.Driving;
            rOptions.Optimization = RouteOptimization.MinimizeDistance;
            RouteReq.Options = rOptions;
            RouteReq.Options.RoutePathType = BingMaps.RouteService.RoutePathType.Points;

            // Set the waypoints of the route to be calculated using the Geocode Service results stored in the geocodeResults variable.
            RouteReq.Waypoints = new System.Collections.ObjectModel.ObservableCollection<Waypoint>();
            foreach (Waypoint wp in WPList)
            {
                RouteReq.Waypoints.Add(wp);
            }
            //routeService.ClientCredentials = new System.ServiceModel.Description.ClientCredentials( new NetworkCredential("461167", "July@2012", "india");
            routeService.CalculateRouteAsync(RouteReq);
            routeService.CalculateRouteCompleted += new EventHandler<CalculateRouteCompletedEventArgs>(RouteService_CalculateRouteCompleted);
BingMaps.RouteService.RouteService客户端RouteService=新建BingMaps.RouteService.RouteService客户端(“BasicHttpBinding_IRouteService”);
BingMaps.RouteService.RouteRequest RouteRequest=新的BingMaps.RouteService.RouteRequest();
RouteReq.Credentials=新的BingMaps.RouteService.Credentials();
RouteReq.Credentials.ApplicationId=((ApplicationIdCredentialsProvider)Map.CredentialsProvider).ApplicationId;
RouteOptions rOptions=新RouteOptions();
rOptions.Mode=旅行模式驾驶;
rOptions.Optimization=RouteOptimization.minimizedInstance;
RouteReq.Options=rOptions;
RouteReq.Options.RoutePathType=BingMaps.RouteService.RoutePathType.Points;
//使用geocodeResults变量中存储的Geocode服务结果设置要计算的路线的航路点。
RouteReq.Waypoints=新的System.Collections.ObjectModel.ObservableCollection();
foreach(WPList中的航路点wp)
{
航路质量航路点添加(wp);
}
//routeService.ClientCredentials=新系统.ServiceModel.Description.ClientCredentials(新网络凭据(“461167”),”July@2012“,“印度”);
routeService.CalculatorOuteasync(RouteReq);
routeService.CalculateRouteCompleted+=新事件处理程序(routeService\u CalculateRouteCompleted);
我知道我需要设置代理,但我无法确定如何设置。因为未配置RouteService,请接受代理凭据

另外,internet在仿真器上运行良好,我还在仿真器上设置了代理凭据


请建议如何执行此操作,否则无法执行此操作,因为它未使用emulator的代理凭据,甚至未使用存储在系统上的凭据。

您是否在使用身份验证的代理后运行emulator?是的。我在我的公司代理下,需要身份验证。