Hi,

I would like to report an anoying little bug. I've just spent 1 hour spotting the differences and finaly came up with the answer. I should have seen it earlier but was completely blinded by the fact that I wanted to see the problem in the connectionstring. The problem however was in a missing 'provider' attribute in the Domain tag.

The unclear exception 'Object reference not set to an instance of an object' mislead me completely.

Causes exception:

<domain name="Default" upgradeMode="Recreate"
        connectionString="Data Source=DIARTIS-SQL1\SQL2008;Initial Catalog=PaulsDB02;Persist Security Info=True;User ID=klib;Password=xxxxxxxxxxx;MultipleActiveResultSets=True" >

Runs fine:

<domain name="Default" upgradeMode="Recreate" provider="sqlserver"
        connectionString="Data Source=DIARTIS-SQL1\SQL2008;Initial Catalog=PaulsDB02;Persist Security Info=True;User ID=klib;Password=xxxxxxxxxxx;MultipleActiveResultSets=True" >

Regards Paul Sinnema Diartis AG


Updated at 08.06.2010 7:42:24

Bump


Updated at 20.06.2010 6:38:08

Hi,

Just noticed that the examples that are generated in the App.config and Web.config files for a new project also miss the provider. That's how the error was created in the first place (I took the example for 'sqlserver' and did not use the ConnectionUrl but changed it to ConnectionString). Aha, I probably don't need the provider when I use a ConnectionUrl? That would explain the confusion I guess.

Regards Paul Sinnema Diartis AG

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Jun 06 '10 at 08:54

Paul%20Sinnema's gravatar image

Paul Sinnema
261878896

Hello Paul,

To be fixed.

I've opened the following issue: http://code.google.com/p/dataobjectsdot ... ail?id=689

(Jun 06 '10 at 08:54) Dmitri Maximov Dmitri%20Maximov's gravatar image

Fixed

(Jun 06 '10 at 08:54) Denis Krjuchkov Denis%20Krjuchkov's gravatar image

> Aha, I probably don't need the provider when I use a ConnectionUrl?

Yes, exactly: provider there is detected from protocol part.

(Jun 06 '10 at 08:54) Alex Yakunin Alex%20Yakunin's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA