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

Windows Communication Foundation .NET Discussion :

Http --> Https configuration


Sujet :

Windows Communication Foundation .NET

  1. #1
    Membre confirmé
    Avatar de topolino
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    1 901
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 1 901
    Points : 637
    Points
    637
    Par défaut Http --> Https configuration
    Bonjour,

    Parceque je veux faire une authentification personnalisé de mes web services je dois installer ssl sur mon serveur (ca c fait et ok) et changer mon web.config de mon service. Depuis que j'ai fait ce changement j'essaye de faire des tests et je me retrouve qu'avec des erreur 404.

    Ma config qui marche en HTTP
    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
    26
    27
    28
    29
     
    <system.serviceModel>
    		<services>
    			<service name="TEST.WCFServiceFacade.ExposedService" behaviorConfiguration="WCFWebServices.TESTBehavior">
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:59431/TESTServices.svc" />
              </baseAddresses>
            </host>
    				<endpoint address="soap" binding="basicHttpBinding" contract="TEST.WCFInterface.IClients"/><!--SOAP-->
            <endpoint address="rest" behaviorConfiguration="restBehavior" binding="webHttpBinding" contract="TEST.WCFInterface.IClientsRest"/>
            <endpoint address="restJSON" behaviorConfiguration="restBehavior" binding="webHttpBinding" contract="TEST.WCFInterface.IClientsRestJSON"/>
    				<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    			</service>
    		</services>
    		<behaviors>
    			<serviceBehaviors>
    				<behavior name="WCFWebServices.TESTBehavior">
    					<serviceMetadata httpGetEnabled="true" />
    					<serviceDebug includeExceptionDetailInFaults="true"/>
    				</behavior>
    			</serviceBehaviors>
          <endpointBehaviors>
            <behavior name="restBehavior">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
    	</system.serviceModel>

    Ma config qui ne marche pas en HTTPS
    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
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
     
    	<system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding name="TransportSecurity">
              <security mode="Transport">
                <transport clientCredentialType="None"/>
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
        <services>
    			<service name="TEST.WCFServiceFacade.ExposedService" behaviorConfiguration="WCFWebServices.TESTBehavior">
            <host>
              <baseAddresses>
                <add baseAddress="https://localhost:59431/TESTServices.svc" />
              </baseAddresses>
            </host>
            <endpoint address="soap" binding="basicHttpBinding" contract="TEST.WCFInterface.IClients"/><!--SOAP-->
            <endpoint address="rest" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="TEST.WCFInterface.IClientsRest"/>
            <endpoint address="restJSON" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="TEST.WCFInterface.IClientsRestJSON"/>
    				<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
    			</service>
    		</services>
    		<behaviors>
    			<serviceBehaviors>
    				<behavior name="WCFWebServices.TESTBehavior">
    					<serviceMetadata httpsGetEnabled="true" />
    					<serviceDebug includeExceptionDetailInFaults="true"/>
    				</behavior>
    			</serviceBehaviors>
          <endpointBehaviors>
            <behavior name="restBehavior">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
    	</system.serviceModel>
    Avez-vous une idee du pb ?

    Merci
    MCTS Microsoft.
    La conception : Prendre le temps pour gagner du temps.

  2. #2
    Membre confirmé
    Avatar de topolino
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    1 901
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 1 901
    Points : 637
    Points
    637
    Par défaut
    J'ai essayé une autre methode mais je n'ai que l'address rest et soap qui fonctionne.
    restJSON ne fonctionne pas !!!

    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
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
     
    <system.serviceModel>
        <services>
          <service name="TEST.WCFServiceFacade.ExposedService" behaviorConfiguration="WCFWebServices.TESTBehavior">
            <host>
              <baseAddresses>
                <add baseAddress="https://localhost:59431/TESTServices.svc" />
              </baseAddresses>
            </host>
            <endpoint address="soap" bindingConfiguration="soapBinding" binding="basicHttpBinding" contract="TEST.WCFInterface.IClients"/>
            <endpoint address="rest" bindingConfiguration="webBinding" behaviorConfiguration="restBehavior" binding="webHttpBinding" contract="TEST.WCFInterface.IClientsRest"/>
            <endpoint address="restJSON" binding="webHttpBinding" behaviorConfiguration="restBehavior" contract="TEST.WCFInterface.IClientsRestJSON"/>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
          </service>
        </services>
        <bindings>
          <basicHttpBinding>
            <binding name="soapBinding" >
              <security mode="TransportWithMessageCredential"  >
                <transport clientCredentialType="Basic" />
              </security>
            </binding>
          </basicHttpBinding>
          <webHttpBinding>
            <binding name="webBinding">
              <security mode="Transport" >
              </security>
            </binding>
          </webHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="WCFWebServices.TESTBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="restBehavior">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
        </behaviors>
      </system.serviceModel>
    Y a t il un pb avec JSON et Https ?
    MCTS Microsoft.
    La conception : Prendre le temps pour gagner du temps.

  3. #3
    Membre à l'essai
    Homme Profil pro
    Networking4all
    Inscrit en
    Mars 2011
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Networking4all
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mars 2011
    Messages : 14
    Points : 10
    Points
    10
    Par défaut
    Bonjour,

    de quel type de certificat s'agit-il ?

    1) d'un certificat auto-généré
    2) ou d'un certificat d'une Autorité de Certification

  4. #4
    Membre confirmé
    Avatar de topolino
    Profil pro
    Inscrit en
    Juillet 2003
    Messages
    1 901
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2003
    Messages : 1 901
    Points : 637
    Points
    637
    Par défaut
    auto genere.

    En faite tous fonctionne via la programmation et FF et Chrome. Ce qui ne marchait pas c'est d'avoir le retour JSON en HTTPS sous IE.

    Desolé de la derange
    MCTS Microsoft.
    La conception : Prendre le temps pour gagner du temps.

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

Discussions similaires

  1. redirection http://site => https://site
    Par FiSh MoOn dans le forum Apache
    Réponses: 6
    Dernier message: 27/03/2006, 17h34
  2. Passer de http en https pour un meme site
    Par m@estro dans le forum Réseau
    Réponses: 5
    Dernier message: 27/10/2005, 13h33
  3. [Reseau][http] Ports Http
    Par Landolsi dans le forum Applications
    Réponses: 10
    Dernier message: 22/09/2005, 14h29
  4. Apache : HTTP et HTTPS
    Par AurelBUD dans le forum Apache
    Réponses: 4
    Dernier message: 29/08/2005, 15h48
  5. [HTTP] Entete http
    Par jawelle dans le forum Entrée/Sortie
    Réponses: 5
    Dernier message: 20/07/2005, 11h09

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