Click here to Skip to main content
15,902,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've got a requirement to host an anonymous WCF service in IIS over HTTP only (no SSL will be installed).

I can get anonymous access over HTTP with SSL installed (using Self-Cert) and bound to the site.

Can anyone help?
Posted

1 solution

For example, if you make self-hosted WCF service it will be "anonymous" unless you specifically implement some kind of authentication :-). Same thing about Web service or ASP.NET.

Probably your idea of authentication is related specifically SSL authentication (http://msdn.microsoft.com/en-us/library/aa922016.aspx[^]), not WCF.
Pure WCF has nothing to do with authentication. It's just a wrapper over the channel (like TCP or HTTP) and marshaling functionality. You can think of WCF of a lowers application level over a transport protocol later (which is replaceable). Authentication may or may not be provided on top of it.

Microsoft offers special Windows Communication Foundation Authentication Service which you can choose to use or not: http://msdn.microsoft.com/en-us/library/bb386582.aspx[^]. Web Service Authentication: http://msdn.microsoft.com/en-us/library/ms154673.aspx[^]. ASP.NET Authentication: http://msdn.microsoft.com/en-us/library/eeyk640h.aspx[^].

Will you try this simple sample of Host a WCF Service in IIS from Microsoft: http://msdn.microsoft.com/en-us/library/ms733766.aspx[^] — again, not authentication involved.

Maybe, you over-complicate the simple task because of your past experience with secure protocol(s)?

—SA
 
Share this answer
 
v6
Comments
Martin Jarvis 4-Feb-11 20:50pm    
Ah, sorry. I should have been clearer, it must be hosted in IIS. The application is hosted by a 3rd Party on a shared server.

I've tried BasicHttpBinding and WSHttpBinding (no authentication) but they each through an error about the 'https' protocol not being supported. Usually, I'd jsut install SSL and be done, but in this case we can't self-cert and the client wont pay for a proper certificate as the service is going to have a very short lifespan (1 month).
Sergey Alexandrovich Kryukov 4-Feb-11 21:58pm    
I mentioned the self-hosting and other cases only for example. From your question I could see IIS. So, can you provide some information on the host you use and explain why having no authentication is a problem. For this purpose, could you show the relevant part of the code you already have.

You see, the self-certificate is also a notion of secure protocol, it is related to assymmetric ciphering and open key. If the protocol is HTTP, there is no ciphering in the protocol, hence no certificate. I mean it: not self or authorized certificate -- there is not such notion in HTTP at all (don't mix it up with self-hosting).

So, from this point I fail to understand what is your problem. You try to explain the problem in terms relevant to HTTPS or SSL which are simply not applicable to "plain" HTTP.

Maybe, 2 things could help: 1) you could find really simple HTTP/IIS service sample and look at it (most preferable), 2) you provide some code (please simplify as much as possible) and let me take a look. How about that?

Thank you.
--SA
Sergey Alexandrovich Kryukov 4-Feb-11 22:07pm    
Again, WSHttpBinding is related to support of secure sessions and oriented toward authentication. I think you need to step back to more simple staff.

OK, I added a new reference to my answer. Maybe a simple sample will help. (I don't have IIS to run it.)

--SA
Martin Jarvis 5-Feb-11 5:23am    
Thanks, I sorted the problem now. There was a custom ServiceFactory refererenced in the .svc (copied from another project which REQUIRED ssl) which was interfering.

It turns out that my bindings were correct and I was pulling my hair out over a trival mistake.
Sergey Alexandrovich Kryukov 5-Feb-11 5:53am    
Great, thank you for accepting the answer and reporting back.
Good luck,
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900