如何在ssl上加载地标图标? [英] How do I get placemark icons to load over ssl?

查看:106
本文介绍了如何在ssl上加载地标图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用Google地球插件的网络应用程序。最近,添加了一个非公共用户登录的新要求,这意味着一些用户现在通过https使用该站点。测试中破坏的是自定义地标图标(他们使用http工作)。



图标托管在为页面提供服务的同一台服务器上。



以下是每个协议的网址。

  http  -  http ://localhost/Images/yellow.png 
https - https://localhost/Images/yellow.png

我可以关注该链接,图像将按预期显示。



图像hrefs在动态生成的kml中声明为图标样式。



我想避免通过http加载图片,因为我认为这会导致Internet Explorer向用户显示混合内容警告。



如何在使用https时正确加载图像?

解决方案

我一直在努力解决这个问题我自己 - 简短的回答是这不起作用。如果内容是由生成任何类型的错误/提示(身份验证,无效证书等)的HTTPS站点提供的,则插件将不会加载内容。



有趣的是,桌面客户端工作正常,并在必要时提示用户提供凭据。但是,两个客户端都不允许使用不受信任的证书从站点提供内容。



我找到的唯一解决方法是:




  • 使用受信任的HTTPS托管内容的服务器上的证书(要么信任客户端系统上的证书,要么只使用真实证书。)

  • 不要使用HTTPS基本身份验证,因为这将始终生成401 /质询响应Web浏览器客户端将忽略哪些

  • 如果需要身份验证,请使用NTLM身份验证和常见(例如,域)登录。如果您在Interent Explorer中(或在.NET WebBrowserControl中)加载插件,将正确处理身份验证并显示图像。



<上周,我参加了Google地球管理员培训,培训师证实了这个错误。它应该在插件的下一个版本中修复(它实际上可能已经修复 - 你使用的是什么版本的插件?)


I'm working on a web application that uses the google earth plugin. Recently, a new requirement to have non-public users logon was added, which meant that some users were now using the site over https. Among the things that broke in testing were the custom placemark icons (They were working using http).

The icons are hosted on the same server which servers the page.

Here are the urls for each of the protocols.

 http - http://localhost/Images/yellow.png
 https - https://localhost/Images/yellow.png

I can follow that link and the image will appear as you would expect.

The images hrefs are declared as icon styles in dynamically generated kml.

I want to avoid loading the images over http because I think that will cause internet explorer to present the user with a mixed content warning.

How do I get the images to load properly while using https?

解决方案

I have been wrestling with this myself -- the short answer is that this won't work. If the content is served off of an HTTPS site that generates any kind of error/prompt (authentication, invalid certificate, etc.) the plugin will simply not load the content.

Interestingly, the desktop client works fine and prompts the user for credentials if necessary. However, neither client will allow content to be served off of site with an untrusted certificate.

The only workaround that I have found is:

  • Use a trusted HTTPS certificate on the server hosting the content (either trust the certificate on the client systems or just use a real certificate.)
  • Do not use HTTPS basic auth as that will always generate 401/Challenge responses which the web browser client will simply ignore
  • If authentication is a requirement, use NTLM authentication and common (e.g., domain) logins. If you load the plugin in Interent Explorer (or in a .NET WebBrowserControl) the authentication will be handled properly and the images will show up.

I was at a Google Earth administrator's training last week and the trainer confirmed this "bug". It is supposed to be fixed in the next version of the plugin (it may actually be fixed already -- what version of the plugin are you using?)

这篇关于如何在ssl上加载地标图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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