Posted by admin on Oct 22, 2010 in code
Again this is another note to myself, however it may be useful to others.
Yesterday I was attempting to run a Ruby script to check for ASP .Net Padding Oracle problems on a site and I got the following issue.
undefined method `lines’ for #<String:0x240d448>
I had looked at the Ruby Source code and all looked ok however there was still the issue when running the script.
It turns out that in Ruby Versions prior to Ruby 1.8.7 String doesn’t have a lines method and hence the error received. I was running Ruby 1.8.5
So the fix was a simple upgrade to the latest version of Ruby and then to run the script again and voilla the error is no more an issue.
Hope the above tip helps, if your receiving the same error.
Posted by admin on Oct 4, 2010 in code
Visual Studio 2005
Yesterday I brought into work an application that I had developed at home. The application was written in VB.Net using Visual Studio 2008.
My work Development environment is Visual Studio 2005 and I needed to update the source code so I tried to load up the solution file and I received the error “The Selected file cannot be opened as a solution or project. Please select a solution file or project file “.
I know from past experience that .sln (solution) files are just text files with references to other code and the development environment.
So if you ever receive the above message and your moving code from Visual Studio 2008 to 2005 then load the sln file in a decent text editor (Notepad ++ will do)
change the top to lines from
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
save the solution file and now open it in your 2005 development environment.
You may have to refactor some code if you have used new objects or syntax which are new to 2008.
However you should be able to to just code as normal.