Nic*_*rie 7 coldfusion iis-7 windows-authentication coldfusion-10
在我们的一个内部网页面上,我cffileupload用来上传多张照片:
<cffileupload extensionfilter=".jpg,.jpeg,.png,.gif"
url="/submissions/photo_gallery.cfm"
onerror="errorissue"
width="600"
addbuttonlabel="Browse..."
maxuploadsize="100">
Run Code Online (Sandbox Code Playgroud)
此标记的url指向我处理图像的同一页面:
<!--- Define the upload path --->
<cfset upload_path = "C:\websites\images\photo_gallery\">
<!--- Upload all the files --->
<cffile action="upload"
destination="#upload_path#"
nameconflict="makeunique"
result="uploaded_file">
Run Code Online (Sandbox Code Playgroud)
在IE和Chrome中,这是有效的.在Firefox中,我收到401错误.它似乎与浏览器的身份验证方式有关.IE和Chrome使用Windows身份验证,而Firefox在进入用户名/密码的网站时提示.Coldfusion日志中没有显示任何内容,但IIS日志显示了这一点(IP x出了):
2013-05-09 19:16:07 xxx.xxx.xxx.xxx POST /submissions/photo_gallery.cfm CFID = 5546&CFTOKEN = 75080018 80 - 172.28.30.99 Shockwave + Flash 401 2 5 0
日志中的上一行来自加载页面.如您所见,我的用户名显示在此行中(为安全起见而编辑):
2013-05-09 19:16:07 xxx.xxx.xxx.xxx GET /includes/js/shared.js - 80 DOMAIN\username xxx.xxx.xxx.xxx Mozilla/5.0 +(Windows + NT + 6.1; + WOW64; + rv:20.0)+ Gecko/20100101 + Firefox/20.0 304 0 0 218
所以,cffileupload似乎正在丢失我的用户名.但是,cffileupload url中的session.urltoken与具有多个文件上载器(调用页面)的页面上的session.urltoken相同.所以,你认为认证会坚持下去.
此外,当我进入IIS7并在Jakarta虚拟目录上启用匿名身份验证(并禁用Windows身份验证)时,我可以在Firefox中使用它.但是,这不是一个有用的解决方案.
有谁能建议另一个解决方案
您也可以让 Firefox 使用 Windows 身份验证。默认情况下它没有打开(参考)。
network.automatic-ntlm-auth.trusted-uris通过双击该行并输入进行修改http://www.replacewithyoursite.com,或者http://your-intranet-server-namehttp://www.replacewithyoursite.com, http://www.replacewithyourintranetsite.com要指定所有子域,请使用.replacewithyoursite.com而不是www.replacewithyoursite.com, help.replacewithyoursite.com, pictures.replacewithyoursite.com
如果您的内网没有使用完全限定域名,您可以在 Firefox 中进行以下设置以避免提示(参考)
network.automatic-ntlm-auth.allow-non-fqdn将值编辑为true

| 归档时间: |
|
| 查看次数: |
818 次 |
| 最近记录: |