Avatar of Starr Duskk
Starr Duskk
Flag for United States of America asked on

ASP Classic web site on IIS7

I'm moving an old ASP Classic website from IIS5 windows 2000 to IIS7 windows 2008.

In the application pool, I have set it up for Classic mode instead of Integrated mode, but don't know that that is necessary.

My problems I'm having is this. The site is full of a bunch of include files which are setup as this:
<!-- #include file="header.asp" -->

Instead of INCLUDE VIRTUAL. If I change them all to INCLUDE VIRTUAL, with the virtual path instead of relative path, they work fine. Does anyone know why that would be an issue on IIS7 / Windows 2008?

Also, I have a function, that simply is:
 Function PCase(strInput)

And it errors that there is a syntax error on this line.

It worked on the old windows 2000 web server. Is there something I need to take into consideration when moving a classic website to windows 2008 and IIS7?

thanks.
Windows Server 2008Microsoft IIS Web Server

Avatar of undefined
Last Comment
Sven

8/22/2022 - Mon
rdivilbiss

>It worked on the old windows 2000 web server. Is there something I need to take into consideration when moving a classic website to windows 2008 and IIS7?

Maybe. Using the include virtual would seem not to be a big problem, can you post the code for Function PCase(strInput)?
Starr Duskk

ASKER
I don't believe it has anything to do with the funcionality. Just things aren't working the same....
Here is is...
 

Function PCase(strInput)
	Dim iPosition  ' Our current position in the string (First character = 1)
	Dim iSpace     ' The position of the next space after our iPosition
	Dim strOutput  ' Our temporary string used to build the function's output

	' Set our position variable to the start of the string.
	iPosition = 1
	
	' We loop through the string checking for spaces.
	' If there are unhandled spaces left, we handle them...
	Do While InStr(iPosition, strInput, " ", 1) <> 0
		' To begin with, we find the position of the offending space.
		iSpace = InStr(iPosition, strInput, " ", 1)
		
		' We uppercase (and append to our output) the first character after
		' the space which was handled by the previous run through the loop.
		strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
		
		' We lowercase (and append to our output) the rest of the string
		' up to and including the current space.
		strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))

		' Note:
		' The above line is something you may wish to change to not convert
		' everything to lowercase.  Currently things like "McCarthy" end up
		' as "Mccarthy", but if you do change it, it won't fix things like
		' ALL CAPS.  I don't see an easy compromise so I simply did it the
		' way I'd expect it to work and the way the VB command
		' StrConv(string, vbProperCase) works.  Any other functionality is
		' left "as an exercise for the reader!"
		
		' Set our location to start looking for spaces to the
		' position immediately after the last space.
		iPosition = iSpace + 1
	Loop

	' Because we loop until there are no more spaces, it leaves us
	' with the last word uncapitalized so we handle that here.
	' This also takes care of capitalizing single word strings.
	' It's the same as the two lines inside the loop except the
	' second line LCase's to the end and not to the next space.
	strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
	strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))

	' That's it - Set our return value and exit
	PCase = strOutput
End Function

Open in new window

ASKER CERTIFIED SOLUTION
Sven

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23