<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jwalin Khatri &#187; Two login page in one applicaiton</title>
	<atom:link href="http://jwalin.wordpress.com/tag/two-login-page-in-one-applicaiton/feed/" rel="self" type="application/rss+xml" />
	<link>http://jwalin.wordpress.com</link>
	<description>Don't limit yourself</description>
	<lastBuildDate>Wed, 14 Oct 2009 18:29:15 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jwalin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/499eff1ef6b26c8546dbe7bd01c0ac6c?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Jwalin Khatri &#187; Two login page in one applicaiton</title>
		<link>http://jwalin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jwalin.wordpress.com/osd.xml" title="Jwalin Khatri" />
		<item>
		<title>two login page in one application and Share the Themes and Master page</title>
		<link>http://jwalin.wordpress.com/2007/12/13/two-login-page-in-one-application-and-share-the-themes-and-master-page/</link>
		<comments>http://jwalin.wordpress.com/2007/12/13/two-login-page-in-one-application-and-share-the-themes-and-master-page/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 18:01:20 +0000</pubDate>
		<dc:creator>jwalin</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Share Themes and Masterpage]]></category>
		<category><![CDATA[Two login page in one applicaiton]]></category>

		<guid isPermaLink="false">http://jwalin.wordpress.com/2007/12/13/two-login-page-in-one-application-and-share-the-themes-and-master-page/</guid>
		<description><![CDATA[You have one application and after you realize that you need one more login page(Any reason) and also database table is different for checking username and Password. Then It is very hard to maintain the web.config file. As you can have only one Authentication per application.
Yes, I know I can add web.config file under directory [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwalin.wordpress.com&blog=2317521&post=3&subd=jwalin&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You have one application and after you realize that you need one more login page(Any reason) and also database table is different for checking username and Password. Then It is very hard to maintain the web.config file. As you can have only one Authentication per application.</p>
<p>Yes, I know I can add web.config file under directory but you can not add element.</p>
<p>My Directory stucture is as followed and my virtualdirectory name is &#8220;OnlineDemo&#8221;<br />
OnlineDemo<br />
     &#8211; App_themes<br />
            onlinedemo<br />
                   stylesheets.css<br />
                  onlinedemo.skin<br />
- Public<br />
          Registration.aspx<br />
- Globals<br />
         Public.master<br />
- Admin<br />
        default.aspx<br />
- Web.config<br />
- Login.aspx</p>
<p>In Web.config</p>
<p>&lt;authentication mode=&#8221;Forms&#8221;&gt;<br />
         &lt;forms name=&#8221;onlinedemo&#8221; defaultUrl=&#8221;Admin/Default.aspx&#8221; /&gt;<br />
&lt;/authentication&gt;</p>
<p>Now, I have to add one more Directory called &#8220;Speaker&#8221; and if user wants to access it user need to login. Now question is how it is possible? as only one per application.</p>
<p>I created another virtualdirecoty under OnlineDemo called &#8220;Speakers&#8221;. and there I put the web.config file.</p>
<p>&lt;authentication mode=&#8221;Forms&#8221;&gt;<br />
         &lt;forms name=&#8221;Sepakers&#8221; path=&#8221;/&#8221; loginUrl=&#8221;login.aspx&#8221;/&gt;<br />
&lt;/authentication&gt;</p>
<p>So it will overwrite all the web.config setting from root Web.config. Here I soloved the problem of authentication.</p>
<p>Now, I have another problem occured how to share the Themes and Master page between two application. I do not want to copy and past under Speaker directory b&#8217;coz then I have to maintain 2 copies of Themes and Master Page.</p>
<p>Go to IISRight click on OnlineDemo &#8211;&gt; Speaker &#8211;&gt; New &#8211;&gt; Virtual Directory give name App_Themes , Set the path to the App_themes finish.<br />
Then right click on App_themes (Virtual Direcoty not folders). go to property &#8211;&gt; Virtual Directory Tab Remove Application Name (&#8220;Remove&#8221; Button ) and Execute Permissions : Select &#8220;Script Only&#8221; from dropdown. follow same process for Globals.</p>
<p>And for Theme put &lt;pages styleSheetTheme=&#8221;onlinedemo&#8221;&gt;<br />
in Web.Config<br />
Now when you create new page under Speakers. give the MasterPageFile=&#8221;~/Globals/Public.master&#8221;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jwalin.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jwalin.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jwalin.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jwalin.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jwalin.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jwalin.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jwalin.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jwalin.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jwalin.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jwalin.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jwalin.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jwalin.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jwalin.wordpress.com&blog=2317521&post=3&subd=jwalin&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jwalin.wordpress.com/2007/12/13/two-login-page-in-one-application-and-share-the-themes-and-master-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4be699abbb541e9c09cfcfce329f194?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jwalin</media:title>
		</media:content>
	</item>
	</channel>
</rss>