New Posts New Posts RSS Feed: WCF Security Options
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

WCF Security Options

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: WCF Security Options
    Posted: 11-Apr-2008 at 1:58pm

It sounds like the service is not finding/using the config file.  If you're running the ServerConsole.exe, the config file needs to be named ServerConsole.exe.config, and be in the same directory as the .exe. 

If this isn't the problem, can you send me the client and server side DebugLogs, *.config and ibconfig files?  I think you've got my email address, and it's OK to send the files to me directly.
 
 
Kim Johnson
Back to Top
richmccloud View Drop Down
Newbie
Newbie
Avatar

Joined: 11-Apr-2008
Location: United States
Posts: 5
Post Options Post Options   Quote richmccloud Quote  Post ReplyReply Direct Link To This Post Posted: 11-Apr-2008 at 12:44pm
Hi,
 
I have removed the custom binding and configured the client/service to both use a net.tcp binding.  When the client attempts to communicate with the service, the following exception shows in the trace:
 
<ExceptionType>System.ServiceModel.ProtocolException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Content Type application/soap+msbinsession1 was sent to a service expecting application/x-gzip.  The client and service bindings may be mismatched.</Message>
I have removed all referenced in both server and client configuration files to the gzip compressing binding and extension yet the service appears to still be expecting it.
 
Any idea?
 
Thanks
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 11-Apr-2008 at 8:33am
To add security, or to change any other elements of the custom binding (or to switch to a standard binding) currently requires that you supply a config file with a system.ServiceModel section on both the client and server sides.
 
The custom binding providing compression of binary encoded data is the default binding, but is not really a requirement.  It's harder to work with the binding elements in a custom binding, but if you use the WCF Service Configuration Editor (from Microsoft) it should help indicate what's available and how to configure it.  One warning with using this editor - it will first prompt you for the location of the IdeaBlade.Util.Wcf assembly, which you need to give it and then OK further prompts, in order to edit the custom binding in the editor.
 
Here's a link to an MSDN article on bindings by Aaron Skonnard which I've found helpful:  http://msdn2.microsoft.com/en-us/magazine/cc163394.aspx
 
If you want to use a standard binding, which is much easier to configure and better documented, you should be able to do so without any problems.  We do believe, given the amount of data that can be transmitted, that using both compression and binary encoding provides better performance.
 
Back to Top
richmccloud View Drop Down
Newbie
Newbie
Avatar

Joined: 11-Apr-2008
Location: United States
Posts: 5
Post Options Post Options   Quote richmccloud Quote  Post ReplyReply Direct Link To This Post Posted: 11-Apr-2008 at 8:31am

Needless to say this is my first foray into custom binding elements Embarrassed and I think I found what I'm looking for on MSDN (http://msdn2.microsoft.com/en-us/library/aa751836(VS.85).aspx).   However, if anyone has any tips/tricks relative to what we're trying to do I'd certainly appreciate them.

Thanks!
Back to Top
richmccloud View Drop Down
Newbie
Newbie
Avatar

Joined: 11-Apr-2008
Location: United States
Posts: 5
Post Options Post Options   Quote richmccloud Quote  Post ReplyReply Direct Link To This Post Posted: 11-Apr-2008 at 8:01am
Hi,
 
We are deploying a console/service based N-tier application with the BOS.  We have requirements to use WCF and I am familiar with implementing WCF message and transport security (via configuration files).  Due to the requirement of IdeaBlade to use the compressed binary binding, I am not seeing how it is possible to implement these WCF security standards.  I have also been unable to find any documentation (other than the notes in the sample client/server config files) to explain the various binding element extensions that are available within the compressedbinarybinding, security being one of them.
 
Any help would be appreciated.

Thanks

Rich
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down