Click here to Skip to main content
11,481,916 members (65,398 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
Add your own
alternative version

Basic authentication in ASP.NET against custom datasource

, 5 Jun 2006 71.7K 1.6K 37
An alternate to basic authentication using IIS
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="true" Inherits="santosh.web.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="">
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:Label id="Label3" style="Z-INDEX: 101; LEFT: 112px; POSITION: absolute; TOP: 208px" runat="server"
				Font-Size="X-Large" Font-Bold="True" Width="528px">This page is in a public directory, you may visit without logging in</asp:Label>&nbsp;
			<asp:HyperLink id="HyperLink1" style="Z-INDEX: 102; LEFT: 464px; POSITION: absolute; TOP: 296px"
				runat="server" NavigateUrl="Secured/WebForm1.aspx">Visit a secured page now</asp:HyperLink>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Santosh K Sahoo
Web Developer
India India
I have been with IT since past 6+ years, working as software engineer for IBM Kolkata. .NET is the platform of my choice and coding with C# since its evolution. Please join .NETIndia group for more articles & .NET discussions.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 5 Jun 2006
Article Copyright 2006 by Santosh K Sahoo
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid