Thanks.
"Bijan" <Bi...@discussions.microsoft.com> wrote in message
news:6D2CBE5E-1B93-4914...@microsoft.com...
> The generic version of ServiceHost is gone! Try the non-generic one.
Thanks.
Regards.
You would now write:
using (ServiceHost host = new ServiceHost(typeof(MyService), new
Uri("scheme://hostname/base")))
{ ... }
Endpoints are still added in config. You've always needed a type and base
address at ServiceHost construction time - base addresses are not
specify-able in config (since a hosting environment, usually WebHost,
determines them), and the type is specified in config only so the product
can make the match.
I'll make sure the samples team is aware of the inconsistency,
Ondrej
<sa.c...@gmail.com> wrote in message
news:1126955965....@z14g2000cwz.googlegroups.com...
I also don't like that you have to specify a Uri when you instantiate the
service host. I think being able to speficy it in the config file and have
the ServiceHost pick that up is much more flexible.
What this suggests to me is that the drive to make strong typing more and
more flexible is showing a fundamental issue. Strong typing creates
coupling that has nothing to do with a properly running application, or with
what methods get executed (which are determined at run time in any event).
Strong typing has 2 advantages. It is still faster, and it provides
intelesense. Compiler error checking does not replace testing, but is
replaced by testing. Intelesense can be supported with type inference, and
hinting. It will be interesting to see if C# goes the way of C++, and it
may take Visual Basic with it as all those features are now being added to
both languages.
Michael
"Steve Eichert" <eich...@hotmail.com> wrote in message
news:7742ffa5fd8a8...@news.microsoft.com...
ServiceHost sh = new ServiceHost(typeof(MyImplementationType));
And you can specify type, base URI et.al. in config if you want to.
Gudge
"Steve Eichert" <eich...@hotmail.com> wrote in message
news:7742ffa5fd8a8...@news.microsoft.com...
it seems to work just fine,but thanks anyway:-)
The above configuration has been slightly changed (keeping in mind ABC)
<service type="load.GenericMessageEndpoint" >
<endpoint
address = "net.pipe://localhost/quickstarts/service"
binding = "netNamedPipeBinding"
bindingConfiguration="aaa"
contract = "load.IGenericMessageEndpoint" />
</service>
Roman
<sa.c...@gmail.com> wrote in message
news:1127039956.0...@g44g2000cwa.googlegroups.com...
<sa.c...@gmail.com> wrote in message
news:1127039956.0...@g44g2000cwa.googlegroups.com...
Ondrej
<sa.c...@gmail.com> wrote in message
news:1127040763....@g44g2000cwa.googlegroups.com...