473,837 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 .ApplicationPat h
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 5627
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 .ApplicationPat h
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****@discuss ions.microsoft. com> wrote in message
news:A4******** *************** ***********@mic rosoft.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 .ApplicationPat h
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 .ApplicationPat h
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****@discuss ions.microsoft. com> wrote in message
news:A4******** *************** ***********@mic rosoft.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 .ApplicationPat h
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
39002
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
2233
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 there TabIndex RANDOMLY (I do know about the renumbering mechanism, that supports you to arrange the TabOrder). Using Auto Order works, but this arranges the text boxes first priority in a L->R order, while I need them T->B
1
3274
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True Response.ContentType ="application/vnd.ms-excel" 'application/msword
0
1526
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 IIS, and accessing via a Intranet LAN (this is notpublicly available). NETWEB1: NIC1 172.16.17.220 172.16.17.244 (NLB Virtual IP) NIC2 172.16.17.221 NETWEB2:
2
242
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 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
3
7228
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: hostname : hostname Where "hostname" is the client host name. It doesn't seem to matter if I
1
3056
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 registry setting i.e
10
4329
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 when I am connected to the internet, both the client and server hang and nothing happens. I discovered that the hostname of my computer automatically changes to that of my isp when I'm connected to the internet, and presumably the server program...
1
2336
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
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10263
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7803
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6989
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5666
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5842
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.