Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WCF Windows Security

Posted on 2011-02-15
9
Medium Priority
?
560 Views
Last Modified: 2012-05-11
I am trying to enable Windows security instead of Anonymous"Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."

Can anyone see the problem with my web.config. Please dont send me just a link as i have viewed many examples and I am at a lost.

Thanks In Advance
<authentication mode="Windows"/>

<system.serviceModel>
   <extensions>
     <behaviorExtensions>
       <add name="silverlightFaults"
          type="SNC.FaultHanding.SilverlightFaultBehavior, SNC.FaultHanding, Version=1.0.0.0, Culture=neutral"/>
     </behaviorExtensions>
   </extensions>
   <behaviors>
     <endpointBehaviors>
       <behavior name="SilverlightFaultBehavior">
         <silverlightFaults/>
       </behavior>
     </endpointBehaviors>
     <serviceBehaviors>
       <behavior name="">
         <serviceMetadata httpGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="true" />
       </behavior>
     </serviceBehaviors>
   </behaviors>
   <bindings>
     <basicHttpBinding>
       <binding name="BasicHttpEndpointBinding">
         <security mode="TransportCredentialOnly">
           <transport clientCredentialType="Windows" />
         </security>
       </binding>
     </basicHttpBinding>
     <customBinding>
       <binding name="Web.Shipping.User_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Shipment_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport  />
       </binding>
       <binding name="Web.Shipping.Projects_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Carrier_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Administration_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Accounting_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
     </customBinding>
   </bindings>
  <serviceHostingEnvironment  aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
   <services>
     <service name="Web.Shipping.User_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.User_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>

     <service name="Web.Shipping.Shipment_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.Shipment_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>

     <service name="Web.Shipping.Projects_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.Projects_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>

     <service name="Web.Shipping.Carrier_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.Carrier_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>

     <service name="Web.Shipping.Administration_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.Administration_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>

     <service name="Web.Shipping.Accounting_Service">
       <endpoint address=""
     binding="basicHttpBinding"
     contract="Web.Shipping.Accounting_Service"
     behaviorConfiguration="SilverlightFaultBehavior" />
       <endpoint binding="basicHttpBinding"
     contract="IMetadataExchange"
     behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>
   </services>
 </system.serviceModel>

Open in new window

0
Comment
Question by:jimseiwert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:Dinesh Subramanian
ID: 34903919
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34906124
Have you configured the IIS? Check step 4 here

http://msdn.microsoft.com/en-us/library/ff648505.aspx


Have to post links because web.config is not the only piece in this puzzle.
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 34906405
I did already have iis configured correctly. I added the transport method but still get the error when I browse to the service in IE "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. "
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34906508
Try the suggestion

"Replace "bindingName" with "bindingConfiguration""

from this link

http://stackoverflow.com/questions/219151/iis-hosted-wcf-service-windows-auth-in-iis-transportcredentialonly-windows-au


You would have to change the Service tag.
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 34906586
I don't have the word "bindingname" anywhere in my config file
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 34906881
Here was the final working solution. Thank you for your help. The issue was with the custom configurations. I had to remove that along with the second binding for each service.
<bindings>
     <basicHttpBinding>
       <binding name="BasicHttpEndpointBinding">
         <security mode="TransportCredentialOnly">
           <transport clientCredentialType="Windows" proxyCredentialType="Windows" />
         </security>
       </binding>
     </basicHttpBinding>
   </bindings>
  <serviceHostingEnvironment  aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
   <services>
     <service name="Web.Shipping.User_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.User_Service" behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>
     <service name="Web.Shipping.Shipment_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.Shipment_Service" behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>
     <service name="Web.Shipping.Projects_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.Projects_Service"  behaviorConfiguration="SilverlightFaultBehavior"/>
    </service>
     <service name="Web.Shipping.Carrier_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.Carrier_Service" behaviorConfiguration="SilverlightFaultBehavior"/>
    </service>
     <service name="Web.Shipping.Administration_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.Administration_Service" behaviorConfiguration="SilverlightFaultBehavior"/>
    </service>
     <service name="Web.Shipping.Accounting_Service">
       <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.Accounting_Service" behaviorConfiguration="SilverlightFaultBehavior"/>
     </service>
   </services>
 </system.serviceModel>

Open in new window

0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 34907262
Your original EndPoint tag was

<endpoint address="" binding="basicHttpBinding" contract="Web.Shipping.User_Service" behaviorConfiguration="SilverlightFaultBehavior" />


Your new endpoint tag is


<endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" contract="Web.Shipping.User_Service" behaviorConfiguration="SilverlightFaultBehavior"/>


So I do see that you have added the BindingConfiguration attribute now. Does it work if you remove it?
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 34907294
Yes it works without it as well. The issue was with the section below. Once I removed that and fixed my bindings it worked
<customBinding>
       <binding name="Web.Shipping.User_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Shipment_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport  />
       </binding>
       <binding name="Web.Shipping.Projects_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Carrier_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Administration_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
       <binding name="Web.Shipping.Accounting_Service.customBinding0">
         <binaryMessageEncoding />
         <httpTransport />
       </binding>
     </customBinding>

Open in new window

0
 
LVL 2

Author Comment

by:jimseiwert
ID: 34907309
I am going to issue points to CodeCruiser for helping me find teh reight direction and past support on questions
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question