IMPORTANT: Remove this line from json2.js before deployment
I have an ASP.NET app in which I've used Vertigo's SlideShow 2 silv开发者_运维问答erlight image gallery component. All was working well and the app went through testing and suddenly, after a recent deployment I get an alert box that says:
IMPORTANT: Remove this line from json2.js before deployment.
This pops up after the Silverlight component loads but then the SlideShow2 xap file seems to work fine after that.
Anyone have any ideas on why this would just start happening? I've done some research and can't come up with much and it's pretty mysterious that it just started happening. I've not directly used json2.js in this application nor have I customized the Slideshow 2 component in any way.
It also happens both in my dev and production environments.
-Kevin
Something like this?
From http://tech.groups.yahoo.com/group/json/message/1413:
Thu Dec 10, 2009 5:23 am
The server at JSON.org is getting hammered. It turns out that there are some sites that are linking directly to json2.js instead of dispensing it from their own servers. By far the heaviest impact is from onlinebootycall.com. My intention was to provide the world with a free implementation, but the world can buy its own bandwidth.
So I have added this line as the first line in the json2.js file:
alert('IMPORTANT: Remove this line from json2.js before deployment.');
It will not break anything, but it should help get a message to the onlinebootycalls that you should not load code from strange third party servers. It is not safe.
- "Douglas Crockford" <douglas@...>
Don't link to json.js OR json2.js directly from json.org. It is bad etiquette, it uses their bandwidth for your site.
Copy the file to your own server, remove the line, and redeploy.
p.s. what are you using silverlight for at onlinebootycall.com? Curious... ;)
In doing more research (and taking a step back to evaluate my environment), the implementation of SlideShow2 I am using is a modified one from an opensource CodePlex project. This particular version supports streaming images and albums from Picasa's web albums. The version I'm using is located here: http://slideshow2picasa.codeplex.com/. In checking out their online dmeos they exhibit the same behavior so obviously this implementation is linking to the json2.js file on your servers as a means to interact with Picasa web.
Today I'll take at their code and see if I can rely on a local copy fo json2.js.
Thanks for helping me out.
精彩评论