0
Visual Studio 2015 CTP에서 게시 한 Azure WebSites에서 CoreCLR로 실행되는 두 개의 ASP.NET vNext 웹 응용 프로그램이 있습니다. 나는 하나의 응용 프로그램에서 표준 HttpClient를 코드로 두 번째로 전화를 걸려고 할 때 : 나는 예외 다음 얻을Azure WebSites -> 두 개의 WebAPI 사이에서 호출
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(_webUri);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpContent contentPost = new StringContent(request.ToJson(), Encoding.UTF8, "application/json");
var response = await client.PostAsync(uri, contentPost);//.PostAsJsonAsync("api/products", request);
if (response.IsSuccessStatusCode)
{
...
}
}
:
WinHttpException: An attempt was made to access a socket in a way forbidden by its access permissions.
System.Net.Http.WinInetProxyHelper.GetProxyForUrl(SafeInternetHandle sessionHandle, Uri uri, WINHTTP_PROXY_INFO& proxyInfo)
HttpRequestException: An error occurred while sending the request.
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
푸른 웹 사이트 FTP를 내 Web.config의 : I가 발견
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="kpm-package-path" value="..\approot\packages" />
<add key="bootstrapper-version" value="1.0.0-beta2" />
<add key="kre-package-path" value="..\approot\packages" />
<add key="kre-version" value="1.0.0-beta2" />
<add key="kre-clr" value="CoreCLR" />
<add key="kre-app-base" value="..\approot\src\Ingrid.Web" />
</appSettings>
</configuration>
이 'WebRoles'또는 '웹 사이트'입니까? 당신이 전달하는'_webUri'의 형식은 무엇입니까? –
@BrendanGreen 포스터에는 클라우드 서비스가 아닌 WebSites가 명시되어 있습니다. –
예, Azure 웹 사이트 - 클라우드 서비스에 대한 스택 오버 플로우에 대해 별도의 질문이 있습니다. VSnext가 적어도 현재 VS2015의 클라우드 서비스에서 지원되지 않는 것 같습니다. –