Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
226 views
in Technique[技术] by (71.8m points)

c# - WCF Service not hitting from postman over https

Before adding SSL certificate postman query is hitting. But when i added SSL certificate, Postman request is not working. I have attached file of postman request and following is my webConfig file. It is giving Error 400 Not Found.

enter image description here

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <section name="SmartTrack.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
          <section name="CMSWebService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
      </configSections>
      <connectionStrings>
        <add name="SmartTrack.Properties.Settings.connectionstring" connectionString="Data Source=localhost;Initial Catalog=CommandControl2.3;User ID=sa;Password=smarti123#" />
      </connectionStrings>
      <appSettings>
        <add key="appVersion" value="15" />
        <add key="appCode" value="1.2.3" />
        <add key="appUpdatePriority" value="1" />
      </appSettings>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>
      <system.serviceModel>
        <bindings />
        <client />
        <serviceHostingEnvironment multipleSiteBindingsEnabled="True" />
        <services>
          <service behaviorConfiguration="Default" name="SmartTrack.CMSWebService">
            <endpoint address="" behaviorConfiguration="webBehavior" binding="webHttpBinding" contract="SmartTrack.ISmartTrack" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


          </service>
        </services>
        <behaviors>
          <endpointBehaviors>
            <behavior name="webBehavior">
              <webHttp helpEnabled="true" />


            </behavior>
          </endpointBehaviors>
          <serviceBehaviors>
            <behavior name="Default">
              <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
              <serviceMetadata httpGetEnabled="true"/>

            </behavior>
            <behavior name="">
        <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="true"/>
        <serviceAuthorization
          serviceAuthorizationManagerType
            =" WcfWebHttpIISHostingSample.RestAuthorizationManager, WcfWebHttpIISHostingSample"/>
      </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
        <directoryBrowse enabled="true" />

      </system.webServer>
      <applicationSettings>
        <SmartTrack.Properties.Settings>
          <setting name="SYSTEM_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="TRANSACTION_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="COMMAND_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="EXCEPTION_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="ERROR_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="CONFIG_LOGLEVEL" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="CONFIG_COMPONENT" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="LogPath" serializeAs="String">
            <value>C:ServiceSmartTrack</value>
          </setting>
        </SmartTrack.Properties.Settings>
        <CMSWebService.Properties.Settings>
          <setting name="SYSTEM_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="TRANSACTION_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="COMMAND_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="EXCEPTION_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="ERROR_LOG" serializeAs="String">
            <value>True</value>
          </setting>
          <setting name="CONFIG_LOGLEVEL" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="CONFIG_COMPONENT" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="LogPath" serializeAs="String">
            <value>C:ServiceSmartTrack</value>
          </setting>
        </CMSWebService.Properties.Settings>
      </applicationSettings>
    </configuration>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...