Case Sensitive URL using Window 2000 Server

G

Guest

I have a strange occurrence on a test internal website with a control that
appears at the top of every page.
The website is on a test Windows 2000 Server running IIS with a domain name
'DARASD06'. Once the URL (below) has been entered, the user clicks a link
that takes you to a login page. This is authenticated and then uses
'returnURL' to get to the next page - a news page. It is this page and any
others from this point on that display the problem as described below...

If you log in using a lowercase URL:
http://darasd06/datamanagementsystem

Then log in with a valid username and password, the control at the top of
the subsequent pages work fine and refers to the following image source:
src="images/Top Banner/logo.gif"

However, if you log in with the following URL (note the text case):
http://darasd06/DataManagementSystem
the images cannot be found. Somehow, the control needs the URL to be
lowercase before the images in it are displayed correctly. This also occurs
if you log in using the lowercase URL and change any of the name to uppercase
and vice versa.

The html code then changes to:
src="../datamanagementsystem/images/Top Banner/logo.gif"

I have tried many combinations, even using the servers IP address directly,
but it still replicates this problem.

Any idea how I can stop this happening?

Many thanks,

Claire-Louise Patrick
 
G

Guest

I have subsequently got around this problem by making the image path absolute
rather than relative.

This has been acvhieved by entering the domain name (IIS Virtual directory
root) into the web.config file as a key:
<add key="rootName" value="/rootDomainName" />
I then read this file and pick up the key (rootName) and store it in a
string called _rootName. This is then used in the code-behind page of the
relevant control to set the imagename.imageurl= _rootName &
"/pathnameMinusRoot/imageFilename.gif"

By setting a key in the web.config file, I can easily change the root name
whenever I need to.

This does, however, seem to be a long winded way around the problem.

If anyone else has come across this problem and solved it - let me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top