Wednesday, April 1, 2009

Securing Role Authorization in ASP.NET 2.0

To protect the authorization cookie you need to encrypt and integrity check it, use SSL to protect the cookie over the wire, and do not persist the cookie on the client.
When using role caching securing the roles cookie is of prime importance. This is to stop users modifying the list of roles to which they belong, and to stop intruders from gaining information about the roles used by your application.
* Ensure the cookie is encrypted and integrity checked by setting the cookieProtection attribute to All.
* Ensure that the authorization cookie is only transmitted over HTTPS connections by setting cookieRequireSSL to true.
* Ensure that the roles cookie is not persisted on the client computer by setting createPersistentCookie to false.
* If you cannot use SSL, consider reducing the cookie lifetime by reducing the cookieTimeout value to minimize the time window within which an attacker can use a captured roles cookie to access your site with privileged rights.
* If you are in a scenario where you are concerned about cookie hijacking, consider reducing the timeout and setting slidingExpiration="false".

Here is a sample secured configuration


cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="true"
cookieSlidingExpiration="true"
cookieProtection="All"
createPersistentCookie="false">

Sunday, December 7, 2008

Moving files from Windows to Unix

While moving files from windows to unix, we use several softwares like FTPclient, WinSCP3 etc. We may use binary mode to move the files from windows to unix. When we want to run a sql query file (*.sql) in Unix and the file has been transferred from windows to unix, make sure that you are running the following commands after copying the file.

DosToUnix "myQuery.sql"

This will prevent the junk characters which we can find inside the copied sql file.

Thursday, September 4, 2008

GOOGLE WEBBROWSER - CHROME

Google have launched web browser Chrome. Lets review it !
Google leaked news of the browser yesterday by releasing a comic book (by comics legend Scott McCloud) describing the design decisions that went into the new browser.

For users, Chrome is a brand new web browser with blazing fast load times and a minimalist interface, designed to highlight page content over (ironically) browser chrome. Customary browser features are tucked away behind clever user interface elements, most of which are easily discoverable as you need them.

For developers, Chrome uses the same WebKit rendering engine as Safari, but bundles its own screaming fast JavaScript engine, called V8. The browser's common ancestry with Safari will help to reduce the testing burden on developers of a whole new browser, but when testing is required, Chrome includes a DOM/CSS inspector, an HTTP profiler, and a JavaScript debugger.

Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.



http://www.google.com/chrome/intl/en/features.html
Google says one tab is indepenedent of the other. Even if one page in one tab hangs , it wont affect the other tab.
It will be downloaded as 475 Kb file and on installing it will be downloading from Internet. It took me around 3-4 minutes to download in 2 MBPS internet.
Youtube loaded fantastically fast. WOW...I loved it.
When I tried www.orkut.com. This is what happening. How will I login to Orkut ?????



Wednesday, September 3, 2008

Split Tunneling

Split tunneling is a computer networking concept which allows a VPN user to access a public network (e.g., the Internet) and a local LAN or WAN at the same time, using the same physical network connection. This connection service is usually facilitated through a program such as a VPN client software application.

Tuesday, September 2, 2008

Binding Handler is Invalid ASP.NET

This issue happened when I tried to run the ASP.NET website which I created. This happens with the Visual Studio 2005 debugger.To solve the issue , it's very simple

-> Start> run > services.msc
-> Start the terminal service.


I have seen many of my colleagues say something like "I don't want to enable the Terminal Services service because it’s a security risk".Enabling the Terminal Services service does NOT automatically enable Remote Desktop. If you want Remote Desktop disabled, then uncheck the remote desktop checkbox on the Remote tab of the properties dialog for My Computer. By default, Remote Desktop is disabled on Window XP, so unless you have gone and enabled it, it should already be disabled on your computer.The Terminal Services service is enabled by default because in addition to the Remote Desktop functionality, it also provides for Remote Assistance, Fast User Switching, process listing, DCOM support.

So why does the debugger rely on the Terminal Services service? The answer: Process listing. It turns out that the TS team provides the best task list API in Windows. Both tasklist.exe and taskmgr.exe use the TS service for this, and so it was natural for the debugger to follow their lead. Previous versions of Visual Studio got their task list through other task list APIs, but it turns out that this only works well if you run your code as LocalSystem. This was fine at the time because we had a service. However, for improved security and stability, the debugger got rid of their service for the 2005 release, so we needed to switch to the TS process listing API.

Hibernating Issue in Windows xp

Computers running Windows XP with more than 1 GB of RAM may fail to hibernate. The best way to describe the problem is by the steps taken and the response from the system.
  1. The user requests the system to hibernate.
  2. The system appears to think about it for a couple of seconds.
  3. As the system tries to switch video modes, just before displaying the “Hibernating…” progress bar, the Windows Exclamation sound plays.
  4. The video mode switches back, and a dialog box opens with the message:
    Insufficient System Resources Exist to Complete the API.
fter the problem occcurs, the hibernation option is no longer available to the user. In fact, the hibernation tab normally found in the Power Options is hidden until the next system reboot.

I have read the same solution over and over: Apply this hotfix or update your system to Service Pack 2. Unfortunately, I am beginning to wonder how many of these recommendations are coming from users with less than 1 GB of RAM. I personally use a desktop and laptop computer, with 1.25 GB and 1.5 GB of RAM respectively, and both exhibit the problem regardless of the applied hotfix or SP2 (which includes the hotfix). If you count two of my friends who also have this problem, I know of four (4) computers that are adversely affected. In other words, with the only fix currently available, 100% of the computers I have access to are still broken!

2006.09.08
Update: Microsoft has released the hotfix to the public. If you have been needing the hotfix for a language other than English, you may now download it directly from Microsoft’s website.


Wednesday, October 3, 2007

F1 - wow , and again wow !

One of my friend asked why F1 cars are soo special ...It is really special......When an F1 driver hits the brakes on his car he experiences retardation or deceleration comparable to a regular car driving through a BRICK wall at 300kmph!!! ...F1 car can go from 0 to 160 kph and back to 0 in FOUR seconds!!!!!!!F1 car engines last only for about 2 hours of racing mostly before blowing up on the other hand we expect our engines to last us for a decent 20yrs on an average and they quite faithfully DO....that's the extent to which the engines are pushed to perform... An average F1 driver looses about 4kgs of weight after just one race due to the prolonged exposure to high Gravitational forces and temperatures for little over an hour.To give you an idea of just how important aerodynamic design and added down force can be, small planes can take off at slower speeds than F1 cars travel on the track.
Without aerodynamic down force, high-performance racing cars have sufficient power to produce wheel spin and loss of control at 160 kph. They usually race at over 300 kph. In a street course race like the Monaco grand prix, the down force provides enough suction to lift manhole covers. Before the race all of the manhole covers on the streets have to be welded down to prevent this from happening!The refuelers used in F1 can supply 12 liters of fuel per second. This means it would take just 4 seconds to fill the tank of an average 50 liter family car. They use the same refueling rigs used on US military helicopters today.The refuelers used in F1 can supply 12 liters of fuel per second. This means it would take just 4 seconds to fill the tank of an average 50 liter family car. They use the same refueling rigs used on US military helicopters today.TOP F1 pit crews can refuel and change tyres in around amazing 3 seconds. During the race the tyres lose weight! Each tyre loses about 0.5 kg in weight due to wear.Normal tyres last 60 000 - 100 000 km. Racing tyres are designed to last 90 - 120 km.A dry-weather F1 tyre reaches peak operating performance (best grip) when tread temperature is between 900C and 1200C.(Water boils at 100C remember) At top speed, F1 tyres rotate 50 times a second.

After coming to know about these point , I just can say "WOW !!!!"