By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,882 Members | 2,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,882 IT Pros & Developers. It's quick & easy.

Please Help: how to connect using specific IP address

P: n/a
Hi everyone I don't know if I am posting this to the right newsgroup but it
is the closest I found, in case you think you can advice me to another
newsgroup please feel free to
do so. I am so desperate to get my problem solved.

The issue is related to sockets and networking this is my problem

short version:
I need to connect to an application using a specific IP, i.e. the server I
will connect to will see that specific IP address
how can I do that in .NET any help please.
----------------------------------------

Detailed version:
I have to build two applications(GenericCustomers.exe and
PremiumCustomers.exe) they will run on the same server
both applications will connect to one server (MainBase) across the Internet
using the same port number 1323
we have two external IP addresses i.e.(Internet IP address) and pointing by
the router to the my server where my applications are running
I need GenericCustomers.exe when connecting the MainBase should use one
external IP address while PremiumCustomers.exe should connect using the
other external IP address.

The MainBase server recognizes applications by their external IP address
which have to be registered in it's database

I can not run each of them on a separate server neither I can use different
port number (otherwise it can be solved by the router)
I am using C# and visual Studio 2005

What I see is that the application when attempts to connect should
initialize the socket with the IP address that I want to start the
connection with
I can not see this as impossible (think of the router applications that do
all the NAT)
but I did not see anything that help in the socket class nor on the Connect
method..
----------------------------------------

guys anyone have encountered such need or can solve this .. please write
back
Aug 19 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If it were me, I'd write one set of base code, implement WCF, and expose the
"Service" as 2 seperate endpoints.

Search WCF and "endpoint" and you'll find stuff.

There is a book "Programming WCF Services" by Juval Lowry, that I'd
recommend.

"Abdulla Herzallah" <ah@herz.dkwrote in message
news:eR**************@TK2MSFTNGP04.phx.gbl...
Hi everyone I don't know if I am posting this to the right newsgroup but
it
is the closest I found, in case you think you can advice me to another
newsgroup please feel free to
do so. I am so desperate to get my problem solved.

The issue is related to sockets and networking this is my problem

short version:
I need to connect to an application using a specific IP, i.e. the server I
will connect to will see that specific IP address
how can I do that in .NET any help please.
----------------------------------------

Detailed version:
I have to build two applications(GenericCustomers.exe and
PremiumCustomers.exe) they will run on the same server
both applications will connect to one server (MainBase) across the
Internet
using the same port number 1323
we have two external IP addresses i.e.(Internet IP address) and pointing
by
the router to the my server where my applications are running
I need GenericCustomers.exe when connecting the MainBase should use one
external IP address while PremiumCustomers.exe should connect using the
other external IP address.

The MainBase server recognizes applications by their external IP address
which have to be registered in it's database

I can not run each of them on a separate server neither I can use
different
port number (otherwise it can be solved by the router)
I am using C# and visual Studio 2005

What I see is that the application when attempts to connect should
initialize the socket with the IP address that I want to start the
connection with
I can not see this as impossible (think of the router applications that do
all the NAT)
but I did not see anything that help in the socket class nor on the
Connect
method..
----------------------------------------

guys anyone have encountered such need or can solve this .. please write
back


Aug 19 '07 #2

P: n/a
You ever hear of cross posting to several NG(s) with the same post at one
time? It's rude to go to each individual NG and make the same post.

Aug 19 '07 #3

P: n/a
Thank you for your valuable input, my apologies, I was not aware of this,
and I was/still am in a desperate situation.

I will remember that next time.

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
You ever hear of cross posting to several NG(s) with the same post at one
time? It's rude to go to each individual NG and make the same post.

Aug 20 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.