2013-03-04 2 views
2

폼 인증을 사용하는 MVC 응용 프로그램이 있습니다. 이 응용 프로그램은 WCF 웹 서비스 (모델)도 호스팅합니다. 웹 서비스는 C# 개체를 응용 프로그램에 제공하며 응용 프로그램 (브라우저) 외부에서 호출되면 JSON과 동일한 데이터를 사용할 수 있습니다. 웹 서비스가 요청을 인증하지 않는다는 점을 제외하면 모든 것이 잘 작동합니다.mvc wcf security

<system.serviceModel> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
<behaviors> 
    <endpointBehaviors> 
    <behavior name="ServiceBehavior"> 
     <webHttp /> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 
<bindings> 
    <webHttpBinding> 
    <binding name="webHttpBindingWithJson" crossDomainScriptAccessEnabled="true" /> 
    </webHttpBinding> 
</bindings> 
<services> 
    <service name="Services.MyService"> 
    <endpoint address="http://localhost:1234/MyService.svc/" binding="webHttpBinding" 
       bindingConfiguration="webHttpBindingWithJson" 
       contract="Services.IService" 
       behaviorConfiguration="ServiceBehavior"/> 
    </service> 
</services> 

내가 Webservice를 요청 인증 할 : 응용 프로그램 내에서

  • 요청을하면 Webservice를 자동으로
  • 를 인증해야 다음 제가의 Web.config에있는이 응용 프로그램 외부에서 호출되면 사용자에게 인증을 요청받습니다.

어떤 도움을 주시면 감사하겠습니다. 만약 대한 WSDL을 제공하는 내부 엔드 포인트에 필요한 것처럼

/D는

답변

0

은 소리 및 JSON위한 외부 별도 결합합니다 (ASP.NET 아이덴티티 웹 사이트 하에서 실행을 사용하여 인증 된) 웹 사이트에 바인딩 인증을 위해 OAuth와 같은 것을 사용하는 요청.

두 가지 인증 메커니즘이 있습니다.