Re: [mapserver-users] Object reference not set to an instance of an object

2009-07-08 Thread Tamas Szekeres
Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”]
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.

Best regards,

Tamas


2009/7/8 Suman Chatterjee 

>  Hi all,
>
> I am trying to develop an application in C# (VS2005) with mapscript. I saw
> the material of Paolo. But I am facing a problem
>
>
>
> In the line
>
>
>
> mapObj map= new
> mapObj(System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”].toString())
>
>
>
> It is generating the error “ Object reference not set to an instance of an
> object”
>
>
>
> How can I correct this? If anyone helps me in correcting it, it will be
> great.
>
>
>
> Suman
>
>
>
>
>
> ***
>
>
> 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.
>
>  
> ***
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-09 Thread Suman Chatterjee
Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  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.

Best regards,

Tamas



2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I
saw the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Ap
ache/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of
an object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

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. 


*** 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

 


***
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.

***


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Object reference not set to an instance of an object

2009-07-09 Thread Tamas Szekeres
2009/7/9 Suman Chatterjee 

>
> The line
> System.Configuration.ConfigurationManager.AppSettings[“C:/ms4w/Apache/htdocs/mapservertest/Addison.map”]
>
>
>  Is throwing error. No idea what it is trying to do.
>
> You probably have to give the variable name of the application
configuration in the indexer to the value.

Best regards,

Tamas
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-09 Thread Pano Voudouris
Hi Suman,

Check your web.config file- You probably have an entry similar to:





.

 

In your code you want to create the mapfile object by reading the mapfile
path from web.config. So what you need to do is:

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["mapfile"].toSt
ring())

(or whatever the variable in the web.config is called)

 

You don't really want to use a constant to point to the mapfile...

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Suman
Chatterjee
Sent: 09 July 2009 17:50
To: Tamas Szekeres
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance of an
object

 

Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/htdocs
/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance of an
object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/htdocs
/mapservertest/Addison.map"]  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.

Best regards,

Tamas

2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I saw
the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache
/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of an
object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

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. 


*** 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

 

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-10 Thread Suman Chatterjee
 

 

-Original Message-
From: Pano Voudouris [mailto:pvoudou...@gaiocorp.com] 
Sent: Thursday, July 09, 2009 11:48 AM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

Check your web.config file- You probably have an entry similar to:





...

 

In your code you want to create the mapfile object by reading the
mapfile path from web.config. So what you need to do is:

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["mapfile"].
toString())

(or whatever the variable in the web.config is called)

 

You don't really want to use a constant to point to the mapfile...

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Suman
Chatterjee
Sent: 09 July 2009 17:50
To: Tamas Szekeres
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  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.

Best regards,

Tamas

2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I
saw the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Ap
ache/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of
an object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

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. 


*** 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

 


***
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.

***


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-10 Thread Suman Chatterjee
Hi Pano,

Thank you very much. It worked. Yes, it was the thing I wanted to do.
Now I understand the meaning of the ConfigurationManager.

 

Thank You once again.

Suman

 

 

-Original Message-
From: Pano Voudouris [mailto:pvoudou...@gaiocorp.com] 
Sent: Thursday, July 09, 2009 11:48 AM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

Check your web.config file- You probably have an entry similar to:





...

 

In your code you want to create the mapfile object by reading the
mapfile path from web.config. So what you need to do is:

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["mapfile"].
toString())

(or whatever the variable in the web.config is called)

 

You don't really want to use a constant to point to the mapfile...

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Suman
Chatterjee
Sent: 09 July 2009 17:50
To: Tamas Szekeres
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  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.

Best regards,

Tamas

2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I
saw the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Ap
ache/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of
an object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

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. 


*** 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

 


***
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.

***


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users