ASP.Net 2.0 QuickStart: Object reference not set to an instance of an object

J

J.S.

I am trying to use the web.config encryption sample at
http://beta.asp.net/QUICKSTART/util...ptedSection.src&file=EncryptedSection_cs.aspx

However, this line is giving me an error:

AppSettingsEncrypted.Text = "\r\n" +
Server.HtmlEncode(appSettingsXml.OuterXml);

The error message includes this information:

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

I would appreciate any pointers in this regard.

Thanks,
J.S.

--
 
J

J.S.

Pat,

I have these namespaces in my page:

<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System.Xml" %>

Thanks,
J.S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top