OVH Cloud OVH Cloud

Pb connexion BD

1 réponse
Avatar
Ced
Bonjour,

J'ai un probl=E8me de connexion =E0 ma base de donn=E9es,=20
lorsque mon code est ex=E9cut=E9 une exception est g=E9n=E9r=E9e :=20
Object reference not set to an instance of an object

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

Dans mon code source j'appelle la chaine suivante pour me=20
connecter :=20

<add key=3D"ConnectionString"=20
value=3D"server=3Dipserveur;Trusted_Connection=3Dtrue;database=3Dm
abase" />

Est-ce que quelqu'un sait o=F9 est le probl=E8me ?

Merci=20

Ced

1 réponse

Avatar
Kati
Bonjour,

Je crois que tu as oublié de renseigner le mot de passe
et le nom d'utilisateur.
Essaie de remplacer Trusted_Connection=true par user
id=tonlogin;password=tonpasswd
Normalement ça devrait marcher.

Kati

-----Message d'origine-----
Bonjour,

J'ai un problème de connexion à ma base de données,
lorsque mon code est exécuté une exception est générée :
Object reference not set to an instance of an object

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.

Dans mon code source j'appelle la chaine suivante pour


me
connecter :

<add key="ConnectionString"
value="server=ipserveur;Trusted_Connection=true;database=


m
abase" />

Est-ce que quelqu'un sait où est le problème ?

Merci

Ced
.