formats

5 Easy steps to install IIS 5.1 on Windows XP Professional SP3 and setup/run my CGI Program

Published on July 30, 2010 by in IIS

IIS is the web server on the windows platform, similar to UNIX’s Apache server. Windows XP Professional SP3 has built in support for Internet Information Services or IIS. The built in version of IIS is 5.1.  When you install windows XP, IIS is not automatically installed and enabled. You need to go to Control Panel to “Add Remove Programs” to setup IIS 5.1. In this post, I am going to show you how to install IIS 5.1 on Windows XP Professional step by step.

Step 1: Open up Control Panel

You will see many icons and one of them is  ”Add or Remove Programs”

Add-Remove-Programs-Control-Panel-Windows-XP

Click on ”Add or Remove Programs”

You will see the following “Add or Remove Programs” window

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
2 Comments  comments 
formats

How to maintain HTTP session state with cookies in C# CGI program in Visual C# 2010 Express and IIS

In my previous post 8 steps to develop, setup and call c# cgi programs in IIS 7, we learned how to create a CGI program in C#, install it as a website and call it using GET and POST.

In this article, I am going to modify that C# program to include code to read and write cookies. We will create the cookies and also read the previously set cookie values. We will also learn how to use the cookies to maintain state across requests. Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

8 Quick steps to develop and setup C# CGI program in IIS 7

CGI or common Gateway Interface is the protocol used by classic web forms to exchange data between the user and the web server. CGI uses HTTP protocol, which is a simple text exchange protocol on top of TCP/IP. In the HTTP protocol, environment variables of the OS and input from standard input devise such as console or stdin are used by the CGI program to retrieve the data that was sent from the HTML forms.

In this post I am going to show you how to create a simple console application in C# and use it as my CGI program in IIS. I’ll show you step by step how to setup a website using IIS7, enable CGI-Exe Handler Mappings and create a C# application to handle the CGI requests when a user inputs the data into text fields of a HTML form. Both HTTP GET and POST methods will be

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
3 Comments  comments 
formats

Why do I need ASP.NET Master Pages ?

I have a web application that has five ASPX pages. All have similar look and feel with same header, menu and footer.  In order to simplify my coding I created two include files header.aspx  and footer.aspx and included them at the right place in all my five ASPX pages.  So my pages look like

Page1.aspx

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>page1 title</title>
</head>
<body>
<!-- #include VIRTUAL="/include/globalheader.aspx" -->
my content for page1 goes here
<!-- #include VIRTUAL="/include/globalfooter.aspx" -->
</body>
</html>

There is a better way to achieve this. Its called to Master Page. Master pages provide functionality that developers have traditionally created by copying existing code, text, and control elements repeatedly, using framesets, using include files for

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

How to use the System.Web.Caching.Cache Object – ASP.NET Data Caching

Published on March 21, 2010 by in ASP.NET, Caching

Data caching is storing of data in web-server’s (IIS) memory for quick access by requesting browsers.  Any information that is expensive to get (in terms of performance) is saved in the data cache. For example, commonly SELECTED database values that do not change often can be stored in data cache.  This way instead of making repeated calls to SELECT data from dB, it can be accessed only one time and saved into the cache. Future requests to the same data will be retrieved from the cache as opposed to database call, thus reducing the load on database server.

Using data caching, you can cache selected data objects as opposed to the entire page. Read my post ASP.NET 4.0 Output Caching if you need cache the entire page in Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
1 Comment  comments 
formats

ASP.NET 4.0 Output Caching – What is VaryByParam and VaryByCustom

Published on February 9, 2010 by in ASP.NET, Caching

One of the easiest ways to cache ASP.NET pages is using OutputCache page directive. ASP.NET output caching reduces the time needed to execute ASP code by simply saving the output of the ASP in the HTML format inside IIS memory and returning the saved or cached HTML in the future request to the same page. So the future requests to the same ASP page do not require re-execution of the ASP script. In fact the entire ASP engine is totally bypassed and IIS simply returns the snapshot HTML from the memory.

<%@ OutputCache Duration=”300″ VaryByParam=”*” %>

Using this directive, you can take a snapshot of the output of the ASP.NET engine, which is in pure HTML text format, just before it is streamed to the browser from IIS using HTTP protocol. This snapshot is saved in the memory of IIS and served to the browser. Any future calls to this ASP page will result in

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
2 Comments  comments