2015-07-30 3 views
0

Я попытался найти web.config для моей службы WCF подключиться к серверу с помощью вызова REST. Однако его высказывание неспособно подключить сервер. Вот мой web.config:WCF Basichttpbinding пример web.config для REST API

<?xml version="1.0"?> 
 
    <configuration> 
 
    <!--<system.net> 
 
    <defaultProxy useDefaultCredentials="true" > 
 
    </defaultProxy> 
 
</system.net>--> 
 
<appSettings> 
 
<add key="UserName" value="admin"/> 
 
<add key="Password" value="admin"/> 
 
<add key="resturl" value="https://Clientname.atlassian.net/rest/api/2/"/> 
 
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> 
 
</appSettings> 
 
<system.web> 
 
    <compilation debug="true" targetFramework="4.5" /> 
 
    <httpRuntime targetFramework="4.5"/> 
 
</system.web> 
 
<system.serviceModel> 
 
    <bindings> 
 
    <basicHttpBinding> 
 
    <binding name="BasicHttpBinding_IJiraService"/> 
 
    </basicHttpBinding> 
 
    </bindings> 
 
    <client> 
 
    <endpoint address="http://localhost:19065/JiraService.svc" binding="basicHttpBinding" 
 
     bindingConfiguration="BasicHttpBinding_IJiraService" contract="ServiceReference1.IJiraService" 
 
     name="BasicHttpBinding_IJiraService" /> 
 
    </client> 
 
    <behaviors> 
 
    <serviceBehaviors> 
 
     <behavior> 
 
     <!-- To avoid disclosing metadata information, set the values below to false before deployment --> 
 
     <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> 
 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
 
     </behavior> 
 
     </serviceBehaviors> 
 
     </behaviors> 
 
     <protocolMapping> 
 
     <add binding="basicHttpsBinding" scheme="https" /> 
 
    </protocolMapping>  
 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
 
    </system.serviceModel> 
 
    <system.webServer> 
 
    <modules runAllManagedModulesForAllRequests="true"/> 
 
    <!-- 
 
    To browse web app root directory during debugging, set the value below to true. 
 
    Set to false before deployment to avoid disclosing web app folder information. 
 
    --> 
 
    <directoryBrowse enabled="true"/> 
 
</system.webServer> 
 

 
</configuration>

Может кто-нибудь, пожалуйста, помогите мне, как я могу это исправить? Однако я попробовал в сети, но не смог найти подходящего учебника для этого. Пожалуйста помоги.

ответ

0

Это решение. Это была проблема с прокси-сервером, и после добавления прокси-сервера в браузер и IIS проблема была решена. Благодарю.

Смежные вопросы