I am pretty sure I have been a registered Gamespot.com user longer than some of the Gamespot staffers have been alive. I liked the site at one time: enough to pay annually to use it, which was required when it went live in the early hours of the internet. I still like their coverage of the news and events as well as their reviews. Although the site has taken a huge dive since Greg Kasvin left as the reviews became more generic and there has been assholery in droves related to them holding more regard for their advertisers than their users or staff.
So why are they the Devil? I just happened upon a message I had received a while ago notifying me how bad a person I am for making a cardinal sin and violating their terms of service. I didn't notice the thing because I mainly use RSS to get news, and I only still login to the site for the "Dark" color theme. I stopped using the "social" features of Gamespot a long time ago after getting these messages daily. I loved posting comments on news articles and that was how I spent most of my time on the site back then. However, I had a guy basically start following me around and hassling me. When I finally reported him he made it clear that he was friends with many people at Gamestop and sure enough every post I made after that equaled a TOS violation even though no one at Gamespot could tell me why other than the one word category it was classified as; nor could they tell me what I needed to do to not get flagged other than to stop posting, so I did.
My worse offense that had a good portion of the stupid "points" I was awarded for using the site taken away? Be prepared and shield your children because this is pretty bad. It was an article back when the PSN got hacked, and was not the first article about it. The story was about how much Sony respected its users by not upgrading their server software nor encrypting passwords. What did I comment? What heinous and cruel statement won me my harshest punishment in the "Trolling" category? Are you ready? It was:
LOL
Yep, just a laugh. Sure that might be insulting for anyone that trusted a company that made a track record of this behavior, but I am sure every other person in the world had a giggle. It was not directed at any body nor meant to offend. It was an honest reaction to the story, but someone that did not like me knew someone at Gamestop and I was punished. I never try to be a dick. Very often my opinions are not in the majority or may seem strange to some people, but I always try to be respectful and usually have more regard for other people's dissenting positions than they have of mine.
The worst part is Gamespot rewards people for reporting others by way of these "points". Being a fan of XBL and Gamescore, I can understand the appeal; however, gaining achievements involves a little more dedication that responding to surveys, commenting on news and trying to get people in trouble. Like it is possible to not piss off SOMEONE when you post to the internet. Its a bad system and why I have never been a fan of sites like Reddit or Digg where the system can be gamed for personal gain: even if the reward is something stupid like Karma points or Bozo Buttons.
What was my latest offense? I happened to mention a Kickstarter project in a post. SPAM/Advertisement they said. I guess. Although it did not benefit me, it was not my project and the only thing I would have gained is money being withdrawn from my bank account when the project succeeded. It was in topic, in the proper forum and very polite, but I guess someone was offended because I used the word Kickstarter. Probably their advertisers which should be threatened by the possibility developers could get money without them thus cutting them out of the market. Of course, this was only one of many posts I made about other Kickstarter projects, and none of the others were flagged or deleted. I even defended users who were pro-Kickstarter against those that used cursing and death threats. None of those users posts were removed; nor any of my other posts. Just one lone post about an iOS/Android game people in the topic might be interested it. Maybe I should have sprinkled some profanity and insults in so it would get lost among the others.
But oh well. I don't pay for an account now (since they ended up giving the privilege I paid for away for free), don't care about their points and don't get more than a color scheme for my account. So they can just shove it. However, its another example of how closed sites and communities chill free speech and spit on the foundation the internet was built on. I am all for allow users to ignore or filter content, but as a user-content provider/maintainer I think you have a responsibility to allow people to speak their mind; especially if they are being decent members of the community and are only guilty of offending 1 person. In the end, it is up to us to respect each other, live peacefully with one another and try not to be offended because someone thinks differently.
END RANT
Wednesday, August 1, 2012
Access SPListItem Attachment in Sharepoint 2010
My scenario was simple. Our company uses a financial vendor which has a web service for retrieving our Stock information and republishing it on our Sharepoint 2010 Intranet site. I successfully built a Timer Job that runs every 5 minutes during market open and close (deleting items older than a few days when market is closed) and it adds an item to a Sharepoint list attaching an XML file containing the results of the web service call. Working with past Stock applications in other languages I have found having the original, archived XML results is important to debug issues with the data provider.
The Timer Job works great and saves the files perfectly. Now I needed a Visual Web Part the user could add to their pages which would consume this XML file for the most recent entry, parse the information necessary then show the Stock Price in a pretty fashion per our marketing company's design. Honestly, I did not expect it to be difficult as I have done this a lot outside of .NET and Sharepoint. I setup the code to connect to my list, query the most recent item so I could grab its attachments. All good. With plenty of examples on the Google-nets, I quickly discovered how to get the URL of the attachment and could pass this to an XmlDocument object via Load() which lead to this code:
However, my code would not work and I continually received 404 errors trying to load the document via URL. I could take the same URL I was generating and put it in a browser window and successfully get to the list, but the code did not see it. I looked through logs, used Fiddler and even tried using HttpWebRequest and the LoadXml command as well with nothing shedding light on why this was erroring. I could not find any information from other people having this problem and even posted on MS' forums with no replies (although I was impatient and did not give it long).
My Timer Job was able to access urls outside the network, but this took some tricks by our Network and Server guys due to proxy issues. As such, I assume that maybe there was some permission/proxy issue hiding the list from my code, so I dug for other ways to try and load up this attachment. I found some references to people doing the same type of thing in Sharepoint 2003. Although I hate using old code since you never know what problems may exist using it in newer versions of Sharepoint and .NET, I was racing against my vacation and did not want to leave this hanging for weeks before I got back to it. So I replaced my code with the following which appears to be accessing the file in the list by its local folder structure and passing the binary stream to the XmlDocument Load command.
So far this is working and I have been able to use XPathNavigator to get the nodes I needed from the XML file. As is my MO, I posted this hoping to help anyone running into this issue and to get feedback from anyone that might have a better understanding of what is going on or a better way to accomplish this.
The Timer Job works great and saves the files perfectly. Now I needed a Visual Web Part the user could add to their pages which would consume this XML file for the most recent entry, parse the information necessary then show the Stock Price in a pretty fashion per our marketing company's design. Honestly, I did not expect it to be difficult as I have done this a lot outside of .NET and Sharepoint. I setup the code to connect to my list, query the most recent item so I could grab its attachments. All good. With plenty of examples on the Google-nets, I quickly discovered how to get the URL of the attachment and could pass this to an XmlDocument object via Load() which lead to this code:
However, my code would not work and I continually received 404 errors trying to load the document via URL. I could take the same URL I was generating and put it in a browser window and successfully get to the list, but the code did not see it. I looked through logs, used Fiddler and even tried using HttpWebRequest and the LoadXml command as well with nothing shedding light on why this was erroring. I could not find any information from other people having this problem and even posted on MS' forums with no replies (although I was impatient and did not give it long).
My Timer Job was able to access urls outside the network, but this took some tricks by our Network and Server guys due to proxy issues. As such, I assume that maybe there was some permission/proxy issue hiding the list from my code, so I dug for other ways to try and load up this attachment. I found some references to people doing the same type of thing in Sharepoint 2003. Although I hate using old code since you never know what problems may exist using it in newer versions of Sharepoint and .NET, I was racing against my vacation and did not want to leave this hanging for weeks before I got back to it. So I replaced my code with the following which appears to be accessing the file in the list by its local folder structure and passing the binary stream to the XmlDocument Load command.
So far this is working and I have been able to use XPathNavigator to get the nodes I needed from the XML file. As is my MO, I posted this hoping to help anyone running into this issue and to get feedback from anyone that might have a better understanding of what is going on or a better way to accomplish this.
Subscribe to:
Posts (Atom)