Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

WCF Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
blutner@googlemail.com - 19 Oct 2007 20:27 GMT
Hello,

I have got a little test application, which provides an WCF service
and wants to consume it as well. The access does only succeed for the
case, that the consumption is done by another application instance,
but that's not really the thing I want. My question now is, if my
problem is gernerally solveable, and if so, in which way I have to
change my code.

Thank you for your help!

Robert

-> ITestService.vb

Public Interface ITestService

Function HelloWorld() As String

End Interface

-> TestService.vb

Public Class TestService
Implements ITestService

Public Function HelloWorld() As String Implements
ITestService.HelloWorld
Return "Hello World!"
End Function

End Class

-> FrmMain.vb

Public Class FrmMain

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' Provide the service!
Dim host As New ServiceModel.ServiceHost(GetType(TestService))
host.Open()
MsgBox("Service started.")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
' Connect to the service!
Dim address As New ServiceModel.EndpointAddress("net.pipe://localhost/
TestHost")
Dim binding As New ServiceModel.NetNamedPipeBinding()

Dim service As ITestService = ServiceModel.ChannelFactory(Of
ITestService).CreateChannel(binding, address)
MessageBox.Show(service.HelloWorld())
End Sub

End Class

--> app.config

At: http://clipboard.volectra.de/index.php?page=show&contentid=41
sloan - 19 Oct 2007 20:50 GMT
Dude,

You need to read your posts, before submitting.

What?? (are you asking?)

I'm not trying to be a butt, just letting you know.

Please post another message, this one is hard to read and understand.

With that:

2 things:
I have a named piped example here:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry

and there is a named pipe example at
www.idesign.net in the downloads area.
(This is a good site ... and i recommend juval lowy's book on WCF as well)

..

If you're still stumped, please create another post.

> Hello,
>
[quoted text clipped - 58 lines]
>
> At: http://clipboard.volectra.de/index.php?page=show&contentid=41

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.