Hi Suman,<br><br>I suspect  <font style="color: rgb(255, 0, 0);" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">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><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"></span></font><br><br><div class="gmail_quote">2009/7/8 Suman Chatterjee <span dir="ltr">&lt;<a href="mailto:schatterjee@addisontx.gov">schatterjee@addisontx.gov</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Hi all,</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; 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><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">In the line </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">mapObj map= new mapObj(System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”].toString())</span></font></p>


<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">It is generating the error “ Object reference not set
to an instance of an object”</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">How can I correct this? If anyone helps me in correcting it,
it will be great.</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Suman</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

</div>


<p style="margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: &#39;Arial&#39;; font-size: 8pt;">******************************************************************************************************************* </span></p>

<p style="margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: &#39;Arial&#39;; font-size: 8pt;">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></p>

<p style="margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: &#39;Arial&#39;; font-size: 8pt;"> </span></p>
<p style="margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: &#39;Arial&#39;; font-size: 8pt;">******************************************************************************************************************* </span></p>

<p style="margin-top: 0pt; margin-bottom: 0pt;"><span style="font-family: &#39;Arial&#39;; font-size: 8pt;"> </span></p>
</div>


<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><br>
<br></blockquote></div><br>