tags:

views:

33

answers:

1

Is it possible to make a WCF reference in a Silverlight DLL private? The option is greyed out and when you edit the Reference.vb file manaully, when running, it complains about not being able to serialize because it is not public.

I don't want the service to be exposed outside of the DLL. Is this possible?

A: 

Even though it is generated, you can hack that file up as much as you like, within reason.

What you need to do is declare your generated proxy as internal. You can either do that manually, or you can use the /internal (short form is /i) flag when using svcutil to generate your proxy. (Note that VS doesn't use svcutil when you add a service reference).

slugster
Thanks, I've already edited it manually with no luck. When debugging, VS tells me it needs to be public.
Bram
You missed the point - it can also be internal, which is similar to public but it is visible within a limited scope.
slugster
Thanks again for the reply Slugster.I'm a bit dim at this, don't suppose you could give a sample of how to do it manually;)...
Bram