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 / .NET Framework / General / December 2005

Tip: Looking for answers? Try searching our database.

associating subdomains to .net sockets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
radiax - 26 Dec 2005 13:24 GMT
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
Vadym Stetsyak - 26 Dec 2005 18:19 GMT
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 )

Signature

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

> Is there a way to associate or bind a subdomain to a tcp sockets under
> .net
[quoted text clipped - 4 lines]
> ip address. Any inputs??
> thanks
radiax - 26 Dec 2005 22:36 GMT
when i say shared i meant that the box has only one ipaddress and all
subdomains share that ip.
> What do you mean by "shared"?
>
[quoted text clipped - 16 lines]
> > ip address. Any inputs??
> > thanks
Jim Hughes - 27 Dec 2005 00:11 GMT
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.

> when i say shared i meant that the box has only one ipaddress and all
> subdomains share that ip.
[quoted text clipped - 23 lines]
>> > ip address. Any inputs??
>> > thanks
radiax - 27 Dec 2005 05:50 GMT
Thanks Jim, I will go and dig more on how to accomplish it
> 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
[quoted text clipped - 32 lines]
> >> > ip address. Any inputs??
> >> > thanks

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.