SQL Federation handler.

"Cholan NSamy" <[email protected]> Sun, 24 Aug 2003 23:49:42 -0700
Newsgroups gmane.comp.sourceid.sso.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------_=_NextPart_001_01C36AD5.0FF63533
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,=20
=20
I'm trying to under the process involved in SourceID.Net v0.3 in window
2003 server.=20
=20
I was trying to use SQL Federation Handler. So to enable the SQL
federation handler I have changed the sourceID federation handler to
point to this implementation.
And also I have created a table account_federations.
While I try to run the sample application, it throws an error given
below.
=20

Object reference not set to an instance of an object.=20

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.=20

Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.

Source Error:=20
=20
Line 74:             Hashtable config =3D (Hashtable)
Line 75:
ConfigurationSettings.GetConfig(CONFIG_SECTION);
Line 76:             m_connection_str    =3D (string)
config[SQL_KEY_CONNECTION];
Line 77:             string user_query   =3D (string)
config[SQL_KEY_QUERY_BY_USER];
Line 78:             string local_query  =3D (string)
config[SQL_KEY_QUERY_BY_LOCAL];

Source File:
d:\sourceid.net-0.3new\sqlfederationhandler\sqlfederationhandler.cs
Line: 76=20

Stack Trace:=20
=20
[NullReferenceException: Object reference not set to an instance of an
object.]
   SourceID.Handler.SqlFederationHandler.Init(HttpApplicationState
application) in
d:\sourceid.net-0.3new\sqlfederationhandler\sqlfederationhandler.cs:76
   SourceID.Configuration..ctor(HttpApplicationState application) in
d:\sourceid.net-0.3new\sourceid\configuration.cs:180
   SourceID.HttpHandlers.Manager.Init(HttpApplication context) in
D:\SourceID.NET-0.3NEW\SourceID\HttpHandlers\Manager.cs:48
   System.Web.HttpApplication.InitModules()
   System.Web.HttpApplication.InitInternal(HttpContext context,
HttpApplicationState state, MethodInfo[] handlers)
=20
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpConte
xt context)
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +256
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+414
=20
=20
Can anyone please help me out to sort out this problem?
=20
Thanks in advance
cholan
=20
=20

------_=_NextPart_001_01C36AD5.0FF63533
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:[email protected]">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:536871559 0 0 0 415 0;}
@font-face
	{font-family:"Lucida Console";
	panose-1:2 11 6 9 4 5 4 2 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-2147482993 6144 0 0 31 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
h2
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	mso-outline-level:2;
	font-size:14.0pt;
	font-family:Verdana;
	color:maroon;
	font-weight:normal;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Lucida Console";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi all, <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I&#8217;m trying to under the process involved in =
SourceID.Net
v0.3 in window 2003 server. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I was trying to use SQL Federation Handler. So to =
enable the
SQL federation handler I have changed the <span =
class=3DSpellE>sourceID</span>
federation handler to point to this =
implementation.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>And also I have created a table <span =
class=3DSpellE>account_federations</span>.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>While I try to run the sample application, it throws =
an error
given below.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<h2><i><font size=3D4 color=3Dmaroon face=3DVerdana><span =
style=3D'font-size:14.0pt;
font-style:italic'>Object reference not set to an instance of an =
object.</span></font></i>
<o:p></o:p></h2>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><b><font size=3D1 =
color=3Dblack
face=3DVerdana><span =
style=3D'font-size:8.5pt;font-family:Verdana;mso-bidi-font-family:
Arial;color:black;font-weight:bold'>Description: </span></font></b><font
size=3D1 color=3Dblack face=3DArial><span =
style=3D'font-size:8.5pt;font-family:Arial;
color:black'>An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information =
about
the error and where it originated in the code. <br>
<br>
</span></font><b><font size=3D1 color=3Dblack face=3DVerdana><span =
style=3D'font-size:
8.5pt;font-family:Verdana;mso-bidi-font-family:Arial;color:black;font-wei=
ght:
bold'>Exception Details: </span></font></b><span class=3DSpellE><font =
size=3D1
color=3Dblack face=3DArial><span =
style=3D'font-size:8.5pt;font-family:Arial;
color:black'>System.NullReferenceException</span></font></span><font =
size=3D1
color=3Dblack face=3DArial><span =
style=3D'font-size:8.5pt;font-family:Arial;
color:black'>: Object reference not set to an instance of an object.<br>
<br>
</span></font><b><font size=3D1 color=3Dblack face=3DVerdana><span =
style=3D'font-size:
8.5pt;font-family:Verdana;mso-bidi-font-family:Arial;color:black;font-wei=
ght:
bold'>Source Error:</span></font></b><font size=3D1 color=3Dblack =
face=3DArial><span
style=3D'font-size:8.5pt;font-family:Arial;color:black'> =
<o:p></o:p></span></font></p>

<table class=3DMsoNormalTable border=3D0 cellpadding=3D0 width=3D"100%"
 bgcolor=3D"#FFFFCC" =
style=3D'width:100.0%;mso-cellspacing:1.5pt;background:#FFFFCC'>
 <tr style=3D'mso-yfti-irow:0;mso-yfti-lastrow:yes'>
  <td style=3D'padding:.75pt .75pt .75pt .75pt'><pre><font size=3D1 =
color=3Dblack
  face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;color:black'><o:p>&nbsp;</o:p></span></font></pr=
e><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'>Line 74:<span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
  class=3DSpellE>Hashtable</span> <span class=3DSpellE>config</span> =3D =
(<span
  =
class=3DSpellE>Hashtable</span>)<o:p></o:p></span></font></pre><pre><font=

  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'>Line 75:<span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
  =
class=3DSpellE>ConfigurationSettings.GetConfig</span>(CONFIG_SECTION);<o:=
p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dred face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:red'>Line 76:<span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
  class=3DSpellE>m_connection_str</span><span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>=3D (string) <span
  =
class=3DSpellE>config</span>[SQL_KEY_CONNECTION];<o:p></o:p></span></font=
></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'>Line 77:<span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; </span>string <span
  class=3DSpellE>user_query</span><span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp; </span>=3D (string) <span
  =
class=3DSpellE>config</span>[SQL_KEY_QUERY_BY_USER];<o:p></o:p></span></f=
ont></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'>Line 78:<span =
style=3D'mso-spacerun:yes'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; </span>string <span
  class=3DSpellE>local_query</span><span =
style=3D'mso-spacerun:yes'>&nbsp; </span>=3D (string) <span
  =
class=3DSpellE>config</span>[SQL_KEY_QUERY_BY_LOCAL];<o:p></o:p></span></=
font></pre></td>
 </tr>
</table>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D1 =
color=3Dblack
face=3DArial><span =
style=3D'font-size:8.5pt;font-family:Arial;color:black'><br>
</span></font><b><font size=3D1 color=3Dblack face=3DVerdana><span =
style=3D'font-size:
8.5pt;font-family:Verdana;mso-bidi-font-family:Arial;color:black;font-wei=
ght:
bold'>Source File: </span></font></b><font size=3D1 color=3Dblack =
face=3DArial><span
style=3D'font-size:8.5pt;font-family:Arial;color:black'>d:\sourceid.net-0=
.3new\sqlfederationhandler\sqlfederationhandler.cs</span></font><b><font
size=3D1 color=3Dblack face=3DVerdana><span =
style=3D'font-size:8.5pt;font-family:Verdana;
mso-bidi-font-family:Arial;color:black;font-weight:bold'> &nbsp;&nbsp; =
Line: </span></font></b><font
size=3D1 color=3Dblack face=3DArial><span =
style=3D'font-size:8.5pt;font-family:Arial;
color:black'>76 <br>
<br>
</span></font><b><font size=3D1 color=3Dblack face=3DVerdana><span =
style=3D'font-size:
8.5pt;font-family:Verdana;mso-bidi-font-family:Arial;color:black;font-wei=
ght:
bold'>Stack Trace:</span></font></b><font size=3D1 color=3Dblack =
face=3DArial><span
style=3D'font-size:8.5pt;font-family:Arial;color:black'> =
<o:p></o:p></span></font></p>

<table class=3DMsoNormalTable border=3D0 cellpadding=3D0 width=3D"100%"
 bgcolor=3D"#FFFFCC" =
style=3D'width:100.0%;mso-cellspacing:1.5pt;background:#FFFFCC'>
 <tr style=3D'mso-yfti-irow:0;mso-yfti-lastrow:yes'>
  <td style=3D'padding:.75pt .75pt .75pt .75pt'><pre><font size=3D1 =
color=3Dblack
  face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;color:black'><o:p>&nbsp;</o:p></span></font></pr=
e><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'>[<span class=3DSpellE>NullReferenceException</span>: =
Object reference not set to an instance of an =
object.]<o:p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  class=3DSpellE>SourceID.Handler.SqlFederationHandler.Init</span>(<span
  class=3DSpellE>HttpApplicationState</span> application) in =
d:\sourceid.net-0.3new\sqlfederationhandler\sqlfederationhandler.cs:76<o:=
p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  class=3DSpellE>SourceID.Configuration<span =
class=3DGramE>..</span>ctor</span>(<span
  class=3DSpellE>HttpApplicationState</span> application) in =
d:\sourceid.net-0.3new\sourceid\configuration.cs:180<o:p></o:p></span></f=
ont></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  class=3DSpellE>SourceID.HttpHandlers.Manager.Init</span>(<span =
class=3DSpellE>HttpApplication</span> context) in =
D:\SourceID.NET-0.3NEW\SourceID\HttpHandlers\Manager.cs:48<o:p></o:p></sp=
an></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  =
class=3DSpellE>System.Web.HttpApplication.InitModules</span>()<o:p></o:p>=
</span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  class=3DSpellE>System.Web.HttpApplication.InitInternal</span>(<span
  class=3DSpellE>HttpContext</span> context, <span =
class=3DSpellE>HttpApplicationState</span> state, <span
  class=3DSpellE>MethodInfo</span>[] =
handlers)<o:p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  =
class=3DSpellE>System.Web.HttpApplicationFactory.GetNormalApplicationInst=
ance</span>(<span
  class=3DSpellE>HttpContext</span> =
context)<o:p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  =
class=3DSpellE>System.Web.HttpApplicationFactory.GetApplicationInstance</=
span>(<span
  class=3DSpellE>HttpContext</span> context) =
+256<o:p></o:p></span></font></pre><pre><font
  size=3D1 color=3Dblack face=3D"Lucida Console"><span =
style=3D'font-size:9.0pt;
  color:black'><span style=3D'mso-spacerun:yes'>&nbsp;&nbsp; =
</span><span
  =
class=3DSpellE>System.Web.HttpRuntime.ProcessRequestInternal</span>(<span=

  class=3DSpellE>HttpWorkerRequest</span> <span =
class=3DSpellE>wr</span>) +414<o:p></o:p></span></font></pre></td>
 </tr>
</table>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Can anyone please help me out to sort out this =
problem?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks in advance<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>cholan</span></font></span><=
font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p=
>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C36AD5.0FF63533--