Click here to Skip to main content
15,888,277 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: C#/VS2005 Event fired on Network Activity Pin
Dave Kreskowiak21-Jun-07 7:48
mveDave Kreskowiak21-Jun-07 7:48 
GeneralRe: C#/VS2005 Event fired on Network Activity Pin
xcguy8710-Jul-07 9:10
xcguy8710-Jul-07 9:10 
GeneralRe: C#/VS2005 Event fired on Network Activity Pin
Dave Kreskowiak10-Jul-07 9:18
mveDave Kreskowiak10-Jul-07 9:18 
QuestionHow to customize BackgroundWorker Pin
sro11621-Jun-07 5:21
sro11621-Jun-07 5:21 
AnswerRe: How to customize BackgroundWorker Pin
Scott Dorman22-Jun-07 7:29
professionalScott Dorman22-Jun-07 7:29 
Questioncreating XmlNode tree without XmlDocument Pin
invictus321-Jun-07 5:12
invictus321-Jun-07 5:12 
AnswerRe: creating XmlNode tree without XmlDocument Pin
PIEBALDconsult21-Jun-07 11:19
mvePIEBALDconsult21-Jun-07 11:19 
QuestionServiceHost for WCF-Service Pin
marbou21-Jun-07 3:19
marbou21-Jun-07 3:19 
Hi all,

I have some problem with hosting an WCF-Service.
I have build my interface and my service.
And then I want to instantiate my ServiceHost with the type of my interface.
But I get an error:
"ServiceHost supports only Class-Service-Types".

When instantiate my ServiceHost with the type of my class, it have no problem.

MSDN-Documentation says:
ServiceHost (Type, Uri[]):
Initializes a new instance of the ServiceHost class with the type of service and its base addresses specified.


Is it not possible to use the type of an interface?
Or have I make an other error?

Thanks in advance for your helpings!

Martin


=== MY SAMPLE FOR BETTER UNDERSTANDING ============

// MY INTERFACE
[ServiceContract()]
public interface IAddressService {
[OperationContract]
Address GetAddress (Int32 index);
}

// MY IMPLEMENTATION OF THE INTERFACE
[ServiceBehavior()]
public class AddressService : IAddressService {
...
}

// MY SERVICE-HOST
static void Main(string[] args) {

// THIS PRODUCES AN ERROR
ServiceHost host = new ServiceHost(typeof (IAddressService));

// this makes no problem
// ServiceHost host = new ServiceHost(typeof(AddressService));

host.Open();
...
host.Close();
}

Questionwindow serevice and disk quota (Please help). [modified] Pin
goblins20-Jun-07 18:48
goblins20-Jun-07 18:48 
AnswerRe: window serevice and disk quota (Please help). Pin
originSH21-Jun-07 0:02
originSH21-Jun-07 0:02 
GeneralRe: window serevice and disk quota (Please help). Pin
goblins21-Jun-07 0:52
goblins21-Jun-07 0:52 
GeneralRe: window serevice and disk quota (Please help). Pin
Dave Kreskowiak21-Jun-07 2:09
mveDave Kreskowiak21-Jun-07 2:09 
GeneralRe: window serevice and disk quota (Please help). Pin
goblins21-Jun-07 14:09
goblins21-Jun-07 14:09 
QuestionDisabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
MrAndrew20-Jun-07 4:38
MrAndrew20-Jun-07 4:38 
AnswerRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
Luc Pattyn20-Jun-07 4:49
sitebuilderLuc Pattyn20-Jun-07 4:49 
GeneralRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
MrAndrew20-Jun-07 5:51
MrAndrew20-Jun-07 5:51 
AnswerRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
Craster20-Jun-07 5:53
Craster20-Jun-07 5:53 
GeneralRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
MrAndrew20-Jun-07 6:05
MrAndrew20-Jun-07 6:05 
AnswerRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
MrAndrew20-Jun-07 7:08
MrAndrew20-Jun-07 7:08 
AnswerRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
Vasudevan Deepak Kumar22-Jun-07 5:29
Vasudevan Deepak Kumar22-Jun-07 5:29 
GeneralRe: Disabling Ctrl + F4 and Ctrl + F6 in MDI app Pin
MrAndrew23-Jun-07 4:37
MrAndrew23-Jun-07 4:37 
Questionmoving to .net framework 3 Pin
Ayman Mashal20-Jun-07 4:02
Ayman Mashal20-Jun-07 4:02 
AnswerRe: moving to .net framework 3 Pin
Kevin McFarlane20-Jun-07 6:02
Kevin McFarlane20-Jun-07 6:02 
GeneralRe: moving to .net framework 3 Pin
Ayman Mashal20-Jun-07 17:57
Ayman Mashal20-Jun-07 17:57 
GeneralRe: moving to .net framework 3 Pin
Christian Graus20-Jun-07 18:10
protectorChristian Graus20-Jun-07 18:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.