By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

SOAP security negotiation error when using WCF (please help!)

P: n/a
Hi,

Some users on our domain can run our WCF application no problem. Some get
an unhandled exception error re: SOAP security negotiation. I'm wanting the
service to not be secure.. I just want anyone logged into our company domain
to be able to run the app. Can someone please tell me what tag I need added
to which of these files to make this error go away?

Thanks very much in advance,
Ron

P.S. Below are what my current config files look like. Thanks.
********** App.config on the client (windows app) looks like this:
**********

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<client>
<endpoint
address="http://localhost/COWFeedyardService/Services/Country.svc"
binding="wsHttpBinding" contract="ICountry" />
<endpoint
address="http://localhost/COWFeedyardService/Services/State.svc"
binding="wsHttpBinding" contract="IState" />
<endpoint address="http://localhost/COWFeedyardService/Services/Pen.svc"
binding="wsHttpBinding" contract="IPen" />
</client>
</system.serviceModel>
</configuration>
********** App.config on the server (running under IIS) looks like this:
**********

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="FRC.COW.Feedyard.Business.My.MySettings.cnnS QL"
connectionString="Data Source=JOSHUA\SQL2005;Initial
Catalog=COWFeedyard;Integrated Security=true" />
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for
My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the
Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME
with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/-->
</sharedListeners>
</system.diagnostics>
</configuration>
********** Web.config on the server looks like this: **********

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<!-- Country -->
<service
name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.Country"
behaviorConfiguration="CountryBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.ICountry"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
<!-- State -->
<service name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.State"
behaviorConfiguration="StateBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.IState"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
<!-- Pen -->
<service name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.Pen"
behaviorConfiguration="PenBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.IPen"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<!-- Country -->
<behavior name="CountryBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
<!-- State -->
<behavior name="StateBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
<!-- Pen -->
<behavior name="PenBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Apr 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ronald,

I don't see anything on the client side or the server side config files
indicating that you want authentication or authorization.

You will need to configure a <bindingssection to set the configuration
parameters on your wsHttpBinding that you are using.

Now, given that you are hosting in IIS, you are probably going to have
to indicate that you want IIS to pick up the security details (using
transport security) and not WCF.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ronald S. Cook" <rc***@westinis.comwrote in message
news:up**************@TK2MSFTNGP04.phx.gbl...
Hi,

Some users on our domain can run our WCF application no problem. Some get
an unhandled exception error re: SOAP security negotiation. I'm wanting
the service to not be secure.. I just want anyone logged into our company
domain to be able to run the app. Can someone please tell me what tag I
need added to which of these files to make this error go away?

Thanks very much in advance,
Ron

P.S. Below are what my current config files look like. Thanks.
********** App.config on the client (windows app) looks like this:
**********

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<client>
<endpoint
address="http://localhost/COWFeedyardService/Services/Country.svc"
binding="wsHttpBinding" contract="ICountry" />
<endpoint
address="http://localhost/COWFeedyardService/Services/State.svc"
binding="wsHttpBinding" contract="IState" />
<endpoint address="http://localhost/COWFeedyardService/Services/Pen.svc"
binding="wsHttpBinding" contract="IPen" />
</client>
</system.serviceModel>
</configuration>
********** App.config on the server (running under IIS) looks like this:
**********

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="FRC.COW.Feedyard.Business.My.MySettings.cnnS QL"
connectionString="Data Source=JOSHUA\SQL2005;Initial
Catalog=COWFeedyard;Integrated Security=true" />
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for
My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the
Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME
with the name of your application to write to the Application Event
Log -->
<!--<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/-->
</sharedListeners>
</system.diagnostics>
</configuration>
********** Web.config on the server looks like this: **********

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<!-- Country -->
<service
name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.Country"
behaviorConfiguration="CountryBehavior">
<endpoint address="" binding="wsHttpBinding"

contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.ICountry"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
<!-- State -->
<service
name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.State"
behaviorConfiguration="StateBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.IState"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
<!-- Pen -->
<service name="FRC.COW.Feedyard.Business.FRC.COW.Feedyard.B usiness.Pen"
behaviorConfiguration="PenBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="FRC.COW.Feedyard.Business.FRC.COW.Feedya rd.Business.IPen"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<!-- Country -->
<behavior name="CountryBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
<!-- State -->
<behavior name="StateBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
<!-- Pen -->
<behavior name="PenBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>


Apr 5 '07 #2

P: n/a
Security is enabled by default. Even worse I think it uses Windows
Authentication by default. You need to disable it.

<configuration>
<system.serviceModel>
<services>
<service name = "MyNamespace.MyService">
<endpoint
address = "http://localhost:8001/MyService"
binding = "wsHttpBinding"
bindingConfiguration = "NoSecurity"
contract = "MyNamespace.IMyContract"
/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name = "NoSecurity">
<security mode = "None">
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
</configuration>

Apr 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.