简体   繁体   English

将站点更改为匿名访问会导致较小的jQuery问题

[英]Changing site to Anonymous Access causing minor jQuery problems

I have a simple ASP.Net 3.5 site that is essentially of the master/detail variety. 我有一个简单的ASP.Net 3.5站点,该站点实质上是master / detail种类的站点。 A master page shows a GridView of database records, and clicking on Edit for a given row brings up an edit form with a DetailsView. 母版页显示数据库记录的GridView,然后单击给定行的Edit来打开一个带有DetailsView的编辑表单。 Pretty standard stuff. 很标准的东西。 Now, I have the GridView in an UpdatePanel, and launch the edit form with a jQuery FancyBox. 现在,我在UpdatePanel中具有GridView,并使用jQuery FancyBox启动编辑表单。 After saving the edited record, the child page updates the parent, and briefly highlights the edited row. 保存编辑的记录后,子页面将更新父记录,并短暂突出显示已编辑的行。 Lots of AJAXy goodness, and it all works perfectly... 许多AJAXy优点,而且一切正常。

... except when I uncheck "Anonymous access" for the site in IIS. ...,除非我取消选中IIS中站点的“匿名访问”。 Then, the jQuery part gets a bit squirrelly and unpredictable. 然后,jQuery部分变得有些松散和不可预测。 Namely, the row highlighting stops working most of the time. 即,行突出显示大部分时间停止工作。 If I go back and re-enable Anonymous access, it all works fine. 如果我返回并重新启用匿名访问,则一切正常。

I turned off Anonymous access since I'd like to have the site know who the user is based on their Windows login. 由于我想让网站根据用户的Windows登录信息来了解用户身份,因此我关闭了匿名访问。 I find it quite odd that this setting would break jQuery stuff, so I'm probably just not grasping some elementary concept. 我觉得这个设置会破坏jQuery的东西很奇怪,所以我可能只是不掌握一些基本概念。 Would love to hear of anyone else who has had this problem (and hopefully overcome it!). 很想听听其他人遇到过这个问题(并希望能解决!)。

Thanks, Chris 谢谢克里斯

Does the non-Anonymous user account you're using to test the site actually have read access to all the files on the site at the file-system level? 您用来测试站点的非匿名用户帐户是否实际上具有文件系统级别的站点上所有文件的读取权限? This is important -- if ACLs are not consistent, then you may be running into a situation where your browser serves you part of the content from web site successfully (or from your browser cache, which you probably didn't clear), but other parts hit up against an HTTP 403 Forbidden error. 这很重要-如果ACL不一致,那么您可能会遇到这样的情况:浏览器成功为您提供了网站(或您可能没有清除的浏览器缓存)中部分内容。部分遇到HTTP 403禁止错误。 These sorts of failures may happen silently in an Ajax environment. 这些故障可能在Ajax环境中无声发生。

Make sure you're using something like Firebug on Firefox or Chrome's developer tools to see what requests you're making, and the results you're getting. 确保您在Firefox上使用Firebug等工具或Chrome的开发人员工具,以查看正在发出的请求以及获得的结果。 Watch carefully for those 403s -- that's surely a sign of trouble. 仔细注意那些403,这肯定是麻烦的征兆。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM