Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing IIS VirtDir HttpErrors
Message
De
08/10/2002 09:07:14
 
 
À
07/10/2002 20:43:04
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00708576
Message ID:
00708712
Vues:
13
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!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform