WCF Server Configuration for ws2007FederationHttpBinding and Windows Authentication












0















I have to implement "Windows Authentication" on a service hosted on Server.

I am using "ws2007FederationHttpBinding".

I am using "ws2007FederationHttpBinding" binding since I am receiving token from my ADFS server.



Below are my server configuration:



web.config



<authentication mode="Windows" />

<ws2007FederationHttpBinding>
<binding name="SamlTokenCustomStsBindingConfig">
<security mode="Message">
<message establishSecurityContext="false">
</message>
</security>
</binding>
</ws2007FederationHttpBinding>

<service name="XXX.Server" behaviorConfiguration="ClaimsAwareServiceBehavior">
<endpoint address="http://serverurl/ServerServices.svc" binding="ws2007FederationHttpBinding"
contract="ServerInterfaces.IServer" bindingConfiguration="SamlTokenCustomStsBindingConfig" />

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

<behavior name="ClaimsAwareServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>


Below is my IIS configuration:
enter image description here



Inspite of all the configuration I am unable to access my service. can anyone notify where I am making mistake or have I missed any configuration.



I am receiving below error when I am trying to access my service.
enter image description here



As per error we don't have "Transport" or "TransportCredentialOnly" in "ws2007FederationHttpBinding".

So I am unable to move further.










share|improve this question























  • Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

    – Aria
    Nov 26 '18 at 10:20













  • I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

    – Shashank
    Nov 26 '18 at 10:29
















0















I have to implement "Windows Authentication" on a service hosted on Server.

I am using "ws2007FederationHttpBinding".

I am using "ws2007FederationHttpBinding" binding since I am receiving token from my ADFS server.



Below are my server configuration:



web.config



<authentication mode="Windows" />

<ws2007FederationHttpBinding>
<binding name="SamlTokenCustomStsBindingConfig">
<security mode="Message">
<message establishSecurityContext="false">
</message>
</security>
</binding>
</ws2007FederationHttpBinding>

<service name="XXX.Server" behaviorConfiguration="ClaimsAwareServiceBehavior">
<endpoint address="http://serverurl/ServerServices.svc" binding="ws2007FederationHttpBinding"
contract="ServerInterfaces.IServer" bindingConfiguration="SamlTokenCustomStsBindingConfig" />

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

<behavior name="ClaimsAwareServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>


Below is my IIS configuration:
enter image description here



Inspite of all the configuration I am unable to access my service. can anyone notify where I am making mistake or have I missed any configuration.



I am receiving below error when I am trying to access my service.
enter image description here



As per error we don't have "Transport" or "TransportCredentialOnly" in "ws2007FederationHttpBinding".

So I am unable to move further.










share|improve this question























  • Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

    – Aria
    Nov 26 '18 at 10:20













  • I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

    – Shashank
    Nov 26 '18 at 10:29














0












0








0








I have to implement "Windows Authentication" on a service hosted on Server.

I am using "ws2007FederationHttpBinding".

I am using "ws2007FederationHttpBinding" binding since I am receiving token from my ADFS server.



Below are my server configuration:



web.config



<authentication mode="Windows" />

<ws2007FederationHttpBinding>
<binding name="SamlTokenCustomStsBindingConfig">
<security mode="Message">
<message establishSecurityContext="false">
</message>
</security>
</binding>
</ws2007FederationHttpBinding>

<service name="XXX.Server" behaviorConfiguration="ClaimsAwareServiceBehavior">
<endpoint address="http://serverurl/ServerServices.svc" binding="ws2007FederationHttpBinding"
contract="ServerInterfaces.IServer" bindingConfiguration="SamlTokenCustomStsBindingConfig" />

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

<behavior name="ClaimsAwareServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>


Below is my IIS configuration:
enter image description here



Inspite of all the configuration I am unable to access my service. can anyone notify where I am making mistake or have I missed any configuration.



I am receiving below error when I am trying to access my service.
enter image description here



As per error we don't have "Transport" or "TransportCredentialOnly" in "ws2007FederationHttpBinding".

So I am unable to move further.










share|improve this question














I have to implement "Windows Authentication" on a service hosted on Server.

I am using "ws2007FederationHttpBinding".

I am using "ws2007FederationHttpBinding" binding since I am receiving token from my ADFS server.



Below are my server configuration:



web.config



<authentication mode="Windows" />

<ws2007FederationHttpBinding>
<binding name="SamlTokenCustomStsBindingConfig">
<security mode="Message">
<message establishSecurityContext="false">
</message>
</security>
</binding>
</ws2007FederationHttpBinding>

<service name="XXX.Server" behaviorConfiguration="ClaimsAwareServiceBehavior">
<endpoint address="http://serverurl/ServerServices.svc" binding="ws2007FederationHttpBinding"
contract="ServerInterfaces.IServer" bindingConfiguration="SamlTokenCustomStsBindingConfig" />

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

<behavior name="ClaimsAwareServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>


Below is my IIS configuration:
enter image description here



Inspite of all the configuration I am unable to access my service. can anyone notify where I am making mistake or have I missed any configuration.



I am receiving below error when I am trying to access my service.
enter image description here



As per error we don't have "Transport" or "TransportCredentialOnly" in "ws2007FederationHttpBinding".

So I am unable to move further.







wcf iis windows-authentication adfs wsfederationhttpbinding






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 7:01









ShashankShashank

251113




251113













  • Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

    – Aria
    Nov 26 '18 at 10:20













  • I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

    – Shashank
    Nov 26 '18 at 10:29



















  • Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

    – Aria
    Nov 26 '18 at 10:20













  • I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

    – Shashank
    Nov 26 '18 at 10:29

















Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

– Aria
Nov 26 '18 at 10:20







Why you want use ws2007FederationHttpBinding just because of WindowsAuthenticate?

– Aria
Nov 26 '18 at 10:20















I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

– Shashank
Nov 26 '18 at 10:29





I have to implement windows authentication using ADFS so I am using "ws2007FederationHttpBinding". Is there any other option.

– Shashank
Nov 26 '18 at 10:29












1 Answer
1






active

oldest

votes


















0














You should comment this below line of code to avoid that mentioned error in your question:



<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


but for implementing ADFS for WCF service needs several preconditions that can't be posted as answer but just for Windows authenticate mode this is easier to use basicHttpBinding by little steps.



so for ADFS implementation please take a look at:



1- ADFS in Identity Solutions - Using Active Directory Federation Services 2.0 in Identity Solutions.



2- Federated Security: How to setup and call a WCF service secured by ADFS 2.0



3- ADFS to secure WCF and Workflow Services hosted in Windows Server AppFabric.






share|improve this answer
























  • I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

    – Shashank
    Nov 26 '18 at 11:33











  • Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

    – Aria
    Nov 26 '18 at 12:09













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476104%2fwcf-server-configuration-for-ws2007federationhttpbinding-and-windows-authenticat%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You should comment this below line of code to avoid that mentioned error in your question:



<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


but for implementing ADFS for WCF service needs several preconditions that can't be posted as answer but just for Windows authenticate mode this is easier to use basicHttpBinding by little steps.



so for ADFS implementation please take a look at:



1- ADFS in Identity Solutions - Using Active Directory Federation Services 2.0 in Identity Solutions.



2- Federated Security: How to setup and call a WCF service secured by ADFS 2.0



3- ADFS to secure WCF and Workflow Services hosted in Windows Server AppFabric.






share|improve this answer
























  • I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

    – Shashank
    Nov 26 '18 at 11:33











  • Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

    – Aria
    Nov 26 '18 at 12:09


















0














You should comment this below line of code to avoid that mentioned error in your question:



<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


but for implementing ADFS for WCF service needs several preconditions that can't be posted as answer but just for Windows authenticate mode this is easier to use basicHttpBinding by little steps.



so for ADFS implementation please take a look at:



1- ADFS in Identity Solutions - Using Active Directory Federation Services 2.0 in Identity Solutions.



2- Federated Security: How to setup and call a WCF service secured by ADFS 2.0



3- ADFS to secure WCF and Workflow Services hosted in Windows Server AppFabric.






share|improve this answer
























  • I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

    – Shashank
    Nov 26 '18 at 11:33











  • Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

    – Aria
    Nov 26 '18 at 12:09
















0












0








0







You should comment this below line of code to avoid that mentioned error in your question:



<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


but for implementing ADFS for WCF service needs several preconditions that can't be posted as answer but just for Windows authenticate mode this is easier to use basicHttpBinding by little steps.



so for ADFS implementation please take a look at:



1- ADFS in Identity Solutions - Using Active Directory Federation Services 2.0 in Identity Solutions.



2- Federated Security: How to setup and call a WCF service secured by ADFS 2.0



3- ADFS to secure WCF and Workflow Services hosted in Windows Server AppFabric.






share|improve this answer













You should comment this below line of code to avoid that mentioned error in your question:



<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


but for implementing ADFS for WCF service needs several preconditions that can't be posted as answer but just for Windows authenticate mode this is easier to use basicHttpBinding by little steps.



so for ADFS implementation please take a look at:



1- ADFS in Identity Solutions - Using Active Directory Federation Services 2.0 in Identity Solutions.



2- Federated Security: How to setup and call a WCF service secured by ADFS 2.0



3- ADFS to secure WCF and Workflow Services hosted in Windows Server AppFabric.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 26 '18 at 10:56









AriaAria

2,6681832




2,6681832













  • I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

    – Shashank
    Nov 26 '18 at 11:33











  • Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

    – Aria
    Nov 26 '18 at 12:09





















  • I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

    – Shashank
    Nov 26 '18 at 11:33











  • Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

    – Aria
    Nov 26 '18 at 12:09



















I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

– Shashank
Nov 26 '18 at 11:33





I have completed with ADFS configuration and I am able to receive token from server. But when I try to consume the service in "UserNameMixed" mode it is working fine but when I try for Windows authentication it fails.

– Shashank
Nov 26 '18 at 11:33













Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

– Aria
Nov 26 '18 at 12:09







Please remove name="SamlTokenCustomStsBindingConfig" from binding and bindingConfiguration="SamlTokenCustomStsBindingConfig" from service and try it again, because the same exception occurred here as yours.

– Aria
Nov 26 '18 at 12:09




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476104%2fwcf-server-configuration-for-ws2007federationhttpbinding-and-windows-authenticat%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks