By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,276 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,276 IT Pros & Developers. It's quick & easy.

Error: Object reference not set to an instance of an object

P: n/a
Dear all,
I have created personalized configuration sections in my web project
following the instructions described in this page
http://msdn.microsoft.com/library/sp...onsections.asp

The problem is that I using the same code and I get the error "Object
reference not set to an instance of an object" in the line where I try to
read the first parameter (in the page attached : value1 =
CType(sampleTable("setting1"), String)).

I have made some investigations and this error occurs when you don't create
the object with new. The problem is that in this case is not possible because
IDictionary is an interfaz.

I have also investigated that it could be a version problem, here you can
find the versions I'm using Microsoft .NET Framework, Version:1.1.4322.573
ASP.NET Version:1.1.4322.573

can you help me?

Thank you very much.

Regards,
Paloma GarcĂ*a.
Sep 26 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Paloma García wrote:
Dear all,
I have created personalized configuration sections in my web project
following the instructions described in this page
http://msdn.microsoft.com/library/sp...onsections.asp

The problem is that I using the same code and I get the error "Object
reference not set to an instance of an object" in the line where I try to
read the first parameter (in the page attached : value1 =
CType(sampleTable("setting1"), String)).
I just enetered the exact code from that article and it worked fine.
Did you change the code any? Perhaps changing the section name from
sampleSection to something else? If you did, make sure that the case
matches because it is case sensitive.

I have made some investigations and this error occurs when you don't create
the object with new. The problem is that in this case is not possible because
IDictionary is an interfaz.
That is right, the sampleTable object which is an IDictionary, should
not be created with new because the ConfigurationSettings.GetConfig
method should return an IDictionary object (after casting).

I have also investigated that it could be a version problem, here you can
find the versions I'm using Microsoft .NET Framework, Version:1.1.4322.573
ASP.NET Version:1.1.4322.573


I doubt your version number has anything to do with the problem. My
suggestion would be to post the code and perhaps we can see what might
the problem be.

Sep 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.