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. 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. Pretty standard stuff. Now, I have the GridView in an UpdatePanel, and launch the edit form with a 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...
... except when I uncheck "Anonymous access" for the site in IIS. Then, the jQuery part gets a bit squirrelly and unpredictable. 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 Anonymou开发者_开发技巧s access since I'd like to have the site know who the user is based on their Windows login. I find it quite odd that this setting would break jQuery stuff, so I'm probably just not grasping some elementary concept. 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. These sorts of failures may happen silently in an Ajax environment.
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. Watch carefully for those 403s -- that's surely a sign of trouble.
精彩评论