<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Discussions by sunny.mohan</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Discussions by sunny.mohan</title>
		<link>http://channel9.msdn.com/Niners/sunny.mohan/Discussions</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Niners/sunny.mohan/Discussions</link>
	<language>en</language>
	<pubDate>Sun, 19 May 2013 00:18:46 GMT</pubDate>
	<lastBuildDate>Sun, 19 May 2013 00:18:46 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>0</c9:totalResults>
	<c9:pageCount>0</c9:pageCount>
	<c9:pageSize>0</c9:pageSize>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p>I do agree with you on your thoughts in the first paragraph. But When you say &quot;Membership&quot; object, Will that be a login control in this case?</p>
<p>Secondly, I couldn't really make out what you mean by switching membership providers. Do you mean that then in that case the login control by itself won't be able to refer/recognize the custom membership provider defined in the web.config file.</p>
<p>Also, another thing that I noticed in your aspx code section is that you're missing the MembershipProvider property tag in the login control attributes. I was wondering that how would the system recognize the custom provider without the specification of
 Membership provider in the login control attributes.</p>
<p>Another question, where am I supposed to put the below code snippet? In the code-behind file? Can you paste the whole code of your code behind file which would have such code?</p>
<p>public class Login2 : System.Web.UI.WebControls.Login {</p>
<p>protected override void OnAuthenticate(System.Web.UI.WebControls.AuthenticateEventArgs e) {
<br />&nbsp;&nbsp; try {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; base.OnAuthenticate(e);<br />&nbsp;&nbsp; } catch (Exception ex) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.FailureText = ex.Message;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.OnLoginError(EventArgs.Empty);<br />&nbsp;&nbsp; }<br />}<br />}<br /><br />--Sunny<br /><a href="http://www.mohanenterprises.com">www.mohanenterprises.com</a><br /><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/77b0a1c37da14f188e2d9dfa00c30197#77b0a1c37da14f188e2d9dfa00c30197</link>
		<pubDate>Wed, 02 Apr 2008 18:11:51 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/77b0a1c37da14f188e2d9dfa00c30197#77b0a1c37da14f188e2d9dfa00c30197</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p>Thanks for your suggestions Erick. I appreciate it. <br /><br />Actually it's not that what you're suggesting I am not convinced with that.<br /><br />Can you please take a look at the code below? This is how my code looks like.<br /><br /><font color="#ff0000">=========================<br /></font><font color="#ff0000"><strong><u>ASPX page code:<br /></u></strong>=========================</font><br /><br /><font color="#0000ff" size="2">
<p>&lt;</font><font color="#800000" size="2">body</font><font size="2"> </font><font color="#ff0000" size="2">onload</font><font color="#0000ff" size="2">=&quot;fnSetFocus();&quot;&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">form</font><font size="2">
</font><font color="#ff0000" size="2">id</font><font color="#0000ff" size="2">=&quot;form1&quot;</font><font size="2">
</font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#800000" size="2">ScriptManager</font><font size="2">
</font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">=&quot;ScriptManager1&quot;</font><font size="2">
</font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;</font><font size="2">
</font><font color="#0000ff" size="2">/&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">div</font><font color="#0000ff" size="2">&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#800000" size="2">Login</font><font size="2">
</font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">=&quot;Login1&quot;</font><font size="2">
</font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">=&quot;server&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BackColor</font><font color="#0000ff" size="2">=&quot;#F7F6F3&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderColor</font><font color="#0000ff" size="2">=&quot;#E6E2D8&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderPadding</font><font color="#0000ff" size="2">=&quot;4&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderStyle</font><font color="#0000ff" size="2">=&quot;Solid&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderWidth</font><font color="#0000ff" size="2">=&quot;1px&quot;</font><font size="2">
</font><font color="#ff0000" size="2">Font-Names</font><font color="#0000ff" size="2">=&quot;Verdana&quot;</font><font size="2">
</font><font color="#ff0000" size="2">Font-Size</font><font color="#0000ff" size="2">=&quot;0.8em&quot;</font><font size="2">
</font><font color="#ff0000" size="2">ForeColor</font><font color="#0000ff" size="2">=&quot;#333333&quot;</font><font size="2">
</font><font color="#ff0000" size="2">MembershipProvider</font><font color="#0000ff" size="2">=&quot;CustomMembershipProviderLib.CustomMembershipProvider&quot;</font><font size="2">
</font><font color="#ff0000" size="2">OnAuthenticate</font><font color="#0000ff" size="2">=&quot;Login1_Authenticate&quot;</font><font size="2">
</font><font color="#0000ff" size="2">&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">TextBoxStyle</font><font size="2">
</font><font color="#ff0000" size="2">Font-Size</font><font color="#0000ff" size="2">=&quot;0.8em&quot;</font><font size="2">
</font><font color="#0000ff" size="2">/&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">LoginButtonStyle</font><font size="2">
</font><font color="#ff0000" size="2">BackColor</font><font color="#0000ff" size="2">=&quot;#FFFBFF&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderColor</font><font color="#0000ff" size="2">=&quot;#CCCCCC&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderStyle</font><font color="#0000ff" size="2">=&quot;Solid&quot;</font><font size="2">
</font><font color="#ff0000" size="2">BorderWidth</font><font color="#0000ff" size="2">=&quot;1px&quot;</p>
</font><font size="2">
<p></font><font color="#ff0000" size="2">Font-Names</font><font color="#0000ff" size="2">=&quot;Verdana&quot;</font><font size="2">
</font><font color="#ff0000" size="2">Font-Size</font><font color="#0000ff" size="2">=&quot;0.8em&quot;</font><font size="2">
</font><font color="#ff0000" size="2">ForeColor</font><font color="#0000ff" size="2">=&quot;#284775&quot;</font><font size="2">
</font><font color="#0000ff" size="2">/&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">InstructionTextStyle</font><font size="2">
</font><font color="#ff0000" size="2">Font-Italic</font><font color="#0000ff" size="2">=&quot;True&quot;</font><font size="2">
</font><font color="#ff0000" size="2">ForeColor</font><font color="#0000ff" size="2">=&quot;Black&quot;</font><font size="2">
</font><font color="#0000ff" size="2">/&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;</font><font color="#800000" size="2">TitleTextStyle</font><font size="2">
</font><font color="#ff0000" size="2">BackColor</font><font color="#0000ff" size="2">=&quot;#5D7B9D&quot;</font><font size="2">
</font><font color="#ff0000" size="2">Font-Bold</font><font color="#0000ff" size="2">=&quot;True&quot;</font><font size="2">
</font><font color="#ff0000" size="2">Font-Size</font><font color="#0000ff" size="2">=&quot;0.9em&quot;</font><font size="2">
</font><font color="#ff0000" size="2">ForeColor</font><font color="#0000ff" size="2">=&quot;White&quot;</font><font size="2">
</font><font color="#0000ff" size="2">/&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">asp</font><font color="#0000ff" size="2">:</font><font color="#800000" size="2">Login</font><font color="#0000ff" size="2">&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">div</font><font color="#0000ff" size="2">&gt;</p>
</font><font size="2">
<p></font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">form</font><font color="#0000ff" size="2">&gt;</p>
<p>&lt;/</font><font color="#800000" size="2">body</font><font color="#0000ff" size="2">&gt;<br /><br /><br /><font color="#ff0000">===========================<br /></font><font color="#000000"><strong><font color="#ff0000">Code Behind code:<br />======================</font><br /><br /></strong><font size="2"></p>
<p></font><strong><font color="#0000ff" size="2">protected</font><font size="2"> </font>
<font color="#0000ff" size="2">void</font><font size="2"> Login1_Authenticate(</font><font color="#0000ff" size="2">object</font><font size="2"> sender,
</font><font color="#008080" size="2">AuthenticateEventArgs</font></strong><font size="2"><strong> e)</strong></p>
<p><strong>{</strong></p>
<p></font><font color="#0000ff" size="2"><strong>try</strong></p>
</font><font size="2">
<p><strong>{</strong></p>
<p></font><strong><font color="#008080" size="2">CustomMembershipProvider</font><font size="2"> objCMP =
</font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">CustomMembershipProvider</font></strong><font size="2"><strong>();</strong></p>
<p><strong>e.Authenticated = objCMP.ValidateUser(Login1.UserName, Login1.Password);</strong></p>
<p><strong>objCMP = </strong></font><font color="#0000ff" size="2"><strong>null</strong></font><font size="2"><strong>;</strong></p>
<p><strong>}</strong></p>
<p></font><strong><font color="#0000ff" size="2">catch</font><font size="2"> (</font><font color="#008080" size="2">Exception</font></strong><font size="2"><strong> ex)</strong></p>
<p><strong>{</strong></p>
<p><strong>Login1.FailureText = ex.Message;</strong></p>
<p></p>
<p><strong>}</strong></p>
<p></font><font color="#0000ff" size="2"><strong>finally</strong></p>
</font><font size="2">
<p><strong>{</strong></p>
<p><strong>Login1.Dispose();</strong></p>
<p><strong>}</strong></p>
<p></p>
<p><strong>}<br /><br /><br /><br /><br /></strong><strong><font color="#ff0000">====================================<br />CustomMembershipProvider.cs code<br />====================================<br /></font><br /></strong><font size="2"></p>
<p></font><strong><font color="#0000ff" size="2">public</font><font size="2"> </font>
<font color="#0000ff" size="2">override</font><font size="2"> </font><font color="#0000ff" size="2">bool</font><font size="2"> ValidateUser(</font><font color="#0000ff" size="2">string</font><font size="2"> username,
</font><font color="#0000ff" size="2">string</font></strong><font size="2"><strong> password)</strong></p>
<p><strong>{</strong></p>
<p></font><font color="#0000ff" size="2"><strong>try</strong></p>
</font><font size="2">
<p><strong>{</strong></p>
<p></font><strong><font color="#0000ff" size="2">throw</font><font size="2"> </font>
<font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">Exception</font><font size="2">(</font><font color="#800000" size="2">&quot;The method or operation is not yet implemented.&quot;</font></strong><font size="2"><strong>);</strong></p>
<p><strong>}</strong></p>
<p></font><strong><font color="#0000ff" size="2">catch</font><font size="2"> (</font><font color="#008080" size="2">Exception</font></strong><font size="2"><strong> ex)</strong></p>
<p><strong>{</strong></p>
<p></font><font color="#0000ff" size="2"><strong>throw</strong></font><font size="2"><strong> ex;</strong></p>
<p><strong>}</strong></p>
<p><strong>}<br /><br /><br /><br /><br /><br /><br /></strong><font color="#000080">This is how my code looks like now and it seems to achieve what I wanted to. But I still wanted to do it in a little different way. Even though I am using a CustomMembershipProvider class but I had to create an object of that
 class to be able to capture its exceptions.<br /><br />What I wanted was that I should be able to do it without writing any code in the aspx or I should say without explicitly making an object of the CustomMembershipProvider class.<br /><br />I understand that doing it in such a way might not bring any value but to have a better understanding of&nbsp;the whole process, I wanted to do it in this way.<br /><br />I hope that brings some clarity on what I intend to do.<br /><br />--Sunny<br /><a href="http://www.mohanenterprises.com">www.mohanenterprises.com</a><br /></font></p>
</font></font></font></font></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/e7982dc546ef4db7b11d9dfa00c30056#e7982dc546ef4db7b11d9dfa00c30056</link>
		<pubDate>Wed, 02 Apr 2008 04:17:12 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/e7982dc546ef4db7b11d9dfa00c30056#e7982dc546ef4db7b11d9dfa00c30056</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p>Thanks for your response Erik.<br /><br />Well, if I have to redirect the user from the ValidateUser() method, I can achieve that within the CustomMembership provider class as well.</p>
<p>But I want to find out a technique to throw an exception from the CustomMembership class to handle it in the aspx page itself.</p>
<p>In other words, I want to explore the other two options suggested by <strong>Stevo and Andrew</strong> where they talk about bubbling up the events off the login control. I want to handle it in a manner as we handle any other errors raised by a typical&nbsp;Business
 layer.</p>
<p>In&nbsp;a situation wherein for some reason an error (DB connection or any other error related to DB) is encountered by the ValidateUser() method so in that scenario it should be able to handle it just like any other error raised by a typical Business layer.
 The errors which are raised by classes in a business layer are usually handled in a proper manner through the aspx pages. So that's what I want to achieve. Doing it through Global.asax isn't a usual way of handling errors.</p>
<p>I hope it helps everyone understand my intentions as why I wish to do it in this particular way.<br /><br /><br /><a href="http://www.mohanenterprises.com">www.mohanenterprises.com</a><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/29e5173512084ddca2a19dfa00c2fe87#29e5173512084ddca2a19dfa00c2fe87</link>
		<pubDate>Tue, 01 Apr 2008 20:52:26 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/29e5173512084ddca2a19dfa00c2fe87#29e5173512084ddca2a19dfa00c2fe87</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to call C#.NET dll from javascript</title>
		<description><![CDATA[<p>Won't it be possible through XMLHTTP request?<br /><br />--Sunny<br /><a href="http://www.mohanenterprises.com">www.mohanenterprises.com</a><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261956-How-to-call-CNET-dll-from-javascript/981cc035588a45b892409dfa00c305f2#981cc035588a45b892409dfa00c305f2</link>
		<pubDate>Tue, 01 Apr 2008 13:46:20 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261956-How-to-call-CNET-dll-from-javascript/981cc035588a45b892409dfa00c305f2#981cc035588a45b892409dfa00c305f2</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>9</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Postback problem</title>
		<description><![CDATA[<p>Would it be possible for you to post some sample code?<br /><br />Rgds,<br />Sunny<br /><br /><a href="http://www.mohanenterprises.com">www.mohanenterprises.com</a><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261982-Postback-problem/4bfe74f1e4e843cfa9009dfa00c33af1#4bfe74f1e4e843cfa9009dfa00c33af1</link>
		<pubDate>Tue, 01 Apr 2008 13:33:44 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261982-Postback-problem/4bfe74f1e4e843cfa9009dfa00c33af1#4bfe74f1e4e843cfa9009dfa00c33af1</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>5</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p><p id="kkjk">Inherits&nbsp;<b id="zy_j">System.Web.Security.<font id="qwsu" color="#008080" size="2">MembershipProvider</font></b></p>
<p id="iu7l"><b id="hs7f"><font id="fcp8" color="#008080">======================================</font></b></p>
<p id="zisf">&nbsp;</p>
<font id="hi0p" color="#0000ff">
<p id="lqk6"><font size="2">public</font></font><font size="2"> <font id="hxsj" color="#0000ff">
class</font> <font id="u30c" color="#008080">CustomMembershipProvider</font><font id="h290"> : System.Web.Security.</font><font id="vswj" color="#008080">MembershipProvider</p>
</font></font>
<p id="okn-">&nbsp;</p>
<p id="r9fv">================================================&nbsp;</p>
<p id="j4b5">&nbsp;</p>
<p id="z..8"><b id="cuzc"><i id="yx-v">This is how the ValidateUser() method looks like</i></b></p>
<p id="xx7:">=====================================</p>
<p id="kkjk"><font id="v4by" color="#0000ff" size="2">public</font> <font id="bpic" color="#0000ff" size="2">
override</font> <font id="n-eb" color="#0000ff" size="2">bool</font><font id="co1c" size="2"> ValidateUser(</font><font id="uk2v" color="#0000ff" size="2">string</font><font id="b5.e" size="2"> username,
</font><font id="r6:n" color="#0000ff" size="2">string</font><font id="k1n_" size="2"> password)</font></p>
<font id="yhio" size="2">
<p id="dkfr">{</p>
<p id="tb:x">&nbsp;</p>
</font>
<p id="tb:x"><font id="z6g6" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;try</font></p>
<font id="g2kk" size="2">
<p id="lo:-">&nbsp;&nbsp;&nbsp;&nbsp;{</p>
</font>
<p id="s9e3"><font id="o-4n" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw</font> <font id="g41-" color="#0000ff" size="2">
new</font> <font id="dmha" color="#008080" size="2">Exception</font><font id="bkws" size="2">(</font><font id="c._6" color="#800000" size="2">&quot;The method or operation is not yet implemented.&quot;</font><font id="o8sc" size="2">);</font></p>
<font id="c093" size="2">
<p id="bfau">&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p id="fd.t">&nbsp;</p>
</font>
<p id="qnvh"><font id="yd0-" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;catch</font><font id="glt4" size="2"> (</font><font id="dfjp" color="#008080" size="2">Exception</font><font id="yut1" size="2"> ex)</font></p>
<font id="xvon" size="2">
<p id="hcal">&nbsp;&nbsp;&nbsp;&nbsp;{</p>
<p id="sjuy">&nbsp;</p>
</font>
<p id="thdq"><font id="qxcp" color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;throw</font><font id="rp7b" size="2"> ex;</font></p>
<font id="sh-b" size="2">
<p id="lvpk">&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p id="vr-e">}</p>
<p id="rjz.">&nbsp;</p>
<p id="hz16">In the code above, I am&nbsp;intentionally throwing an&nbsp;exception to see how it can be handled in&nbsp;an aspx page. I didn't intend to throw an exception like this but I accidently ran the code without removing these default exception statements and it got
 stuck there. Since then I have been trying to find a solution. Never thought that it's going to take so long. Therefore, there is no specific reason to raise this exception. I could have easily moved forward and implemented the method. But I am now curious
 to find a solution for it.</p>
<p id="f.23">&nbsp;</p>
<p id="ohgv">The code above lies in a separate project, which is part of the same solution as the web site project where I am intending to handle the exception.</p>
<p id="w3ez">&nbsp;</p>
<p id="t4qk">Andrew - Thanks for explaining it in such a nice way. As you rightly said that login control being a composite control, I might need to capture the event using Bubbleevent functionality. I have been trying to find that out as well...Let's see if
 I get any success. But do you think I would need to override the login control as well to capture these exceptions? I couldn't really figure out as how will that work. If you can, then please expound on it a bit.</p>
<p id="yc24">&nbsp;</p>
<p id="ps_n">&nbsp;Stevo - Thanks to you as well. I think we all are very close in terms on our understanding. Probably you guys might be having a better idea abt it. I am still trying it as and when I am getting time in between my regular work routine.</p>
<p id="aip9">&nbsp;</p>
<p id="fw00">Shall update you soon abt any progress.</p>
<p id="p0o1">&nbsp;</p>
<p id="gb0y">&nbsp;Wisemx - I hope the code that I have provided above gives some idea of what I am talking abt. However, if you still seek any clarification, please revert back and I shall try to explain it in a better way.</p>
<p id="s-qp">&nbsp;</p>
<p id="y_v3">&nbsp;Erik - I have put the code, so let me know if you want to know anything additional.</p>
<p>&nbsp;</p>
<p>Guys, plz do inform me in case you know abt a specific method that can handle this event in aspx. I am also trying to locate the same.</p>
<p>&nbsp;</p>
<p>--Sunny<br /><br />&nbsp; <a href="http://www.mohaneneterpises.com/">www.mohaneneterpises.com</a><br /></p>
</font></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/8f623c5f55f340db85439dfa00c2fd7c#8f623c5f55f340db85439dfa00c2fd7c</link>
		<pubDate>Tue, 01 Apr 2008 13:08:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/8f623c5f55f340db85439dfa00c2fd7c#8f623c5f55f340db85439dfa00c2fd7c</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Custom Membership Provider - Catching Exceptions</title>
		<description><![CDATA[<p>Is anyone there who can help me with this?<br /><br />-Sunny</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261951-Custom-Membership-Provider-Catching-Exceptions/9a6902334a404771b8469dfa00c2f871#9a6902334a404771b8469dfa00c2f871</link>
		<pubDate>Mon, 31 Mar 2008 05:27:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261951-Custom-Membership-Provider-Catching-Exceptions/9a6902334a404771b8469dfa00c2f871#9a6902334a404771b8469dfa00c2f871</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>2</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p>It doesn't help much. My problem is very specific. I hope I am able put the question in&nbsp;a right way in my post.<br /><br />The problem I am facing is that in case I want to capture the exception raised by ValidateUser method of the custom membership control, how is that possible? Because when I try to throw an exception from the ValidateUser() method of my custom membership class,
 it doesn't get caught by .aspx page. Rather the execution halts in my custom membership project itself.<br /><br />PS: I have implemented custom membership class in a separate project which is part of the same solution.<br /><br />--Sunny<br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/8671aac63be44dea9d969dfa00c2fae8#8671aac63be44dea9d969dfa00c2fae8</link>
		<pubDate>Mon, 31 Mar 2008 05:26:26 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/8671aac63be44dea9d969dfa00c2fae8#8671aac63be44dea9d969dfa00c2fae8</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - How to catch exceptions raised by Custom Membership provider?</title>
		<description><![CDATA[<p>Hi,<br /><br />This is another post regarding the problem I am facing with handling exceptions raised by Custom Membership Provider.<br /><br />I have written a class &quot;CustomMemberProvider&quot; which throws an exception through its ValidateUser() method. I would like to rethrow this excepiton from the catch block of the ValidateUser method in order to handle it within the .aspx page and display user an
 appropriate&nbsp;message.<br /><br />When I try to throw an exception in the catch block of ValidateUser() method, it halts the execution there and does go back to the .aspx page as expected.<br /><br /><br />Please help.<br /><br />Regards,<br />Sunny<br /><br /><a href="http://www.mohanenterprises.com">http://www.mohanenterprises.com</a><br /><br /><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/261953#261953</link>
		<pubDate>Sun, 30 Mar 2008 22:29:48 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261953-How-to-catch-exceptions-raised-by-Custom-Membership-provider/261953#261953</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Custom Membership Provider - Catching Exceptions</title>
		<description><![CDATA[<p>Hi, <br /><p>I am writing a <b>custom </b><b>membership</b> provider using C# in .Net and I have
<br />been trying to catch exceptions raised by my <b>custom </b><b>membership</b> <br />provider class in my aspx page. I have already written a <b>custom</b> <br /><b>membership</b> class, which throws an exception. I am throwing the same <br />exception in the catch block of the <b>custom</b> class thinking that it <br />would be caught by the .aspx page. <br /></p>
<p>Since I am using login control, shipped with VS 2005, for <br />authentication, I would like to understand how these exceptions can <br />be <br />caught with in the .aspx page. Specifically, I would like to know <br />which process invokes ValidateUser method of my <b>custom</b> class. This <br /><b>custom</b> class is an implementation of an abstract class named <br />&quot;<b>Membership</b>&quot; class. I don't remember the exact name of the abstract <br />class as the source code is not accessible to me at this point in <br />time. <br /></p>
<p>To add to the info above, I have the <b>custom </b><b>membership</b> provider in a
<br />separate project which is ofcourse part of the same solution as my <br />web <br />app where I am trying to catch the exceptions. <br /></p>
<p>If possible, please revert back at the earliest. If there's any <br />clarification reqd abt this scenario, please do let me know. <br /></p>
<p>Thanks, <br />--Sunny <br /></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/261951-Custom-Membership-Provider-Catching-Exceptions/261951#261951</link>
		<pubDate>Sun, 30 Mar 2008 21:35:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/261951-Custom-Membership-Provider-Catching-Exceptions/261951#261951</guid>
		<dc:creator>sunny.mohan</dc:creator>
		<slash:comments>2</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/sunny.mohan/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>