c# - WCF REST Security Impersonation -


I have a website in IIS 7 setup with Windows authentication enabled.

I have 3 ways in my service, 2 methods require Windows authentication and 1 does not

using 2 others > • OperationBehavior (Impersonation = Impersonation. [OperationBihair (Impersonation = Impersonation Option. Compulsory)]

Configure My Web. Looks like:

  & lt; system.webServer & gt; Run the module; All managed modules FOR ALLRequests = "true" & gt; & lt; add name = "UrlRoutingModule" type = "System.Web.Routing. UrlRoutingModule, System.Web, version = 4.0.0.0, culture = neutral, public keychain = B3F5F7F11D350A3A "> gt; & gt; & gt; & gt; & lt; security & gt; LT; Authentication & gt; & lt; Unnamed: Disabling Enabled = "True" />  >  & LT ; /system.webServer>testics.servicemodel & gt; & lt; service hosting environment aspNetCompatibilityEnabled = "true" /> gt; & lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior & gt; & Lt; Data Contractor Sirializer maxItemsInObjectGraph = "2147483647" /> & Lt; Service Authority Impersonation CallerFireAlOops = "True" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; StandardEndpoints & gt; & Lt; WebHttpEndpoint & gt; & Lt; Standard endpoint name = "helpEnabled =" true "automatic format selection enabled =" true "default authentication formatting =" Jason "Maxbufar police size =" 2147483647 "MaxbFarissance =" 2147483647 "MaxReserveVisense =" 2147483647 "transfer mode =" stream "& gt; & lt ; Safety Mode = "Transport Credential Only" & gt; Transport Customer Credential Type = "Windows" />  gt; & standard; Endpoint & gt; & web; htepEndpoint & gt; ; & Lt; / standardEndpoints & gt; & lt; /system.serviceModel>   

when I run If you do not pass any credentials, then it fails with an unauthorized error. You still need to provide credentials when using [OperationBihaiar / P>

Comments