Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
How to use basichttpBinding by disabling anonymous access
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
chaitu avvari
11y
2.3k
1
Reply
I am using BasicHTTPBinding as per my req I have to disable anonymous access and make the service with Winodws Integration. I hv checked many forum and write the code as below in app.config file.
Connection String as:
< connectionString="Data source="IPadrress ";Initial Catalog="myPortal ";Integrated security=True" /><
!--
<system.web>
<compilation debug="true" />
<authentication mode="Windows">
</authentication>
<identity impersonate="true" />
</system.web> >-->
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpEndpointBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceBehaviour" name="Service">
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="IService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<!-- Metadata Endpoints -->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
but when I browse from inetmgr getting the below error even after iisreset also.
Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
wcf error
WCF Video Tutorials