473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

NLB, IIS 6.0, .NET ASP Web App Randomly Changing URL From Hostname

I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB (single
Affinity, also using SQLServer session state) that are hosting a few .NET ASP
web applications under the Default Website in IIS, and accessing via a
Intranet LAN (this is not publicly available).

NETWEB1:
NIC1 172.16.17.220
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.221
NETWEB2:
NIC1 172.16.17.222
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.223
I'm using the following code in my .NET ASP web applications for all links
on the webpages:

urlSuffix = Context.Request.Url.Host & Context.Request.ApplicationPath
pageUrlBase = "http://" & urlSuffix
The problem is... (referring to a session running on NETWEB1)...

Using Virtual Hostname FQDN (http://nlb.domain.com): Randomly, the a link
will change from the NLB Virtual Hostname to the NLB Virtual IP address, and
clicking on the link will start a new session, requiring re-login (the URL is
now http://172.16.17.244).

Using Virtual Hostname (http://nlb): Randomly, the a link will change from
the NLB Virtual Hostname to the Non-NLB Server IP address, and clicking on
the link will start a new session, requiring re-login (the URL becomes
http://172.16.17.221).
This seems to be completely random in timing, but does happen after a few
minutes of navigating around the website.

Any Ideas??? :(
--------------------------------
From: James M
Jul 21 '05 #1
2 5579
Hello James,
I'm using the following code in my .NET ASP web applications for all links
on the webpages:

urlSuffix = Context.Request.Url.Host & Context.Request.ApplicationPath
pageUrlBase = "http://" & urlSuffix
Why?

If your links are relative links, you never need to do this.

..Net is fully capable of being hosted under load balancing without your help
in assigning the URL directly to the host. In fact, the behavior that you
are seeing is probably normal, in that a load balancer using single affinity
will, on its own accord and outside of your control, act as a proxy,
reissuing the request from the proxy FQDN to the actual server. Your
statement above captures the name used by the load balancer and reinserts it
in front of the current page name.

It's as though you WANT to circumvent the load balancer... and I can't
understand why you would want to do that.

Simply make all of your URLs relative, or absolute using the NLB's FQDN and
this issue goes away.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"James M." <Ja****@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB
(single
Affinity, also using SQLServer session state) that are hosting a few .NET
ASP
web applications under the Default Website in IIS, and accessing via a
Intranet LAN (this is not publicly available).

NETWEB1:
NIC1 172.16.17.220
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.221
NETWEB2:
NIC1 172.16.17.222
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.223
I'm using the following code in my .NET ASP web applications for all links
on the webpages:

urlSuffix = Context.Request.Url.Host & Context.Request.ApplicationPath
pageUrlBase = "http://" & urlSuffix
The problem is... (referring to a session running on NETWEB1)...

Using Virtual Hostname FQDN (http://nlb.domain.com): Randomly, the a link
will change from the NLB Virtual Hostname to the NLB Virtual IP address,
and
clicking on the link will start a new session, requiring re-login (the URL
is
now http://172.16.17.244).

Using Virtual Hostname (http://nlb): Randomly, the a link will change from
the NLB Virtual Hostname to the Non-NLB Server IP address, and clicking on
the link will start a new session, requiring re-login (the URL becomes
http://172.16.17.221).
This seems to be completely random in timing, but does happen after a few
minutes of navigating around the website.

Any Ideas??? :(
--------------------------------
From: James M

Jul 21 '05 #2
Thank you Nick!
I have relayed the information to the programming team to implement and
test. That seems to be the only issue we have had so far with NLB.
Take Care,
James M.

"Nick Malik [Microsoft]" wrote:
Hello James,
I'm using the following code in my .NET ASP web applications for all links
on the webpages:

urlSuffix = Context.Request.Url.Host & Context.Request.ApplicationPath
pageUrlBase = "http://" & urlSuffix


Why?

If your links are relative links, you never need to do this.

..Net is fully capable of being hosted under load balancing without your help
in assigning the URL directly to the host. In fact, the behavior that you
are seeing is probably normal, in that a load balancer using single affinity
will, on its own accord and outside of your control, act as a proxy,
reissuing the request from the proxy FQDN to the actual server. Your
statement above captures the name used by the load balancer and reinserts it
in front of the current page name.

It's as though you WANT to circumvent the load balancer... and I can't
understand why you would want to do that.

Simply make all of your URLs relative, or absolute using the NLB's FQDN and
this issue goes away.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"James M." <Ja****@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB
(single
Affinity, also using SQLServer session state) that are hosting a few .NET
ASP
web applications under the Default Website in IIS, and accessing via a
Intranet LAN (this is not publicly available).

NETWEB1:
NIC1 172.16.17.220
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.221
NETWEB2:
NIC1 172.16.17.222
172.16.17.244 (NLB Virtual IP)

NIC2 172.16.17.223
I'm using the following code in my .NET ASP web applications for all links
on the webpages:

urlSuffix = Context.Request.Url.Host & Context.Request.ApplicationPath
pageUrlBase = "http://" & urlSuffix
The problem is... (referring to a session running on NETWEB1)...

Using Virtual Hostname FQDN (http://nlb.domain.com): Randomly, the a link
will change from the NLB Virtual Hostname to the NLB Virtual IP address,
and
clicking on the link will start a new session, requiring re-login (the URL
is
now http://172.16.17.244).

Using Virtual Hostname (http://nlb): Randomly, the a link will change from
the NLB Virtual Hostname to the Non-NLB Server IP address, and clicking on
the link will start a new session, requiring re-login (the URL becomes
http://172.16.17.221).
This seems to be completely random in timing, but does happen after a few
minutes of navigating around the website.

Any Ideas??? :(
--------------------------------
From: James M


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lukas Schnieper | last post by:
Hi How can i get the hostname of my Linux PC? I tried os.system('hostname') but i cant save the hostname in a variable like hostname = os.system('hostname') thanks Lukas Schnieper
2
by: Walti | last post by:
Hi I stumbled over a strange problem in A2K concerning the Tab Order of 60 textboxes placed on a tab control: whenever I change the TabIndex of any one of these textboxes the other 59 change...
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
0
by: James M via .NET 247 | last post by:
(I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup withNLB (single Affinity, also using SQLServer session state) thatare hosting a few .NET ASP web applications under the DefaultWebsite in...
2
by: James M. | last post by:
I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB (single Affinity, also using SQLServer session state) that are hosting a few .NET ASP web applications under the Default Website...
3
by: Mark Delaney | last post by:
When using the MS SQL 2005 JDBC driver, I now need to have the DNS name resolution to the client correctly set up. If not I get the following error: SQLState: 08S01 SQLError: 0 Message:...
1
by: PaulReddin | last post by:
Hi, We have several instances & Databases on an AIX5.3 Server. We need to change the hostname of the Server, will this break DB2? The only reference to hostname I can "see" is in the Global...
10
by: 7stud | last post by:
Hi, I'm experimenting with a basic socket program(from a book), and both the client and server programs are on my computer. In both programs, I call socket.gethostname(), but I discovered that...
1
by: ksuralta | last post by:
Hi everyone, Hope somebody can help me with this. I have a framed window. -------------------------------- Frame 1 -------------------------------- | 2 | Frame 3
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.