Object reference not set to an instance of an object.

Last post 07-28-2005, 9:05 AM by Zanchey. 5 replies.
Sort Posts: Previous Next
  •  07-14-2005, 11:20 AM 8709

    Object reference not set to an instance of an object.

    (Good grief, the post text editor has more options than Microsoft Word.)

    Just starting out on our trial license, and I'm running into a strange error initializing the control.



    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
    DotNetGallery.Gallery.GetFormClientID() +5
    DotNetGallery.Gallery.clientGoto_Script() +259
    DotNetGallery.Gallery.AddClientScript() +57
    DotNetGallery.Gallery.OnPreRender(EventArgs e) +127
    System.Web.UI.Control.PreRenderRecursiveInternal() +62
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Page.ProcessRequestMain() +1476



    This happens both in my code and in the provided show.aspx, but not in the default.aspx provided.

    All assistance appreciated - I can provide further information on request.

    David Adam
    http://www.wamss.org.au/
  •  07-18-2005, 12:14 PM 8835 in reply to 8709

    Re: Object reference not set to an instance of an object.

    Is your site online so you can provide the URL through the PM?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-26-2005, 12:23 PM 9063 in reply to 8835

    unhandled exception

    I'm having a similar problem with the dotnetgallery install. Any advice?





    Server Error in '/' Application.
    ------------------------------------------------------------------------

    Could not find a part of the path "D:\hshome\hcebeta\mydomain.org\samplefolder\gallery.xml".
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\hshome\hcebeta\mydomain.org\samplefolder\gallery.xml".
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:


    [DirectoryNotFoundException: Could not find a part of the path "D:\hshome\hcebeta\mydomain.org\samplefolder\gallery.xml".]
    System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +45
    System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +34
    System.Data.DataSet.WriteXmlSchema(String fileName) +49
    DotNetGallery.Gallery.InitializeXMLFile(String xmlfile_path) +545

    [FileNotFoundException: The file couldn't be accessed. This may be a security problem.]
    DotNetGallery.Gallery.InitializeXMLFile(String xmlfile_path) +584
    DotNetGallery.Gallery.get__xmlsource() +199

    [FileNotFoundException: The file couldn't be accessed. This may be a security problem.]
    DotNetGallery.Gallery.get__xmlsource() +314
    DotNetGallery.Gallery.BindData() +872
    DotNetGallery.Gallery.OnPreRender(EventArgs e) +119
    System.Web.UI.Control.PreRenderRecursiveInternal() +62
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Page.ProcessRequestMain() +1499


    ------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032




    I can PM you the url.


    Mike
  •  07-26-2005, 1:10 PM 9064 in reply to 9063

    Re: unhandled exception

    Does the "samplefolder" folder exist in the root of your web site?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-26-2005, 3:09 PM 9070 in reply to 9064

    Re: unhandled exception

    I moved samplefolder from the web application directory to the root directory and now everything works.

    Thanks...

  •  07-28-2005, 9:05 AM 9111 in reply to 8835

    Re: Object reference not set to an instance of an object.

    Thank you for your replies.

    I discovered that the problem with show.aspx was that I was not providing an ?album argument.

    The problem with my pages was... well, I feel a bit stupid, but nevertheless:

    I write all my code by hand (for various reasons), using a non-MS IDE. I had forgotten to insert the <form runat="server" ID="mainform"> tags into the source of my page.

    It works now (well, more or less).

    Thanks for your help!
View as RSS news feed in XML