Professional Web Applications Themes

Unexplained Instance Error - ASP.NET General

I am getting the following error: " Object reference not set to an instance of an object." The strange thing is that I AM creating a new instance of the object in the PageLoad event Iin the code behind) just prior to using it's properties, and in fact, the app ran perfectly until only recently when I installed Project Server on the web server, which should have had no impact. Is there a security setting or something else that might compromise instantiating classes? I'm lost....

  1. #1

    Default Unexplained Instance Error

    I am getting the following error: " Object reference not
    set to an instance of an object."

    The strange thing is that I AM creating a new instance of
    the object in the PageLoad event Iin the code behind)
    just prior to using it's properties, and in fact, the app
    ran perfectly until only recently when I installed
    Project Server on the web server, which should have had
    no impact.

    Is there a security setting or something else that might
    compromise instantiating classes? I'm lost.



    Marty Cruise Guest

  2. #2

    Default Re: Unexplained Instance Error

    Without looking at your code, there is no way to tell.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Some things just happen.
    Everything else occurs.

    "Marty Cruise" <mCruisenoSpam.com> wrote in message
    news:03ce01c34195$f3a168c0$a101280aphx.gbl...
    > I am getting the following error: " Object reference not
    > set to an instance of an object."
    >
    > The strange thing is that I AM creating a new instance of
    > the object in the PageLoad event Iin the code behind)
    > just prior to using it's properties, and in fact, the app
    > ran perfectly until only recently when I installed
    > Project Server on the web server, which should have had
    > no impact.
    >
    > Is there a security setting or something else that might
    > compromise instantiating classes? I'm lost.
    >
    >
    >

    Kevin Spencer Guest

  3. #3

    Default Re: Unexplained Instance Error

    I'm not sure why you're not getting an error on the following line:
    > Public myOrder As New cOrder
    It should read (assuming that the New constructor for cOrder takes no
    arguments):

    Public myOrder As New cOrder()

    See if that doesn't fix it.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Some things just happen.
    Everything else occurs.


    "Marty Cruise" <mCruisenoSPam.com> wrote in message
    news:09ea01c3419d$eeef31b0$a001280aphx.gbl...
    > Here is the relevant code. The error occurs when the
    > myOrder.getInfo method is called:
    >
    > =============================
    > Imports cLib
    >
    > Public Class frmPrintTR
    > Inherits System.Web.UI.Page
    > Public myOrder As New cOrder
    > Protected WithEvents lblShipTo As
    > System.Web.UI.WebControls.Label
    > Protected WithEvents Button1 As
    > System.Web.UI.WebControls.Button
    > Protected WithEvents Button2 As
    > System.Web.UI.WebControls.Button
    > Protected WithEvents btnPrint As
    > System.Web.UI.WebControls.Button
    > Protected WithEvents btnClose As
    > System.Web.UI.WebControls.Button
    > Protected WithEvents pDesiredVendor As
    > System.Web.UI.WebControls.Panel
    > Protected WithEvents pComments As
    > System.Web.UI.WebControls.Panel
    > Protected WithEvents pCommentsNone As
    > System.Web.UI.WebControls.Panel
    > Protected WithEvents pItemsNone As
    > System.Web.UI.WebControls.Panel
    > Protected WithEvents repItems As
    > System.Web.UI.WebControls.Repeater
    >
    > ' # Region stuff omitted from this posting
    >
    > Private Sub Page_Load(ByVal sender As Object, ByVal e
    > As System.EventArgs) Handles MyBase.Load
    > If Request.QueryString("TRID") = "" Then
    > Exit Sub
    > End If
    >
    > myOrder.GetInfo(CInt(Request.QueryString("TRID")))
    > repComments.DataSource = myOrder.Comments
    > repComments.DataBind()
    >
    > =============================
    >
    >
    > >-----Original Message-----
    > >Check your assumptions:
    > >
    > >if your control is actually there, does the
    > >property/method you use reference yet another control
    > that
    > >is not there?
    > >
    > >Are there other objects referenced on the offending
    > line?
    > >and finally, have you used the debugger and stepped into
    > >the routine causing the problem and checked the object
    > >variables in question?
    > >
    > >>-----Original Message-----
    > >>I am getting the following error: " Object reference
    > not
    > >>set to an instance of an object."
    > >>
    > >>The strange thing is that I AM creating a new instance
    > of
    > >>the object in the PageLoad event Iin the code behind)
    > >>just prior to using it's properties, and in fact, the
    > app
    > >>ran perfectly until only recently when I installed
    > >>Project Server on the web server, which should have had
    > >>no impact.
    > >>
    > >>Is there a security setting or something else that
    > might
    > >>compromise instantiating classes? I'm lost.
    > >>
    > >>
    > >>
    > >>.
    > >>
    > >.
    > >

    Kevin Spencer Guest

  4. #4

    Default Re: Unexplained Instance Error

    Error still occurs...
    Marty Cruise Guest

  5. #5

    Default Unexplained Instance Error

    try reading ALL posts to your answer and follow the
    recommendations given...

    >-----Original Message-----
    >I am getting the following error: " Object reference not
    >set to an instance of an object."
    >
    >The strange thing is that I AM creating a new instance of
    >the object in the PageLoad event Iin the code behind)
    >just prior to using it's properties, and in fact, the app
    >ran perfectly until only recently when I installed
    >Project Server on the web server, which should have had
    >no impact.
    >
    >Is there a security setting or something else that might
    >compromise instantiating classes? I'm lost.
    >
    >
    >
    >.
    >
    David Waz.. Guest

Similar Threads

  1. Unexplained ColdFusion Error Plz Help!!
    By joeman77 in forum Coldfusion Database Access
    Replies: 6
    Last Post: September 28th, 07:13 PM
  2. CF Instance and cfquery login error
    By mach10 in forum Coldfusion Server Administration
    Replies: 1
    Last Post: July 18th, 04:40 PM
  3. Is someone phoning home? Unexplained traffic on dial up
    By Matt Broughton in forum Mac Networking
    Replies: 15
    Last Post: September 6th, 12:54 AM
  4. Replies: 0
    Last Post: July 14th, 06:04 PM
  5. Replies: 1
    Last Post: December 29th, 09:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139