The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Provide error handling information for failed connections

Last post 04-07-2008, 6:46 PM by RobHudson. 2 replies.
Sort Posts: Previous Next
  •  04-07-2008, 3:15 PM 8763

    Provide error handling information for failed connections

    The following line should fire an exception if there is any problem with the connection properties:

    Code:
    EntitySpaces.Interfaces.esConfigSettings.ConnectionInfo.Connections.Add(conn)

     

    I was getting a generic "Object reference not set to an instance of an object." error when I tried to load an element.  There were no indications whatsoever as to the cause of the error.

    I spent 4 hours trying to troubleshoot why I couldn't get a database connection, looking at all kinds of issues related to the connection string, firewall issues, and protocol... before it was discovered that the Connection Provider is case sensitive. 

    Here was the offending line of code that took 4 hours to locate and change:

    Code:
    conn.Provider = "EntitySpaces.SQLClientProvider"
    Thanks,
    Rob Hudson
    MyDistrict.Net
    There are 10 kinds of people in the world... Those who understand binary, and those who don't.
  •  04-07-2008, 4:35 PM 8768 in reply to 8763

    Re: Provide error handling information for failed connections

    Very good comments, just so I know are you using our ES2007 or ES2008 Trial version? In ES2008 we have much better error reporting, but I agree, we should bullet proof this cause that is where new folks could run into trouble, I will test this exact scenario (and others related) and make sure we give valuable errors back.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  04-07-2008, 6:46 PM 8770 in reply to 8768

    Re: Provide error handling information for failed connections

    Thank you very much.  This happened in the current build of EntitySpaces 2007.
    There are 10 kinds of people in the world... Those who understand binary, and those who don't.
View as RSS news feed in XML