rss
twitter
  •  

ASP Session Management

| Posted in IIS Knowledgebase |

0

What is ASP.NET Session?

A session is defined as the period of time a unique user interacts with a particular web application.

HTTP is a stateless protocol, in the sense that a Web server is concerned only with the current HTTP request for any given Web page. The server retains no knowledge of previous requests.

The stateless nature of HTTP requests presents unique challenges when writing Web applications.

ASP and ASP.NET applications maintain a user’s session using a feature called session state.

In this series we are going to talk in detail about how to troubleshoot ASP.NET session state related issues.

More….

Renaming Virtual Directories IIS 6.0

| Posted in IIS Knowledgebase |

0

Renaming Virtual Directories (IIS 6.0)

In IIS 6.0, you cannot use IIS Manager to rename a virtual directory. Instead, you can rename a virtual directory by editing the MetaBase.xml file using a text editor, such as Microsoft Notepad.

Note: Always back up the metabase before editing MetaBase.xml. For information on backing up the metabase, see Backing Up and Restoring the Metabase in IIS 6.0.

Important

You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script’s full path and any parameters).

Procedures
To rename a virtual directory by using Notepad

1. Open MetaBase.xml in Notepad. The default location for MetaBase.xml is C:\Windows\System32\Inetsrv.

2. On the Edit menu, click Find, and then locate the virtual directory name that you want to change.

3. Replace the current virtual directory name with a new name.

4. Close the MetaBase.xml file and when prompted, save the changes.

5. In IIS Manager, right-click the local computer, and then select All Tasks.

6. On the All Tasks menu, click Save Configuration to Disk

Note: When you rename a newly created virtual directory, it takes at least two minutes for the change to appear in IIS Manager if no other changes are pending. To see the change immediately in IIS Manager, close and then reopen IIS Manager.

Redirecting Web Sites in IIS 6.0

| Posted in IIS Knowledgebase |

0

Redirecting Web Sites in IIS 6.0 (IIS 6.0)

When a browser requests a page or program on your Web site, the Web server locates the page identified by the URL and returns it to the browser. When you move a page on your Web site, you can’t always correct all of the links that refer to the old URL of the page. To make sure that browsers can find the page at the new URL, you can instruct the Web server to redirect the browser to the new URL.

You can redirect requests for files in one directory to a different directory, to a different Web site, or to another file in a different directory. When the browser requests the file at the original URL, the Web server instructs the browser to request the page by using the new URL.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.

Procedures

To redirect requests to another Web site or directory

1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2. Click the Home Directory, Virtual Directory, or Directory tab.

3. Under The content for this source should come from, click A redirection to a URL.

4. In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.
To redirect all requests to a single file

1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2. Click the Home Directory, Virtual Directory, or Directory tab.

3. Under The content for this source should come from, click A redirection to a URL.

4. In the Redirect to box, type the URL of the destination file.

5. Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.

You can use wildcards and redirect variables in the destination URL to precisely control how the original URL is translated into the destination URL.

You can also use the redirect method to redirect all requests for files in a particular directory to a program. Generally, you should pass any parameters from the original URL to the program, which you can do by using redirect variables.

To redirect requests to a program

1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2. Click the Home Directory, Virtual Directory, or Directory tab.

3. Under The content for this source should come from, click A redirection to a URL.

In the Redirect to box, type the URL of the program, including any redirect variables needed to pass parameters to the program. For example, to redirect all requests for scripts in a Scripts directory to a logging program that records the requested URL and any parameters passed with the URL, type /Scripts/Logger.exe?URL=$V+PARAMS=$P. $V and $P are redirect variables.

4. Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.