Friday, December 26, 2008

Web Based Operating System

Web-based operating systems are more than just a collection of applications that run within a browser. They're self-contained environments in which you can create and store documents, copy files from one folder or drive to another, and conduct communications.

In short, almost everything you can do from Windows or the Mac OS should be able to be accomplished within a Web OS. All you need is a Web browser to get there.

One could argue that a Web-based operating system is redundant, since one needs a computer, operating system, and Web browser to access an online operating system. While that's true, the point of an online operating system is complete environment portability.

That means being able to log on to any computer that has an Internet connection and, in the time it takes to launch your Web OS, having all of your applications and documents ready for you to resume work. Although you could cobble together many of the elements of a Web OS by using, say, Google Docs, Yahoo Mail, and other online applications, doing so would require you to make several stops around the Internet.

There's no doubt that today's Web-based operating systems are far from feature-laden, and they probably will not tempt many to abandon their current routine that combines desktop and Web-based software.

But given the push that the major players in the industry are making toward a completely Web-based future, there's also little doubt that Web-based operating systems, or some form thereof, are in our collective future.

Here is the list of some web based OS to try with:


Sunday, December 14, 2008

File upload error : "Can not access a closed file"


This error occurs partily due to the new memory management feature added in the asp.net2.0 therefore you may wonder same code after migrating from asp.net1.1 to asp.net2.0 starts throwing this error.
As I said,new memory management feature is partily reposible because you may not get this error if you are uploading the file directly without any redirection(due to business requirement) for exp. - storing uploaded file object in the session on file upload page and saving it after user confirmation on the confirmation page.
Most likly you will get this error in the senario I mentioned as an example above subjected to the file size is more than 80Kb. The reason is,according to new memory management feature of asp.net2.0 when you upload a file the input stream is buffered in the memory if its size less than 80Kb otherwise it is stored in the temporary locations on the disk upto 4096Kb so when you maintain an object of any uplaoded file(more than 80Kb size) in session and redirect on different page the current request is disposed and the disk file associated with it is closed as well, now when you try to save uploaded file object on server(using SaveAs method of upload control) from the session, the request processing thread tries to read from the closed file object and thats where you get this error message.But if your uploaded file size is much less than 80Kb then you may not face this error.


You can solve this issue by adding following tag in the web.config file of your website.

< httpRuntime maxRequestLength="10240" requestLengthDiskThreshold="4096"/ >

Note - change the values according to your requirement.

maxRequestLength - Specifies the total limit for the input stream buffering threshold, in KB. This limit can be used to prevent denial of service attacks that are caused, for example, by users posting large files to the server.
The default is 4096 KB. If the threshold is exceeded, a ConfigurationErrorsException error is thrown.

requestLengthDiskThreshold- Specifies the limit for the input stream buffering threshold, in kilobytes, it means if size of the stream is more than the value specifed it is stored in the temporary location on the disk otherwise buffered in the memory. This value should not exceed the maxRequestLength attribute.The default is 80 KB.

Note - This attribute is new in the .NET Framework 2.0.

So, if you assign same value to both the attributes, your application process the file upload request just like asp.net1.1.

Thursday, December 11, 2008

How to partition external hard drive?

If you are using Windows XP then you can use DISKPART utility, which is the replacement of FDISK(Windows 95/98) utility. This is a command line disk management utility.
To run this utility, either open the console window and type DISKPART at the command prompt or use Run application.When you run this utility at the command prompt the prompt is changed to DISKPART prompt.

Here is the list of some useful diskpart commands.

1. Help - To see the help
2. Exit - To exit from the utility
3. List disk - To see the list of available hard disks
4. List Partition - To see the list of available partitions on the selected disk
5. Select Disk < disk number > - To select the hard disk for creating partitions
like - DISKPART> Select Disk 0
6. Create partition - To create partitions
7. Delete partition - To delete partitions
8. Assign letter=< Alphabate > - To assign letter to the partition
like -
DISKPART>list disk
DISKPART>select disk 1
DISKPART>list partition
DISKPART>select partition 1
DISKPART>assign letter=D

And there are many more command that you can check with help command.

Before going with this utility for partitioning you must decide how many partition of what size you want to create. For example I have 160GB external hard disk and I want to create 3 partitions of 50GB,50GB and 60GB.

First, I will connect my external hard disk with my PC.
Second, I launch diskpart utility at the command prompt and type in following commands at the diskpart prompt

in the same sequence.

1. DISKPART>list disk
2. DISKPART>select disk 1
3. DISKPART>create partition primary size=50000
4. DISKPART>create extended
5. DISKPART>create partition logical size=60000
6. DISKPART>create partition logical

In step 2 - disk 1 is my external hard disk
In step 3,5 - size is in MB
In step 6 - remaining size will be consumed

Note: After completing partitioning, disconnect external hard disk and re-connect it.

Now I will have to format these newly created partitions in order to use them for data storing.For that I use Window XP Disk Management utility.

Following are the step for accessing Disk Management utility.

1. Right click on My Computer icon on the desktop and select manage from the shortcut menu.
2. Now select Disk Management from the tree menu in the Computer Management window.

How to publish multiple websites in a solution?

By default you can publish only single website at a time unless there is a dependency on other websites in a multiple websites in a solution. So if you want that along with your startup website other website should also publish then you will have to do some project dependency settings on the solution level.

Following are the steps:

1. Right click on the solution and choose Project Dependencies from the short-cut menu.
2. In the Project Dependencies window go to Dependencies tab.
3. Choose your main website(startup) from the 'Projects" dropdown.
4. Check all the other websites/web servies in the "Depends on" section that you want to publish along with your main website and click on Ok button.

Now when you publish your main website, you will be prompted with publish windows for all the depended websites for publishing.

But if you want to publish only startup website but you are prompted with other webistes/web servies publishing windows as well, which you dont want to publish then remove them from the dependency list of the startup website through above mentioned steps.