Separating Out A Wcf Service, Server, And Client

Oct 25, 2011

I have a solution in VS 2010: a WCF Service Library project ("NotifyService") and two Windows Forms projects, one for a server ("NotifyServer")and one for a client ("NotifyClient"). My goal is to have a duplex WCF service that will notify any number of connected clients when the server pushes out a notification. The clients do not need to communicate to the server except to subscribe and unsubscribe from the server's updates. However I seem to be running into problems nailing down the InstanceContext.

Here's the code for the WCF service:

<ServiceContract(
CallbackContract:=GetType(INotifyCallback),
SessionMode:=SessionMode.Required)>

[Code].....

Since I'm setting everything up through code, there are no app.config files. The problem I'm having is that my Subscribe method is never called. When debugging, I get an error after stepping through that line (not an exception) that says "Unable to automatically step into the server. The debugger failed to stop in the server process." When I go back to my server form and click the button designed to raise an event on the callback clients, it steps into the NotifyService class but the _callbacks list is empty, meaning the Subscribe method either never ran, or it never ran on that instance.

I have fought with this for almost a week. This is nearly an identical copy, at least on the service-side, to what was described here, and I've compiled that and it works.

View 1 Replies


ADVERTISEMENT

VS 2008 TCP Server / Client - Client To Send The Server 4 Numbers - Depending On The User's Choice

May 9, 2009

how to create a client/server... But I couldn't... I don't want anything fancy. Just want the client to send the server 4 numbers, depending on the user's choice; after that, the server would turn off the pc, restart it, etc. It all depends on the number received. Is there a rather "simple" way to do it? If it's not to much trouble you could use Atheist's example. (Btw I don't understand the code and, yes, I've checked on [URL])

View 9 Replies

VS 2010 : Send Data From Client To Server (encrypted) And The String Sent From The Client Is Not The Same As Received From The Server?

Jun 27, 2011

Hey guys, I am trying to send data from client to server (encrypted) and the string sent from the client is not the same as recieved from the server. I've been killing my brain for hours to get this to work but I cant manage. Im converting everything to Base64 string.

Client:

Public Sub SendMessage(ByVal msg As String)
Try
SyncLock myclient.GetStream
sw = New IO.StreamWriter(myclient.GetStream)

[code]....

View 4 Replies

Client-Server-Client Multithreading - Instant Message Another Client

Jun 21, 2010

We are creating a Who wants to be a millionaire style game in VB. Our server is pulling information such as questions and answers from a Access Database and sending them to the contestants (Clients). All transfer of information is directly from the server to each client. One of the "Life Lines" we want to use is "Ask a friend", where one client is able to Instant message another client for a short time to get help on the question.

[Code]...

View 2 Replies

Web Service Client Accessing Java Web Service / Connection Aborted

Sep 27, 2010

I had a problem getting a VB.NET web service client to receive the response object from a Java web service.In the process of posting this question someone from another department volunteered some code written for a similar situation.I couldn't find this anywhere on the net so I'm completing my question to help others out.[code]The web service is Apache CXF with some Spring elements mixed in.

View 1 Replies

Separating Date And Time Values From SQL Server 2008 To Display In Asp.net?

Sep 12, 2011

I have a database table that stores a datetime value.I want to display that value on my asp.net textboxes, except I need to show date value in TextBox A and Time in TextBox B.How can I split those values in VB.NET?

View 2 Replies

Create Client-server App, In Which Client Can View Files On Server?

Nov 15, 2011

basically i just want client to say "C: emp" ENTER

then, server must reply with all its files in c: emp

View 1 Replies

Communications :: Client-server Communication Program - Click On CmdListen In The Server Form And CmdConnect In The Client Form

Jul 23, 2008

The problem I have is: When I click on cmdListen in the server form and cmdConnect in the client form,both programs won't respond and they crash for some reason I don't know.

Client source code:

Code:

Imports System.Net.Sockets
Imports System.Text
Public Class Form1

[CODE]...

Code:
Imports System.Net.Sockets
Imports System.Text
Public Class Form1

[CODE]...

View 3 Replies

Server/Client - Basic Tcp Server/client Application

Mar 30, 2009

I've basically made a basic tcp server/client application. The thing is that I'm behind a router and so will be the other people that use my clients. I've had to use port-forwarding or the software "rinetd"to run quite a few applications online.

Let me explain: I'm on a lan network that connects to the internet. Whenever I want to host a server - for instance a basic ftp or http server. If I give my external IP to anyone, they won't be able to access my server. Even if I portforward, it doesnt work. I have to use rinetd here. For other applications, portforwarding works. I'm not sure how these things work at all.

Anyway, my issue now is that I have created this server/client application. I'm having serious doubts that if I run the server, I'll have to either a) portforward or use rinetd to get people to connect to my server. IF I need to portforward, that's fine. However, using rinetd would really suck... My 2nd concern is as follows: IF the person running the client is in a similar situation as me (i.e he's on a lan that has a router which connects to the net), will he have to portforward or use rinetd as well? If he portforwards that's fine. But I don't think I could get people to use rinetd.... Also, if there are more than 1 person on a lan trying to connect to my server, there is a big problem when they try to portforward: they will only be able to allocate one of their internal ip to that port, and the others won't be able to connect, right? How does this work? I mean, I use many softwares like msn/skype/(some games)/firefox that do not need portforwarding/rinetd. Yet they work. My housemates(other people on the lan) use the same softwares, and it works fine. There's no clash/probs watsoever How come these run fine?

Anyway, back to my issues. Given I have no knowledge about how the above work, I was wondering whether there was a way to host a vb .net server application on an external website (external to my house) so that I might *avoid* the above mentioned problems, and to what extent that would be a sound solution.

View 11 Replies

Writing A Program With 1 Client And Server Where Client Side Creates A Text File

Dec 1, 2008

I have been reading through Atheists posts in regards to client-server and TCP client/server connection's. But how do i go about writing a program with 1 client and server where the client side creates a text file.Once the server sees there is a text file it connects and downloads it to itself or the client pushes the text file to the server.Once on the server i will read the text file and put its info into a sql db.

View 14 Replies

VS 2008 Chat Server/client - After The Client Clicks Disconnect Or Closes By Task Manager, Looses Connection

Aug 18, 2009

Im using the code from [URL] as a starter, most of the code is the same. the chat system works fine but on the client a added a disconnect button "clientSocket.Close()" and as soon as i click that i get errors, on the client, this is the code...

Private Sub getMessage()
For infiniteCounter = 1 To 2

[CODE]...

And this line...

serverStream.Read(inStream, 0, buffSize)
gives me "Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall."

Now im talking the server, after the client clicks disconnect or closes by task manager, looses connection, etc the server crashes and gives me.

View 5 Replies

Chat Client To Client Without Server Just Use IP Address For It?

Apr 19, 2012

Chat Client to Client Without Server Just Use IP Address For it?

View 1 Replies

VS 2008 Multi-User Chat Program (Server & Client) With Main Server?

Aug 10, 2009

Multi-User Chat Program (Server & Client) with Main Server?

View 1 Replies

.net - Service Reference Client Bug?

Aug 16, 2011

i have a WPF application that uses a service reference to a web service.Now i have a GUI component that tracks the progress of this...But i seem to have some sort of bug here, it only occurs on some machines and not often..I start a call with MethodNameAsync and display the progress bar until the matching Completed event occurs.

some times i call 3 different async methods in a row but only the two of them get their Completed event raised so the GUI will be locked and the application has to be restarted.After being totally frustrated a few weeks i found the event AppDomain.CurrentDomain.FirstChanceException, so i hooked up to it and started logging all FirstChanceExceptions..

[Code]...

Fix this temporary by not using async methods and instead using a thread that will call them one by one.. now this is not a elegant solution, i should be able to use the async methods...

View 1 Replies

Clinet/server The Server Broadcast Media Files To Client I Used Tcp/ip Protocol?

May 13, 2011

i have 2 application clinet/server the server broadcast media files to client i used tcp/ip protocol the server code is work good but i have a problem in client code i need ineed someone to correct the code .iwll show where the error is in the code note: i call the class in the main form dim a as recive in the starter of the main form class to be gloable .

[Code]...

View 4 Replies

SQL Server 2008 Configuration For Client Server (Windows Form) Application

Apr 6, 2012

Case : I'm creating an application (desktop application) with VB.NET (actually windows form), and using SQL Server Express 2008 for its database.

[Code]...

View 1 Replies

The SMTP Server Requires A Secure Connection Or The Client Was Not Authenticated. The Server Response Was 5.5.1 Authentication Required

Nov 28, 2009

This emailing code wont seem to work in my program. I get an exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was 5.5.1 authentication required."

Imports System.Net.Mail
Public Class emailStudent
Private Sub sendEmailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sendEmailButton.Click
SendMail()

[code]....

View 12 Replies

Difference Between SQL Server Native Client And SQL Server DSN To Support SP Execution?

Jul 9, 2009

I wrote a VB code to call a sp in sql server 2005, which returns a recordset as follows:Dim objRecordset As ADODB.Recordset Set objComm = New ADODB.Command

Set objRecordset = objComm.Execute If Not objRecordset.BOF And Not objRecordset.EOF Then
Set objRecordset = objRecordset.NextRecordset I need to continue to get next recordset since there are many select statements inside the sp which I need to get the data. The code works fine when I create the DSN using SQL Server but it does not work when using the connection string or SQL Server Native Client DSN. It either breaks at Set objRecordset = objComm.Execute ( connection string )or at If Not objRecordset.BOF And Not objRecordset.EOF Then(SQL native client )

I have worked on this for a couple of days now and could not figure it out.Is this a bug in SQL Native Client or something related to some configuration on the database side? IS there a way I can change the connection property to get this working using SQL native client or connection string?

View 1 Replies

Info: Multithreaded Server Socket Program Or Client/Server?

Oct 26, 2011

I made a simple TCP server (I've found the example on the web) in VB to receive data from about 40 TCP clients.The clients are not synchronized but sends data about every 18 minutes; the problem is sometimes several clients sends data at the same moment, so I can't receive data.I also made a second program that reads the data (server program writes data on a file, read from the second program) scheduled.

My question is this: I've seen on the web examples about Multithreaded Server Socket Program, so I suppose this could manage my 40 clients (but now the clients are syncronized and send data at the same time in client mode) or is better get data (I have a central client that asks data to all 40 devices in server mode)?

Second question: can I make a single program where I run both TCP client and TCP server at the same time?

View 1 Replies

C# - Create A Asmx Client For Wcf Service?

Jun 13, 2012

I have some clients calling my asmx service and I figure out to change my asmx to a Wcf service.How can my asmx clients call to my Wcf service without modify the client application?Maybe just a few changes in the config file...I can't expect than they compile their applications.

View 2 Replies

Getting A Response With A .NET Client From A Java Web Service?

May 26, 2011

Here's the situation. I'm a Java developer. Another developer in our company wrote a web service for our clients. They wrote the service in Java. They also wrote a demo for creating a client to consume the web service in Java and it works just fine. I've been tasked with creating a web services client in VB.NET to do the same thing. It hasn't been going smoothly. The problem is that the web service requires that you send the username and password in the SOAP header and I can't figure out how to do that in Vb.NET. I looked at the following pages:

[Code]...

View 1 Replies

Client Server Application - How To Make Clients On Sql Server

Sep 24, 2010

How to make clients on sql server i mean when i will install my application on clients how i will connect it with sql server?

View 6 Replies

TCP Client/Server App That Sorts Out Text That Is Recieved From Server?

Aug 18, 2011

I'm currently "trying" to make an app that gets a certain text from the client and sends it to a server and the server sorts it out every text that he gets from the client into a different label every time he gets a text from a client. For example :

Client1 sends certain text to Server and server puts it in label1.text
Client2 Sends different text to Server and server puts it in label2.text
Client3 sends different text than 1 and 2 to Server and server puts it in label3.text
and so on.

View 3 Replies

Access Wcf Service By A Client Using Channel Factory?

May 6, 2011

I tried this one...but its not working.[code]...

View 1 Replies

Install A .NET Windows Service - This Is Not Available In The Client's System?

Feb 8, 2006

I have written a VB.NET windows service application. I installed it in my system using the Installutil.exe. But this is not available in the client's system because the .NET is not installed in that system.Is there any way to install the .NET windows service application without the Installutil ?

View 4 Replies

Order For 2.0 Client Service To Perform Actions?

Jun 24, 2011

Would I need it in order for my VB.NET 2.0 client service to perform those actions? Is the Azure SDK only for web development?

View 1 Replies

Threading Windows Service TCP Socket Client?

Jan 22, 2012

I'm trying to build a multithreaded SMPP client with VS2008 and I'm getting bogged down in threading. Basically my main parent thread will interact with the windows service scheduler, get registry settings, and get a list of SMPP servers to connect to. Then it will launch a thread for each SMPP connection, which will need to keep it's TCP socket open to receive messages with, so the thread must remain running even if there aren't any events happening (no messages to receive)... but I can't seem to get it figured out.

[Code]...

The Start sub in the oChannel object does run, but once that sub is finished running the thread ends. In the Start sub, it calls other code that initiates a connection to the remote SMPP server, but that code asynchronously waits for an event to be raised regarding the connection status. Once the sub finishes, the async connection being attempted doesn't seem to be able to pin the thread down.

View 3 Replies

TCP Server/Client "Individual Send To Conected Client"?

Jul 4, 2009

I have got the server app an the Client app Both Working to what i can see But My issue is i was only asked 4 days ago if i could add a Private msg and Whisper Feature as well as admin controls I have Done what i could to it then realised i have no idea how to only send the data to the selected client.

View 14 Replies

VS 2008 : TCP Server/Client "send Hashtable To Client App"?

Jul 15, 2009

i have been working on a chat program Server side and client side i have most of the features i was asked to put in but then once i got most of the bugs out i noticed something the server admin could send whispers and alerts to single users but then when you try do do it on the client side it wont work so i looked through it all and found my issue the user list on the client is only a list of the names in server hash table so i was wondering how do i send the hashtable and all of its data E.G. user connection information to the client so that it can send commands to individual users like the server side can

vb
Public clients As New Hashtable()
' This subroutine checks to see if username already exists in the clients
' Hashtable. If it does, send a REFUSE message, otherwise confirm with a JOIN.

[code]....

i tried to send the hashtable over the same method used to send the user names to the client but it cannot convert the hashtable to a string so that wont work so my question is How do i send the hash table to the user from the server then display the username on the client ??

View 39 Replies

.net - Call Web Service Using Client Certificates / Mutual Authentication?

Mar 23, 2012

I'm building a web service client using vb .net. The web service is secured with ssl, basic authentication and also requires client certificates. So I created a web reference in Visual Studio and provided the credentials:

Dim cred As New System.Net.NetworkCredential("usr", "passwd")
Dim proxy As New SimpleFromLocal.simple
proxy.Credentials = cred
Console.WriteLine(proxy.helloWorld())

This works as expected, as long as I turn off mutual authentication on the server side.I added a client certificate like this:

Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(certFile)proxy.ClientCertificates.Add(cert)

The certificate is loaded, but the web service call fails. I could post the exception, but it is in german, which is an issue on its own. It basically says: Authentication failed, because the remote site closed the connection.I tried debugging the ssl handshake on the server side and it looks like the client certificate is not transmitted.So what am I missing here? Is it required to install the client certificate on the local machine?Edit: The error thrown:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved