Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing IIS VirtDir HttpErrors
Message
From
08/10/2002 09:07:14
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00708576
Message ID:
00708712
Views:
14
This message has been marked as the solution to the initial question of the thread.
The correct code according to me is:
szAppName = "MyApp"
oIISvDir = GetObject("IIS://LocalHost/W3SVC/1/root/"+ szAppName)
*-- Change the way arrays are passed to this COM object
ComArray(oIISvDir, 10)

laErrorDocs = oIISvDir.Get("HttpErrors")
SET EXACT OFF
lnIndex = ASCAN(laErrorDocs,"500,100")

If lnIndex = 0 Then
	lnIndex = Alen(laErrorDocs)+1
	Dimension laErrorDocs(lnIndex)
EndIf

szCustomError = "500,100,URL,/" + szAppName + "/errors.asp"
laErrorDocs(lnIndex) = szCustomError

*-- To store the array you should pass it by refference using put method
oIISvDir.Put("HttpErrors", @laErrorDocs)

*-- Save changes
oIISvDir.SetInfo()

*-- Check value
laErrorDocs = oIISvDir.Get("HttpErrors")
Return
HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform