Archive for April, 2009

Allow only HTTPS access with .htaccess

If you want any of your web-directory to be accessed only via Secure HTTP (HTTPS) protocol then placing following code in ".htaccess" will make sure that any URL or Web-address will be converted from Http to Https.

IndexIgnore *
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

It will rewrite all URLs with HTTPS instead of HTTP. This may be helpful in case while you want only specific directory to be accessed via Secure HTTP or you want your users to redirect to correct address/protocol when they type in http:// by mistake and port 80 is not accessible.

It is also possible to do same with PHP or any other scripting language we use, but then it depends on the application and approach we choose.

Tags: , ,

Not able to Debug Silverlight 2.0 application in Visual Studio 2008

This happens if you dont have the Silverlight Debugger Attached to the Web project in your solution.

Right Click the Web Project and go to Web tab under properties. Please check the Silverligth Debugger as shown in the Image below, you will be able to Debug

Enable Debuggin on VS 2008 for Silverlight

Enable Debuggin on VS 2008 for Silverlight

Tags:

InitializeError error #2104 in Control ‘silverlightControHost’. Could not download the Silverlight Application

This exception comes due to simple reason that there are MIME Types missing for your silverlight Application which gives you following exception in your IE,

Silverlight Object Exception

Silverlight Object Exception

 

 

 

 

To reslove the same you simply need to add the MIME types to your WebSite on IIS. Select HTTP Headers Tab under the Properties. Click on MIME Types and add

   .xaml            application/xaml+xml

  .xap               application/octet-stream

You also need to enable the Content Expiration

Now your silverlight object will be loaded. If you still face problems try checking up on your permissions

Tags:

Oracle buys Sun

These pictures from the Oracle and Sun's official home page says it all.

Oracle to buy Sun - News on Sun's home

Oracle to buy Sun - News on Sun's Home

Oracle Buys Sun - News on Oracle's Home

Oracle Buys Sun - News on Oracle's Home

I think above 2 pictures, which are sliced from home page of Sun and Oracle says it all. While Sun says "Oracle to buy Sun", Oracle has made a statement on the deal..$

I hope this marriage leads to a win-win situation for both Customers and Oracle-Sun duo as well.

Hope that Java will keep doing better and better but not sure about MySQL as now MySQL is also owned by Oracle.

"World's most famous open source database is now owned by World's biggest Enterprise database..!"

Now, not sure what will happen with MySQL? Wish good-luck for the future of Netbeans as well, as it has turned out really well and now is support whole bunch of dynamic languages. Read the rest of this entry »

Tags: , ,

jQuery UI – 1.7.1 is released..

The good new is that jQuery UI - 1.7.1 is out... and things are looking quite well. But still lot more to go. I am still waiting for lot of official UI widgets and Navigation or Context Menu are in that list.

jQuery is one of my favorite Javascript framework and so I am hoping for better growth of it's UI part as well.

I know discussions and planning are going on the Wiki and I know everyone will have a wishlist like I have. There are lot of options available as an plugins but having them in official UI bundle is a more better. UI Team must be working hard and there is lot of things which needs to be done.. All the best to jQuery UI team for bringing in Good for the future.

I have some complaints as well..but may be sometime later.

Tags: ,

Possible Sybase SQL Anywhere bug

This post represents thoughts based upon my experience and I have not reported this issue to Sybase as of yet, I firmly believes that such result should not return in given case and so I am representing my thoughts with example over my blog here.

Topic: "Sybase SQL Anywhere Database is buggy when we sort results by column which is having granularity close to Zero".

As I am developing PHP Web Applications, some time back I have faced an issue while I was using a control panel of the web application. It was using Sybase SQL Anywhere as the database engine. The problem was wired, I was not able to search a particular menu item which I have to make active/inactive through the list of about 20 or so odd rows. I was switching through pages and the results were sorted by "status" column, which was having value of either "active" or "inactive". I searched by keyword and I got the result immediately in my data-grid..! It was surprising and unexpected. At first what came into my mind was that oh..! there must be something wrong with my application framework or DAL (Data Access Layer).

Then I took the same query and I fired in the SQL Anywhere - Interactive SQL. The results were unexpected, I felt like this is a "bug" with Sybase itself. To avoid any doubt I created new table with some records and repeated the test and results were same. This incident has taken place at my workplace.

After some time I downloaded Sybase SQL Anywhere Web Edition 11.0 at my own desktop. I thought I was using bit older version at my office and here with the latest version the bug will be fixed, as this edition is using same engine which is used for their Enterprise products and there are some connection/licenses stuff which makes it Web Edition. I repeated the sequence and bingo the bug is still there.

Here is the details of the test as of last tested on Sybase SQL Anywhere Web Edition 11.0: Read the rest of this entry »

Tags: , , ,