<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I corrected my problem. Actually, I
changed the code a little bit. </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Const string MAP_FILE = “c:/inetpub/wwwroot/Addison.map”</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Map= new mapObj(MAP_FILE)</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The line </span></font><font size=2
color=red face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:red'>System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”]</span></font>
</p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> Is throwing error. No idea what it is trying to do.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Now my application is working fine in IIS and C#.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Suman</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Tamas Szekeres
[mailto:szekerest@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, July 08, 2009
6:22 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Suman Chatterjee<br>
<b><span style='font-weight:bold'>Cc:</span></b>
mapserver-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [mapserver-users]
Object reference not set to an instance of an object</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal style='margin-right:0in;margin-bottom:12.0pt;margin-left:
.5in'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi
Suman,<br>
<br>
I suspect </span></font><font size=2 color=red face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:red'>System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”]</span></font>
evaluates to null in your case, and therefore the ToString() operation on the
null reference is failing which problem is not related to the MapScript library
itself.<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
</p>
<div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>2009/7/8 Suman Chatterjee <<a
href="mailto:schatterjee@addisontx.gov">schatterjee@addisontx.gov</a>></span></font></p>
<div link=blue vlink=purple>
<div>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Hi all,</span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>I am trying to develop an application in C# (VS2005)
with mapscript. I saw the material of Paolo. But I am facing a problem </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>In the line </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>mapObj map= new mapObj(System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”].toString())</span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>It is generating the error “ Object reference
not set to an instance of an object”</span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>How can I correct this? If anyone helps me in
correcting it, it will be great.</span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Suman</span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
<p style='margin-left:.5in'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'> </span></font></p>
</div>
<p style='margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:
.0001pt'><font size=1 face=Arial><span style='font-size:8.0pt;font-family:Arial'>*******************************************************************************************************************
</span></font></p>
<p style='margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:
.0001pt'><font size=1 face=Arial><span style='font-size:8.0pt;font-family:Arial'>This
e-mail and any files or attachments transmitted with it contains Information
that is confidential and privileged. This document may contain Protected Health
Information (PHI) or other information that is intended only for the use of the
individual(s) and entity(ies) to whom it is addressed. If you are the intended
recipient, further disclosures are prohibited without proper authorization. If
you are not the intended recipient, any disclosure, copying, printing, or use
of this information is strictly prohibited and possibly a violation of federal
or state law and regulations. If you have received this information in error,
please delete it and notify Hamid Khaleghipour at 972-450-2868 immediately.
Thank you. </span></font></p>
<p style='margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:
.0001pt'><font size=1 face=Arial><span style='font-size:8.0pt;font-family:Arial'>*******************************************************************************************************************
</span></font></p>
</div>
<p class=MsoNormal style='margin-right:0in;margin-bottom:12.0pt;margin-left:
.5in'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></font></p>
</div>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> </span></font></p>
</div>
</body>
</html>