Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing IIS VirtDir HttpErrors
Message
De
08/10/2002 21:37:01
 
 
À
08/10/2002 09:07:14
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00708576
Message ID:
00709105
Vues:
14
Hi Zlatin,

Thank you very much. That works great.


- Brian


>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


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform