#46
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    May 2010
    Posts
    3
    Rep Power
    0
    Originally Posted by Shadow Wizard
    without source code we're practically helpless and can only guess.

    if you can convince them to give you the source code of the program it would
    be great, but chances for that are very very slim.

    my guess is that something went wrong with the database.. are you sure
    you put what you got from them (new database file) in the right place?
    Yep, I put it in the same place, I know because I had to over write the same file, same size. This has to be some kind of dll conflict of some sort, yes?
    MC
  2. #47
  3. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    Originally Posted by Murk1
    Yep, I put it in the same place, I know because I had to over write the same file, same size. This has to be some kind of dll conflict of some sort, yes?
    MC
    can't see how this can be DLL conflict, sorry.
    try the same program on different machine, see if it works.
  4. #48
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    May 2010
    Posts
    3
    Rep Power
    0
    Originally Posted by Shadow Wizard
    can't see how this can be DLL conflict, sorry.
    try the same program on different machine, see if it works.
    yup did that, does work on netbook running xp. Uninstalled and reinstalled gps software many times on desktop (trouble puter) Did the database switch, etc.
    M C
  6. #49
  7. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    Originally Posted by Murk1
    yup did that, does work on netbook running xp. Uninstalled and reinstalled gps software many times on desktop (trouble puter) Did the database switch, etc.
    M C
    sorry, without seeing the program source code can't really help any further.

    try uninstalling anything you recently put in the trouble maker machine..
  8. #50
  9. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0
    Imports System.DirectoryServices.AccountManagement
    Public Class Users
    Inherits System.Windows.Forms.Form

    Dim oNet As Object = CreateObject("Wscript.Network")
    Dim oDom As Object = GetObject("WinNT://" & oNet.userdomain)
    I'm getting this error with this bit of code, any clues guys? I've changed the Dim to an As objects but to no avail. New doesn't seem to do it for me and the other methods you've included in the original post don't seem to be working for me either.. Not sure what I'm doing wrong. I am calling on these variables from many different Subs if that makes any difference in the solution.
    Any help would be great, thanks =)
  10. #51
  11. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    CreateObject and GetObject are not part of .NET, you're
    trying to use old style VB code in .NET environment which is
    bad idea by all means.

    read this to learn how to properly use DirectoryServices in your code:
    http://www.codeproject.com/KB/system..._in_vbnet.aspx

    good luck!
  12. #52
  13. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0
    Ok thanks for the information, appreciate that and I will/have looked into it.
    I will have to re-write a fair bit to conform to the new ways but if I were interested in getting it to work right now as is, what is the problem with my code at the moment?
    Moving to using LDAP or directory services doesn't seem like it would solve the problem I'm having or rather the solution to this problem can't be achieved without shifting to newer methods, right?
  14. #53
  15. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    no idea, my initial guess is that "oNet" is null, thus the code crash on this part:
    oNet.userdomain
  16. #54
  17. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0
    Nope the code works fine when I use it in a sub, but when I use it in the class outside of a sub it provides that error suggesting I need to rename the variables with New, or something around the lines of what's discussed in this thread.

    I'm pretty new to programming in vb.net/c# so I'm probably doing it way wrong but I figured if I could declare all these variables in the entire class I wouldn't have to re-declare or "get" them as the "create" or "getObject" code infers, every time I need to use them. Still grasping the concept of reusing common functions/methods and things, excuse me in that department.
  18. #55
  19. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2011
    Posts
    1
    Rep Power
    0
    I know it has been ages since this was written, and while I have been in the game for quite some time and understood all that you listed above, I have to admit that I didn't always think about it.

    While this article has helped me focus on the problem I am having, which I know I shouldn't be having, it was the tone and flippancy of the post that appealed to me the most. For me it helps the understanding if there is just a touch of humor and reality to the information. If only all technical writings were so easy to grasp.

    So I registered just to say, thank you. Even if it is 6 years after you originally posted it. : )
  20. #56
  21. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    Originally Posted by Wolvie40
    I know it has been ages since this was written, and while I have been in the game for quite some time and understood all that you listed above, I have to admit that I didn't always think about it.

    While this article has helped me focus on the problem I am having, which I know I shouldn't be having, it was the tone and flippancy of the post that appealed to me the most. For me it helps the understanding if there is just a touch of humor and reality to the information. If only all technical writings were so easy to grasp.

    So I registered just to say, thank you. Even if it is 6 years after you originally posted it. : )
    Usually bumping is not accepted well but your case is exception.. thanks for sharing this with us and feel free to add comment on the post itself by clicking the icon above it, so everyone can see it without navigating to the last page.

    You're also welcome to share your problem in new thread if you still need help.
  22. #57
  23. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0
    Originally Posted by pebkac
    There is another possible solution. I knew there had to be because I had my application working on other computers, but one of them gave me this error (Windows XP).

    If you had previously gotten this error:

    "Failed to access IIS metabase"

    and fixed it with (at the command prompt)

    aspnet_regiis -ga IUSR_<computername>
    aspnet_regiis -ga IWAM_<computername>

    .. and subsequently you get the "Object reference ..." error

    then the fix is to run (at the command prompt)

    aspnet_regiis -i

    I don't know why this problem only occurred on one of my machines. Anyway it seems to be a common problem so I thought I'd post my solution as an alternative. I hope it helps someone.
    Thank you VERY MUCH for this post. I had a working web service. Then my work desktop was replaced with another one (still Windows XP), and when I installed the same web service on the new machine, I started getting these errors. I was fighting with this issue for a day and a half! Once I ran the aspnet_regiis -i command the problem was fixed.
    Thank you.
    Last edited by Shadow Wizard; September 19th, 2011 at 03:36 AM.
  24. #58
  25. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Nov 2011
    Posts
    6
    Rep Power
    0
    very nice job, dude... I see you really got into it, eh?
    we already have about 5 stickies in this forum, I'll consult with the others moderators and we'll see if there is room for another one... this might as well be attached to existing sticky tutorial.
    anyways, thanks - this would probably going to be very useful information.
    Last edited by Shadow Wizard; November 9th, 2011 at 02:41 AM. Reason: spam removed
  26. #59
  27. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    please help me


    i face this problem

    my CodeBehind is :

    Public Partial Class default2
    Inherits System.Web.UI.Page
    Public v1 As String
    Public u As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim a As Label
    a = CType(FormView1.FindControl("urlLabel"), Label)

    v1 = a.Text


    Session.Add("u", v1)

    End Sub

    End Class



    i recive this error

    Object reference not set to an instance of an object


    please help me to fix it
  28. #60
  29. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    Originally Posted by xname44
    i face this problem

    my CodeBehind is :

    Public Partial Class default2
    Inherits System.Web.UI.Page
    Public v1 As String
    Public u As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim a As Label
    a = CType(FormView1.FindControl("urlLabel"), Label)

    v1 = a.Text


    Session.Add("u", v1)

    End Sub

    End Class



    i recive this error

    Object reference not set to an instance of an object


    please help me to fix it
    Where is "urlLabel" defined in the .ASPX markup? Please show us the code.
    If it's inside repeater, you can't find it like this.

Similar Threads

  1. error: object reference not set to an instance of an object
    By aliaga61 in forum .NET Development
    Replies: 4
    Last Post: January 11th, 2005, 12:25 PM
  2. Replies: 0
    Last Post: August 20th, 2004, 08:18 AM
  3. Error: Object reference not set to an instance of an object.
    By zappa_justin in forum .NET Development
    Replies: 6
    Last Post: July 30th, 2004, 02:39 PM
  4. Error - Object reference not set to an instance of an object
    By ajegopinath in forum .NET Development
    Replies: 0
    Last Post: April 28th, 2004, 12:28 AM
  5. Replies: 8
    Last Post: December 29th, 2003, 12:17 AM

IMN logo majestic logo threadwatch logo seochat tools logo