Ich bin neu in WCF. Ich habe WCF-Methode erstellt, die Datei zurückgibt. Ich entfaltet es App-Service Azure und es funktionierte, als ich es wie folgtAzure gehostet WCF azure Active Directory-Authentifizierung gibt zurück 404
genannthttps://myapp.azurewebsites.net/myService.svc/MyMethod?MyParam=MyValue
als ich auf Azure Active Directory-Authentifizierung für azur App-Service gedreht und ich bekomme jetzt 404 Fehler. Aber die Authentifizierung gegen AAD funktioniert - ich werde zur Login-Seite weitergeleitet, wenn ich nicht im User versenkt bin.
Ich habe versucht, SO und Google zu suchen und ich kann nicht herausfinden, was ich falsch mache oder wenn es einfach nicht möglich ist, diesen Weg mit WCF einzurichten.
Web config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<system.web>
<customErrors mode="Off"/>
<compilation targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5.2"/>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
<webHttpBinding>
<binding name="ServiceWebBindingName" transferMode="Streamed" maxReceivedMessageSize="2147483647" >
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="DefaultRestServiceBehavior">
<webHttp defaultOutgoingResponseFormat="Json" defaultBodyStyle="Wrapped" automaticFormatSelectionEnabled="false"/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="My.App.Service">
<endpoint address="myService.svc"
binding="webHttpBinding"
bindingConfiguration="ServiceWebBindingName"
behaviorConfiguration="DefaultRestServiceBehavior"
name="FileManagerServiceEndpoint"
contract="My.App.IService"/>
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
preCondition="managedHandler"/>
</modules>
<!--
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="false"/>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
haben Sie diesen Beitrag, der über die Integration von wcf + AAD spricht https://dzone.com/articles/exercise-3-securing-wcf – Aravind
Ich tat, in dem Artikel, sie verwenden nicht azurblaues Hosting mit Setup-Authentifizierung , aber alles im Code tun, wenn ich es richtig verstanden habe. – Evlo
Ja, der Authentifizierungsteil ist in den Code getan .. – Aravind