Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing IIS VirtDir HttpErrors
Message
From
08/10/2002 21:37:01
 
 
To
08/10/2002 09:07:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00708576
Message ID:
00709105
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform