Conflict between WCF and IIS integrated Windows Authentication

Source: Internet
Author: User

I haven't been up for a long time. Recently, I jumped to a new company along with my old boss. I am working on a new dating project. Today I have finished my work. I would like to share a tips on WCF, as the project

In many cases, jquery + WCF is used to implement Ajax asynchronous data acquisition. In the development environment:

Directly in vs.net, right-click the SVC file to browse in the browser (the aspx server provided by vs.net is not used, but is set to use IIS directly in the project attribute), and the following error is prompted:

IIS specifies the authentication scheme "integratedwindowsauthentication, anonymous", but binding only supports one authentication specification. Valid authentication schemes are digest, negotiation, NTLM, basic or anonymous. Change the IIS settings so that only a single authentication scheme is used.

The error message is clear: IIS either uses integration verification or only anonymous authentication. Therefore, the integration verification check box in the IIS settings is removed. After IIS is restarted, it runs normally, but. net, but it cannot be used for breakpoint debugging (integration verification must be used to enable debugging). Is this the legendary "cannot have both fish and bear's paw "???

Unwilling to do so, in the IIS website, right-click the directory where SVC is located and check it. Haha, find the solution. IIS can allow separate directory (or virtual directory) set Directory Security, so the directory where SVC is located (all the WCF files in the project are concentrated in this directory) -- "Directory Security --> Removes the check box before integration verification, the whole site still adopts integrated verification. Now SVC can be viewed directly, while our silly vs.net can also be used for breakpoint debugging ...... (Yang Chao ^_^ under the bodhi tree)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.