IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

ma ConnectionString est surement mal configuré


Sujet :

ASP.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre très actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Octobre 2006
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2006
    Messages : 128
    Par défaut ma ConnectionString est surement mal configuré
    voila, je viens de créer un site en asp.net fonctionnel sur mon ordi (local).
    une fois que je l'ai copier sur le serveur hébérgeur web, les pages sans base de données (statiques) fontionnent et les pages qui font appellent à une base de donnée niet!!!!

    configuration dans web.config
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    <add name="nomdemaconnection"
                  connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mabase.mdf;Integrated Security=SSPI;User Instance=True"
                  providerName="System.Data.SqlClient" />
     
        </connectionStrings>
    merci pour l'eventuel aide.

  2. #2
    Membre confirmé

    Inscrit en
    Novembre 2003
    Messages
    168
    Détails du profil
    Informations forums :
    Inscription : Novembre 2003
    Messages : 168
    Par défaut
    Comment ça niet ?!!! C'est quoi le message d'erreur que tu reçois ?

  3. #3
    Membre très actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Octobre 2006
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2006
    Messages : 128
    Par défaut
    je reçois juste une page qui me dis que je dois créer une page htm pour qu'elle soit affichée en cas d'erreur!
    je l'ai créée et elle sort à chaque fois
    code faisant appel à la page d'erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     <customErrors defaultRedirect="~/HTMLPage.htm" />

  4. #4
    Membre très actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Octobre 2006
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2006
    Messages : 128
    Par défaut voici le message d erreur
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

  5. #5
    Membre confirmé

    Inscrit en
    Novembre 2003
    Messages
    168
    Détails du profil
    Informations forums :
    Inscription : Novembre 2003
    Messages : 168
    Par défaut
    Citation Envoyé par getule Voir le message
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    As tu lu ce message d'erreur ? ou ptetre que tu ne comprends pas l'anglais
    Il dit exactement ce que j'avais dit, nous n'avons pas le détail du message d'erreur !

    Modifie ton web.config en mettant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <customErrors mode="off" />
    Ensuite exécute ta page, ça va t'afficher une page qui explique probablement pourquoi la chaine de connexion n'a pas fonctionné, postes le nous ensuite.

  6. #6
    Membre très actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Octobre 2006
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2006
    Messages : 128
    Par défaut
    appremment il ne reconnait pas ma table "annonce" alors qu'il accéde à la base, je crois! lol
    voici le code d erreur en entier

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Invalid object name 'annonce'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'annonce'.

    Source Error:

    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.

    Stack Trace:


    [SqlException (0x80131904): Invalid object name 'annonce'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
    System.Data.SqlClient.SqlDataReader.get_MetaData() +83
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
    System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +130
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1297
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
    System.Web.UI.WebControls.ListView.PerformSelect() +57
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.ListView.CreateChildControls() +55
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +44
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

  7. #7
    Membre confirmé

    Inscrit en
    Novembre 2003
    Messages
    168
    Détails du profil
    Informations forums :
    Inscription : Novembre 2003
    Messages : 168
    Par défaut
    Hé bien cette page d'erreur que tu viens de créer masque la page avec le véritable message d'erreur et qui va nous permettre de résourdre le pbm.

    donc ce que je te suggère c'est de mettre dans ton web.config :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <customErrors mode="off" />
    Ensuite quand l'erreur se produira tu recevra un message d'erreur qui en dit long sur le problème qui s'est produit et que tu pourras nous poster ici.

    Entre temps, pour voir comment formuler une chaine de connexion dans .NET pour n'importe quelle BD tu peux consulter ce site : http://www.connectionstrings.com/

  8. #8
    Membre très actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Octobre 2006
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2006
    Messages : 128
    Par défaut c'est mis
    et le message d'erreur est en haut
    merci pour ton aide

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Apache SSL fonctionne mais est mal configuré
    Par hendrix67 dans le forum Apache
    Réponses: 7
    Dernier message: 10/04/2010, 13h44
  2. securité niveau utilisateur mal configurée
    Par torNAdE dans le forum Sécurité
    Réponses: 1
    Dernier message: 03/08/2006, 09h26
  3. ERREUR : Application mal configuré
    Par picsou33 dans le forum C++
    Réponses: 7
    Dernier message: 19/06/2006, 21h51
  4. [Wamp] Serveur mal configuré ?
    Par Pyrhus dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 4
    Dernier message: 29/05/2006, 01h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo