This walkthrough shows you how to keep data cache in local computer's hard drive. With FileServer, you no longer have to worry about memory leaks or limited server resources.
During this walkthrough, you will learn:
- Use ISDatasource to bind the grid.
- How to set FileServer to enable view state to be saved into a physical disk.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Visual Studio 2005 Application.
Step-By-Step Instructions
To keep data cache in local computer's hard drive
- Launch Visual Studio.NET 2005.
- Click on File menu, then select New and click Project.
- Select Visual C# Project in Project Types.
- Select ASP.NET Web Application in the Template box.
- Specify the Project's Location and click OK.
- Drag a WebGrid into WebForm.
- Drag an ISDataSource into WebForm.
- Right click to the ISDatasource1 and select Configure Datasource, choose SchemaType to DataSet and Schema Name dsNorthWind_ReadOnly then click Next.
- Add Products table and click Finish.
- Go to View State Settings, and set ViewStateStorage to FileServer.
- Set ViewStateServerConnection to �??path=c:\CacheStorage�?�
Note: The specified path (eg. c:\CacheStorage) requires read and write permission for aspnet_wp worker process (in IIS 5.x) or iis_wpg (in IIS 6+)