"Thomas Evensen" <thomas__evensen RemoveThis @hotmail.com> wrote in message
news:7c54f975.0409290005.4b704667@posting.google.com...
> "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
> news:<cjbko4$8t13@kcweb01.netnews.att.com>...
>> "Thomas Evensen" <thomas__evensen RemoveThis @hotmail.com> wrote in message
>> news:7c54f975.0409280415.3e5f582@posting.google.com...
>> > Hello!
>> >
>> > My server has got 4 IP adresses. I wonder if it is possible, and
>> > how, to set up one instance of IIS on one and each of these 4 IP
>> > adresses. The goal is when connecting to the different IPs with
>> > the same URL, I want to be able to run different code. What version
>> > of IIS do I need?
>>
>> You can do this if you are running a Server version of an operating
>> system.
>> Open the IIS MMC and right click on the server name and select New -> Web
>> Site and enter your parameters. Be sure to specify the IP address for
>> each
>> one.
>>
>> > Is it possible for a web service running on one of these 4 IPs
>> > to determine which of the 4 IPs the client connected to? That is,
>> > is it possible for the web service to know whom of the 4 IIS
>> > instances excecutes it?
>>
>> Yes, well since the web service is running on the IP you set it up at,
>> then
>> that's the one the client connected to ...
>
> Thanks a lot, Tom! My second question was not clear enough... If I have
> one URL on each of the IISs pointing to the same directory on the hard
> disk,
> the same dll-file/web service binary will be run by all the IISs. How can
> this binary file / code find which of the four IISs which executes it?
You can get the IP that was requested from
Request.ServerVariables("LOCAL_ADDR"):
<a style='text-decoration: underline;' href="http://msdn.microsoft.com/library/en-us/iissdk/iis/servervariables.asp" target="_blank">http://msdn.microsoft.com/library/en-us/iissdk/iis/servervariables.asp</a>
<a style='text-decoration: underline;' href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebhttprequestclassservervariablestopic.asp" target="_blank">http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebhttpr...estclas</a>
--
Tom Kaminski IIS MVP
<a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</a>
<a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/" target="_blank">http://mvp.support.microsoft.com/</a>
<a style='text-decoration: underline;' href="http://www.iisfaq.com/" target="_blank">http://www.iisfaq.com/</a>
<a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running IIS
<a style='text-decoration: underline;' href="http://www.tryiis.com" target="_blank">http://www.tryiis.com</a><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Multiple IIS instances on one machine?