Common ASP.NET Problems (together in one post)
February 12, 2008
1. You have IIS and ASP.NET 1.1 running OK. Now you want to run ASP.NET 2.0 for one webfolder with 1.1 running remaining site. You started getting “Failed to access IIS metabase”.
Solution : Run aspnet_regiis in asp.net 2.0 folder
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727> aspnet_regiis -ga ASPNET
Then reset IIS
(more to be added soon….)
Updated to IE7 and the Problems….
November 27, 2007
I been still surviving on IE6 until recently (as I use most of the time Opera or Firefox, I never bother to upgrade IE). But as I was playing with Silverlight, I need another browser to test my silverlight applications other than Firefox2. Upgrade is painless (you need to restart though at the end).
After that, any links from my Yahoo messenger were not working… same the case with Visual Studio 2005/2008…. I guess infact any attempt to launch a webpage from outside the browser was unsuccessful…..
How to fix it….. my first guess was may be IE7 deleted or moved IE6 executable (Not replaced….as it wont be problem)…… and all these applications keep trying to lookup IE6 ………..
Well…. I was wrong…… what happend was … IE6 was set as default browser at the time IE7 was installed and IE7 is not set automatically as default browser…….may be it asked me….I dont remember….. so all these applications are trying to launch default browser app…….without much success………..
So to Fix, simply launch IE7…. go to Tools –> Internet Options —> Programs and Make IE7 as default browser……. that should fix all these broken links…………
Trying out Popfly beta
November 19, 2007
I haved tried Yahoo Pipes sometime back when it was beta. Popfly is Microsoft’s stab at creating mashups. Mashups allows you to connect multiple data sources to display units visually without any coding.
Popfly requires Microsoft SilverLight runtime ( Microsoft version of Adobe brought Macromedia’s Flash Player) to be installed to create mashup and also to view it. You also need windows live account.
My first test using IE 6 was not pleasant with blurry ghosty images whenever you move over any of the controls. Also I didnt see any output when clicked on Preview. You could see a popup warning saying “you are not using IE7 or Firefox 2.0. ..your expereince may vary”. My second attempt with Firefox 2 is lot better. It worked smoothly (though I had trouble installing silverlight on Firefox. It ended up the problem is not with silverlight but NoScript addon… NoScript has a setting to forbid Silverlight for untrusted sites and some reason popfly is considered as untrusted site).
Also note that Opera wont work as silverlight is not supported on Opera browser. I use opera for most of the dialy browsing so it would be nice if silverlight support comes for opera in future.
Overall experience with Popfly is good and is bit faster than Yahoo Pipes (atleast when Pipes was beta). Popfly also makes creating template based webpage easier and quick and add as many as mashups embedded in that page.
Look at a simple mashup and webpage I did at http://www.popfly.ms/users/siri/myhomepage
PostgreSQL Log Analysis using Ruby’s PQA
September 25, 2007
Step1 : Install Ruby
Download Source ruby-1.8.5.tar.gz $ tar -xvfz ruby-1.8.5.tar.gz $ cd ruby-1.8.5 $ configure $ make $ make install
Step 2: Install Ruby gems
Download rubygems-0.9.4.tgz $ tar -xvfz rubygems-0.9.4.tgz $ cd rubygems-0.9.4 $ ruby setup.rb
Step 3: Install Practical Query Analysis
Download pga gem $ gem install pqa-1.6.gem
Step 4: Configure PostgreSQL
In postgresql.conf file, makesure these settings are on
log_statement true log_duration true log_pid trueRestart PostgreSQL to make these changes in effect.In my case postgresql is setup as a service to start at boot. so restarting is easy.
service postgresql restart
Step 5: Use PQA to anlayze log
pqa -file /path/to/your/logfile -normalize -top 5To generate a HTML Report
pqa -file /path/to/your/logfile -normalize -top 5 -format html > /tmp/myReport.html
Thats it!. You could find slowest queires, most run queries and other cool stuff from this great tool. you could out details and detailed documentation at http://pgfoundry.org/projects/pqa/
Share Linux Folders to Windows Users
July 27, 2007
Problem : How to access my files on Linux Box from my Windows XP pc. But I dont anyone else access those.
Step 1: On Linux Box
a) Install Samba Server (If not installed)
Start Package Manager by going to Applications -> Add/Remove programs
Choose “Servers” and make sure “Windows File Server” is checked. If not check and Click Apply. It will download and install samba and dependencies.
b) Configure Samba
Launch Samba Configuration screen
System -> Adminstration -> Server Settings -> Samba
Then that screen
Preferences -> Server Settings
In ‘Basic’ , Section choose a unique name for your share
In ‘Security’ Section choose ‘User’ and make sure ‘Encrypt Password’ is’Yes’ and ‘Guest Account’ is ‘No Guest Account’. There are usualy default options already selected
Then ‘Preferences’ -> Samba Users
Here select your linux system user name and choose a username for windows ( I chose same name as linux user but its upto you… say you choose linux user is ‘bob’ and name given for windows user name is ‘David’ and password is say ‘ Hillary’….. this passwor NEED NOT be your linux password or any other password you use on windows…its just a password for this share for David……)
c) Now add a ShareIn Samba Server Configuration Screen , Select ‘Add Share’ and Choose directory you want to access from windows…. and give a some description…….
Then in Access Tab, select “Only allow access” to ‘David’
d) Now Start Samba Server
Launch Services Configuration by selecting
System–> Administration –> ServerSettings -> Services
In lefthand side, make sure to check ’smb”… it would start the smb and other required services
e) Change Firewall Setting to allow Samba to be accessed
Launch firewall settings by selecting
Sytem -> Administation -> Security Level and Firewall
Then in trusted Services, Select ‘Samba’ and click Ok
Step 2: On Windows Box
Now access you share using VNC name…… \\yourlinuxboxname or IP\ it prompts you for userid password….. use ‘David’ and ‘Hillary’…… thats it!
Rails — Linrails & InstantRails
July 11, 2007
InstantRails is a Windows Package for rails learners to get started. It has pretty much everything to run rails (Ruby, rails, mysql server, and even PHP for mysql admin and finally apache to proxy requests to mogrel). I forgot…. it has a IDE (RadRails) bundled too.. Check out InstantRails
Now there is similar entry for Linux guys…. LinRails. It also has everything need to get started( ruby, rails, mysql) exept Webserver though. So you could use builtin mongrel or webrick. Try linRails
MySql vs Postgres
June 19, 2006
Wait… Its not one of many arguments over which one is better. Both are excellent open source database systems with rich set of features competing commmercial databases. (it look like MySQL has more marketing power than postgres though….) . The point I want to make is how both are different. I been using Postgresql from almost 5 years. When we tried to pick between MySQL and Postgres back then, I picked Postgresql as it has support for Foriegn Keys, triggers and stored procedures. So in the last five or so years when people asked me why Postgres over MySQL, I could proudly point to those features MySQL lacked. But NOT anymore! Looks like MySQL 5 has all these covered. Now it has support for Views, Stored Procedures and Triggers. ( See http://dev.mysql.com/doc/refman/5.0/en/mysql-5-0-nutshell.html) More over they added more features from MaxDB (SA- DB from MySQL AB) like Event Scheduler in 5.1 version. So now its purely personal preference of which one to pick.