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

Silverlight Discussion :

Custom tool error: Failed to generate code for the service reference


Sujet :

Silverlight

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    207
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 207
    Par défaut Custom tool error: Failed to generate code for the service reference
    Bonjour,
    Je pouvais compiler mon projet sans la moindre erreur, j'ai tenté d'ajouter une fonction dans mon sercice wcf, je l'ai lancé dans le navigateur, j'ai fait un update.
    Depuis, j'ai une erreur :
    Error 17 Custom tool error: Failed to generate code for the service reference 'MonService'. Please check other error and warning messages for details. E:\SilverlightApplication2\SilverlightApplication2\Service References\MonService\Reference.svcmap 1 1 SilverlightApplication2
    J'ai alors supprimé la fonction que je venais de créer mais toujours la même erreur, mon service n'est plus reconnu.

    Est ce quelqu'un pourrait m'aider?

    Merci.

  2. #2
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    207
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 207
    Par défaut
    Lorsque je lance mon service dans mon naviguteur je n'ai pas d'erreur :
    You have created a service.

    To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax: ...
    J'ai une erreur dans mon projet et 16 warnings :

    (11 fois celui ci)
    Custom tool warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Custom tool warning: Cannot import wsdl:portType
    Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
    Error: Exception has been thrown by the target of an invocation.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IServiceWCF']
    Warning 13 Custom tool warning: Cannot import wsdl:binding
    Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
    XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IServiceWCF']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IServiceWCF']
    Warning 14 Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IServiceWCF']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='ServiceWCF']/wsdl:port[@name='BasicHttpBinding_IServiceWCF']

    Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.
    Custom tool warning: Exception has been thrown by the target of an invocation.


    Je n'ai jamais modifié mon web.config comme cela fonctionnait au départ.

    Le voici :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    <?xml version="1.0"?>
    <configuration>
     
        <connectionStrings>
            <add name="****" connectionString="Data Source=*****;Initial Catalog=****;Persist Security Info=True;User ID=****;Password=****"
                providerName="System.Data.SqlClient" />
        </connectionStrings>
        <system.web>
            <compilation debug="true" targetFramework="4.0" />
        </system.web>
        <system.webServer>
          <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>
     
        <system.serviceModel>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="false" />
                    </behavior>
                </serviceBehaviors>
            </behaviors>
        </system.serviceModel>
    </configuration>

  3. #3
    Expert confirmé
    Avatar de Skyounet
    Homme Profil pro
    Software Engineer
    Inscrit en
    Mars 2005
    Messages
    6 380
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : Etats-Unis

    Informations professionnelles :
    Activité : Software Engineer
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 6 380
    Par défaut
    Y'a pas de endpoint dans ton web.config.

    Supprimer la partie <system.serviceModel> de ton web.config.
    Supprime ton service et recrée le.

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    207
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 207
    Par défaut
    J'ai supprimé mon service puis je l'ai rajouté sous un autre nom, et la plus aucunne erreur.
    Je n'ai pas modifié mon web.config
    C'est vraiment bizarre cette erreur.
    ça peut venir d'où?

  5. #5
    Expert confirmé
    Avatar de Skyounet
    Homme Profil pro
    Software Engineer
    Inscrit en
    Mars 2005
    Messages
    6 380
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : Etats-Unis

    Informations professionnelles :
    Activité : Software Engineer
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 6 380
    Par défaut
    Citation Envoyé par maxwel56 Voir le message
    J'ai supprimé mon service puis je l'ai rajouté sous un autre nom, et la plus aucunne erreur.
    Je n'ai pas modifié mon web.config
    C'est vraiment bizarre cette erreur.
    ça peut venir d'où?
    Erreur de config.
    Sans endpoint dans le web.config ça ne peut pas fonctionner.

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2009
    Messages
    207
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2009
    Messages : 207
    Par défaut
    ba j'en ai toujours pas et ça fonctionne

Discussions similaires

  1. Error 404: Resource not found for the segment
    Par jkamelin dans le forum Microsoft Dynamics CRM
    Réponses: 4
    Dernier message: 07/02/2018, 10h01
  2. error: Failed to generate code for the service reference
    Par technosmile dans le forum Silverlight
    Réponses: 2
    Dernier message: 18/12/2012, 16h38
  3. Custom tool error: Failed to generate code.
    Par jkamelin dans le forum C#
    Réponses: 2
    Dernier message: 15/09/2009, 18h18
  4. [DEBUG] Found No Interfaces. Generating Code for Types
    Par Battosaiii dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 18/08/2006, 15h26

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