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

associating subdomains to .net sockets

P: n/a
Is there a way to associate or bind a subdomain to a tcp sockets under .net
framework (vb.net / c#). I know ip address can be used when using sockets,
but the problem is the ip address is shared among subdomains (limited ips
supply). Iam looking for possible way to use subdomain.domain.com instead of
ip address. Any inputs??
thanks
Dec 26 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
What do you mean by "shared"?

you can use "subdomain.domain.com" but then in order to do any network i/o
you will
have to query your DNS server for the server ip address. ( because sockets
work only with ip addresses )

to obtain needed ip address

Dns.GetHostByName("subdomain.domain.com"); ( .NET 1.1 )
or Dns.GetHostEntry("subdomain.domain.com"); ( .NET 2.0 )

--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"radiax" <ra****@comcast.net> wrote in message
news:9q******************************@comcast.com. ..
Is there a way to associate or bind a subdomain to a tcp sockets under
.net
framework (vb.net / c#). I know ip address can be used when using sockets,
but the problem is the ip address is shared among subdomains (limited ips
supply). Iam looking for possible way to use subdomain.domain.com instead
of
ip address. Any inputs??
thanks

Dec 26 '05 #2

P: n/a
when i say shared i meant that the box has only one ipaddress and all
subdomains share that ip.
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:#j*************@TK2MSFTNGP15.phx.gbl...
What do you mean by "shared"?

you can use "subdomain.domain.com" but then in order to do any network i/o
you will
have to query your DNS server for the server ip address. ( because sockets
work only with ip addresses )

to obtain needed ip address

Dns.GetHostByName("subdomain.domain.com"); ( .NET 1.1 )
or Dns.GetHostEntry("subdomain.domain.com"); ( .NET 2.0 )

--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"radiax" <ra****@comcast.net> wrote in message
news:9q******************************@comcast.com. ..
Is there a way to associate or bind a subdomain to a tcp sockets under
.net
framework (vb.net / c#). I know ip address can be used when using sockets, but the problem is the ip address is shared among subdomains (limited ips supply). Iam looking for possible way to use subdomain.domain.com instead of
ip address. Any inputs??
thanks


Dec 26 '05 #3

P: n/a
With HTTP, subdomains/multiple hostnames for same IP address are enabled by
using a "Host Header" tag in the HTTP headers. That allows ONE service
(W3SVC) to respond differently to browser requests depending on the Host
Header sent by the client. All of the requests go to the same IP address on
the same port (80).

You would need to incorporate some similar mechanism in the protocol you use
for the service that is listening on service port on the shared IP address.
"radiax" <ra****@comcast.net> wrote in message
news:aK******************************@comcast.com. ..
when i say shared i meant that the box has only one ipaddress and all
subdomains share that ip.
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:#j*************@TK2MSFTNGP15.phx.gbl...
What do you mean by "shared"?

you can use "subdomain.domain.com" but then in order to do any network
i/o
you will
have to query your DNS server for the server ip address. ( because
sockets
work only with ip addresses )

to obtain needed ip address

Dns.GetHostByName("subdomain.domain.com"); ( .NET 1.1 )
or Dns.GetHostEntry("subdomain.domain.com"); ( .NET 2.0 )

--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"radiax" <ra****@comcast.net> wrote in message
news:9q******************************@comcast.com. ..
> Is there a way to associate or bind a subdomain to a tcp sockets under
> .net
> framework (vb.net / c#). I know ip address can be used when using sockets, > but the problem is the ip address is shared among subdomains (limited ips > supply). Iam looking for possible way to use subdomain.domain.com instead > of
> ip address. Any inputs??
> thanks
>
>



Dec 27 '05 #4

P: n/a
Thanks Jim, I will go and dig more on how to accomplish it
"Jim Hughes" <NO*********@Hotmail.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
With HTTP, subdomains/multiple hostnames for same IP address are enabled by using a "Host Header" tag in the HTTP headers. That allows ONE service
(W3SVC) to respond differently to browser requests depending on the Host
Header sent by the client. All of the requests go to the same IP address on the same port (80).

You would need to incorporate some similar mechanism in the protocol you use for the service that is listening on service port on the shared IP address.

"radiax" <ra****@comcast.net> wrote in message
news:aK******************************@comcast.com. ..
when i say shared i meant that the box has only one ipaddress and all
subdomains share that ip.
"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:#j*************@TK2MSFTNGP15.phx.gbl...
What do you mean by "shared"?

you can use "subdomain.domain.com" but then in order to do any network
i/o
you will
have to query your DNS server for the server ip address. ( because
sockets
work only with ip addresses )

to obtain needed ip address

Dns.GetHostByName("subdomain.domain.com"); ( .NET 1.1 )
or Dns.GetHostEntry("subdomain.domain.com"); ( .NET 2.0 )

--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"radiax" <ra****@comcast.net> wrote in message
news:9q******************************@comcast.com. ..
> Is there a way to associate or bind a subdomain to a tcp sockets under > .net
> framework (vb.net / c#). I know ip address can be used when using

sockets,
> but the problem is the ip address is shared among subdomains (limited

ips
> supply). Iam looking for possible way to use subdomain.domain.com

instead
> of
> ip address. Any inputs??
> thanks
>
>



Dec 27 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.