"Access is Denied" javascript error in IE6.0

本文探讨了在Internet Explorer 6中遇到的Access is Denied JavaScript错误现象,详细分析了错误产生的原因,包括跨域限制及窗口操作限制等,并提供了相应的解决方法。
Today I encountered a javascript error: "Access is Denied" in IE6.0.

This module I run allows the user to download a excel file which contains some table concerned in DB and their all fields, also allows to set a alias for each field, and upload the file contains these aliases.

At first, the browser was navigated to the select table page, there're two buttons('Download Table Template' and 'Upload Defined Alias' button) and a list which contains all tables. These two operations use one form and change it's action attribute with javascript.

Select one table and Click the 'Download Table Template' button, The save dialog will be shown, if this operation was canceled there will be no javascript error and can do any other operation. But the file was saved, the other operation and download operation will be stopped because of the javascript error "Access is Denied"(the line number shows cannot access the form).

The same operation was done in IE7.0 and firefox2.0, no javascript found. WHY? Could somebody help me?

Below is a FAQ found in 'http://www.dannyg.com/ref/jsminifaq.html'.

Q. What does the IE "Access is Denied" error mean?
A. The "Access Denied" error in any browser usually means that a script in one window or frame is trying to access another window or frame whose document's domain is different from the document containing the script. What can seem odd about this is that you get this error in IE for Windows frequently when a script in one window generates a new window (with window.open()), and content for that other window is dynamically created from the same script doing the opening. The focus() method also triggers the error.
The error can also occur if scripts try to access objects, properties, or methods that have been locked down by Microsoft's security platoon. For instance, the document.styleSheets.rules property used to be accessible in IE 5 and IE 5.5, but is not in IE 6.

For the new window problem, there is a bit of history associated with the problem and workarounds. For example, the problem occurs frequently when the scripts are being run from the local hard disk. You get a clue about the situation in the titlebar of the new window: It forces an about:blank URL to the new window, which is a protocol:domain that differs from wherever your main window's script comes from. If, however, you put the same main window document on a server, and access it via http:, the problem goes away.

There is a workaround for the local-only problem: In the first parameter of the window.open() method call, load a real document (even if it is a content-free HTML document) into the sub-window before using document.write() to generate content for the subwindow. The loading action 'legitimizes' the window as coming from the same domain as your main window's document.

(This solution does not affect scripts that load a page from a secure server into a separate window or frame. An http: protocol in one window and https: in the other--even if from the same server.domain--yield a security mismatch and "Access Denied." Setting the document.domain properties of both pages may solve the problem (but I am unable to test it for sure).)

For other situations (such as the document.styleSheets.cssRules problem, there are no workarounds, so you'll have to find another way around your task.

One more source of this error in IE occurs if you assign a too-long search string to a URL or a form (using the GET method) has lots of elements and data. The HTTP GET method has a built-in limit of approximately 512 characters. If you run into the problem, change the method to POST, which has no data length limit. But POST won't reflect the search string in the URL of the replacement page (in case you're expecting to parse that data as a way to convey data from one page to the next).
// var roi = roi_SY var roi = table var S2_Collection = ee.ImageCollection('COPERNICUS/S2') .filterDate('2025-03-18', '2025-03-19') .filterBounds(roi) .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 5)) .map(clipImage) //.map(lswi) .map(ndvi) // .map(ndyi) // .map(bsi) // .map(evi) // .select('LSWI','NDVI','NDYI','BSI','EVI'); // .select('NDVI'); print('S2_Collection', S2_Collection); Map.centerObject(roi, 10); // 设置地图中心 Map.addLayer(roi) // Map.addLayer(S2_Collection, {bands: ['B4', 'B3', 'B2'], min: 500, max: 2500}, 'ls_S2_RGB_20250402'); Map.addLayer(S2_Collection, {bands: ['NDVI'], min: -1, max: 1}, 'ls_S2_NDVI_20250402'); function clipImage(image) { return image.clip(roi); } var medianImage = S2_Collection.mosaic(); // 设置导出云 Export.image.toDrive({ // image: medianImage.select(['B4', 'B3', 'B2']), image: medianImage.select(['NDVI']), description: 'ls_NDVI_20250319', folder: 'GEE_Exports', // Drive中的文件夹名称 fileNamePrefix: 'ls_NDVI_20250319', region: roi, scale: 10, // 分辨率(Sentinel-2 的原始分辨率) maxPixels: 1e13 }); // Export.image.toAsset({ // image: S2_Collection, // description: 'Lishui_s2', // region: roi, // scale: 10, // maxPixels: 1e13 // }); //计算植被指数 function lswi(image){ return image.addBands(image.normalizedDifference(['B8', 'B11']).rename('LSWI')); } function ndvi(image){ return image.addBands(image.normalizedDifference(['B8', 'B4']).rename('NDVI')); } function ndyi(image){ return image.addBands(image.normalizedDifference(['B3', 'B2']).rename('NDYI')); } function bsi(image) { // 计算BSI var bsiCalculation = image.expression( '((RED + SWIR) - (NIR + BLUE)) / ((RED + SWIR) + (NIR + BLUE))', { 'RED': image.select('B4'), 'SWIR': image.select('B11'), 'NIR': image.select('B8'), 'BLUE': image.select('B2') }).rename('BSI'); // 将BSI波段添加到图像中 return image.addBands(bsiCalculation); } function evi(image) { var Evi = image.expression( 'G * ((NIR - RED) / (NIR + C1 * RED - C2 * BLUE + L))', { 'NIR': image.select('B8'), 'RED': image.select('B4'), 'BLUE': image.select('B2'), 'G': 2.5, 'C1': 6.0, 'C2': 7.5, 'L': 10000.0 }).rename('EVI'); // evi = evi.clamp(-1, 1); return image.addBands(Evi); } 报错Error: Permission denied to create object in folder: 11rtYnXFvytqRymcjVlz_b74IJg0wkppJ (Error code: 3)怎么解决
07-05
<think>嗯,用户遇到了“Access is denied”的错误问题,想要解决办法。首先得弄清楚这个错误出现的场景,因为不同的情况解决方法可能不同。比如,用户是在访问文件、运行程序、连接数据库,还是网络共享时遇到这个问题?根据提供的引用,有几个可能的情况。 引用[1]提到用户需要拥有ACTUATOR角色,可能涉及权限不足的问题。引用[2]是关于SMB/CIFS挂载时的权限被拒绝,可能需要修改Windows注册表或者调整共享权限。引用[3]来自一个网页错误,可能涉及资源访问权限或IIS配置。引用[4]提到在IIS下调用Excel时出现访问被拒,可能与IIS应用程序池的身份或Excel的DCOM配置有关。引用[5]是MySQL的访问被拒,需要重置密码或者调整用户权限。 首先,用户需要明确错误发生的具体环境。例如,如果是文件或文件夹访问被拒,检查文件权限和所有权;如果是应用程序或服务,可能需要以管理员身份运行或调整服务账户权限。对于网络共享问题,确保共享权限和防火墙设置正确。数据库访问问题则需要检查用户权限和密码是否正确。 另外,需要检查系统日志或应用程序日志,获取更详细的错误信息,这有助于定位问题根源。例如,Windows事件查看器可以提供具体的错误代码或模块,帮助进一步排查。 步骤上,先确定错误发生的具体操作和环境,然后按照对应的解决方法处理。比如,如果是文件权限问题,右键文件属性,安全标签页,编辑权限,添加用户并赋予完全控制权。如果是服务或应用程序,尝试以管理员权限运行。对于数据库问题,如MySQL,可能需要跳过权限验证启动服务,修改用户密码。 还要注意,有些情况下杀毒软件或安全软件可能会阻止访问,暂时禁用它们进行测试也是一种方法。此外,确保相关服务(如MySQL、IIS)正在运行,并且端口没有被阻塞。 如果用户是在编程或开发环境中遇到此错误,比如VFPBS调用Excel,可能需要配置DCOM权限,允许IIS应用程序池身份访问Excel组件。这涉及到组件服务中的设置,调整Excel应用程序的启动和激活权限,以及访问权限。 总结来说,解决“Access is denied”需要系统性地检查权限设置、用户账户控制、服务配置以及可能的系统策略限制。根据不同的场景采取对应的调整措施,同时查看详细的错误日志以辅助诊断。</think>### 访问被拒绝错误(Access Denied)解决方案 #### 1. **确定错误场景** - **文件/文件夹访问**:检查文件权限设置,确保当前用户有读取/写入权限[^2][^4]。 - **网络共享/SMB访问**:调整Windows注册表或共享文件夹权限,确保用户有访问权限。 - **数据库访问**:验证用户名和密码,或通过跳过权限验证重置密码(如MySQL)[^5]。 - **应用程序/服务调用**:检查程序运行权限(如以管理员身份运行)或调整IIS应用程序池身份。 #### 2. **通用解决步骤** - **权限检查**: - 右键目标文件/文件夹 → 属性 → 安全 → 编辑权限,添加当前用户并赋予完全控制权。 - 对于网络共享,确保共享权限和安全权限一致,并在Windows注册表中启用明文凭证(路径:`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa`,设置`DisableLoopbackCheck=1`)。 - **用户账户控制(UAC)**: - 以管理员身份运行程序或服务。 - 禁用UAC临时测试(控制面板 → 用户账户 → 更改用户账户控制设置)。 - **服务/进程身份**: - 对于IIS调用Excel,需在组件服务(`dcomcnfg`)中配置Excel的DCOM权限,允许IIS应用程序池账户(如`IUSR`)访问[^4]。 - **数据库权限修复**(以MySQL为例): ```bash # 停止MySQL服务后,跳过权限验证启动 mysqld --shared-memory --skip-grant-tables # 登录并重置密码 ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码'; FLUSH PRIVILEGES; ``` 参考。 #### 3. **高级排查** - **日志分析**: - 查看Windows事件查看器(Event Viewer)或应用程序日志,定位具体错误模块[^3][^4]。 - **安全软件干扰**: - 临时禁用杀毒软件或防火墙,测试是否解决权限问题。 - **系统策略限制**: - 检查组策略(`gpedit.msc`)中是否有权限限制(如网络访问策略)。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值