Thursday, 24 October 2013

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'adGallery' - MVC 4

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'adGallery'

If you get this error then do not include the supporting jquery in the classic way like
-- @*<script type="text/javascript" src="~/Scripts/jquery-1.7.1.min.js"></script>

Instead add your jquery to the bundle . See this to find out how to add your adGallery jquery to bundle.
-- http://stackoverflow.com/questions/12192646/why-use-scripts-render-bundles-jquery

Wednesday, 23 October 2013

WebGoat.net set up

I was setting up WebGoat.net on my machine. Offcourse there is Dinis's good blog on this(http://blog.diniscruz.com/2013/06/webgoatnet-in-action-and-how-i-set-it-up.html). But still i ran into the following issues

1. After i downloaded the code i did not know what is sqlite3. I downloaded it from their site. I downloaded the code and the dll

2. I downloaded the code and rebuilt it using visual studio to get the sqlite3.exe

3. I placed the dll in bin and i placed the sqlite3.exe in ...\WebGoat.NET-master\WebGoat.NET-master\WebGoat\DB_Scripts

4. I ran into issues at this line of code in SqliteDbProvider.cs
SqliteConnection .CreateFile(_dbFileName);

It threw a permission error. That is becase the _dbFileName points to a folder and not a file.

5. What is expected here is the DB name. I gave the name as classicmodels.db

6. You need to specify the name in Default.config

7. I browsed to ...\WebGoat.NET-master\WebGoat.NET-master\WebGoat\DB_Scripts form the command prompt , here i created the DB with the following command
> sqlite3 classicmodels.db

8. Then i created the db with the following command
> .read create_webgoatcoins_sqlite3.sql
it did not work the first time, hence i executed it again as a true progammer and without knowing why
> .read create_webgoatcoins_sqlite3.sql

Bingo it created the db

9. Then i tried to load the data by running
> .read load_webgoatcoins_sqlite3.sql

it errored out . No matter how many times!

10. Then i went to the UI and clicked on Rebuild database and bingo i was on my Suzuki Samurai(the bike by work no problem)



 


Monday, 21 October 2013

Getting serious about social media

I don't think social media is a place to get serious about. Especially some of the casual social media like the Facebook, twitter etc. These places are there to have some fun and that is it. I don't think it is a place to have serious discussions about anything like politics, religion or anything else. Primarily because people get to the social media casually. They take social media casually. I see people expressing some strong views about religion, politics and some even bringing their personal lives on it. I think the latter one is ridiculous. Why would anybody want to bring their personal lives on the social media. I also see people putting all their day to day information on the social media. This is so dangerous in these days of identity theft etc. Believe me identity theft is the next big thing. Go read about it online.
If you do wish to express strong political, religious or social views, go to the respective forums. Get to the parliament if you are serious about politics. If you want to get serious about religion go to the mosques or other places where people are serious about it. Just imagine, you have a religious posting in your facebook account and at the same time there is a picture of an inappropriately dressed woman on the side advertising a product. You would not feel good right.
You can go on and on about social media, the bottom line is do not take it seriously guys.. and do not put too much of personal information over there.