locked
Can I have a mix of ADFS authentication and anonymous in the same project ? RRS feed

  • Question

  • User-1490494432 posted

    Hello

    I have in the same VS project a UI and a web service (I know it's bad)

    I have updated the project to authenticate user that use the UI using ADFS but now my .asmx service also require to be authenticated and also require https.

    Do you think that It's possible to update the web config to exclude the web service from the ADFS authentication ?
    And how I can do that ?

    Wednesday, January 21, 2015 11:26 AM

Answers

  • User-1490494432 posted

    do you have a sample code ?
    is it something like that:

     <location path="Service.asmx">
        <system.web>
          <authorization>
            <allow users="?"/>         
          </authorization>
        </system.web>
      </location>

    this solution works

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 21, 2015 11:38 AM

All replies

  • User1779161005 posted

    Yes it's possible. For the HTTP calls where anonymous is allowed, don't reject the call with a 401. In other words, your authorization code is what needs to change.

    Wednesday, January 21, 2015 11:36 AM
  • User-1490494432 posted

    do you have a sample code ?
    is it something like that:

     <location path="Service.asmx">
        <system.web>
          <authorization>
            <allow users="?"/>         
          </authorization>
        </system.web>
      </location>

    this solution works

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 21, 2015 11:38 AM