Share via


Limits Element

The Limits element in the Web.config file restricts the number of Orders run-time objects that can be created in a user's session. Limiting the number of objects that can be created helps to prevent denial of service attacks on the Web site.

Put the Limits element within the orders element.

The following table lists the attributes of the Limits element.

Attribute

Data Type

Description

BasketsPerUser

String

The maximum number of Baskets that an OrderGroup can contain.

This string value must represent an integer.

The default value is "15".

OrderTemplatesPerUser

String

The maximum number of OrderTemplates that an OrderGroup can contain.

This string value must represent an integer.

The default value is "10".

OrderFormsPerOrderGroup

String

The maximum number of OrderForms that an OrderGroup can contain.

The default value is "5".

PromoCodeRecordsPerOrderForm

String

The maximum number of PromoCodeRecords that a PromoCodeRecordCollection can contain.

This string value must represent an integer.

The default value is "10".

PromoCodesPerOrderForm

String

The maximum number of strings that the PromoCodes attribute of an OrderForm can contain.

This string value must represent an integer.

The default value is "10".

LineItemsPerOrderForm

String

The maximum number of LineItems that a LineItemCollection can contain.

This string value must represent an integer.

The default value is "40".

PaymentsPerOrderForm

String

The maximum number of Payments that a PaymentCollection can contain.

This string value must represent an integer.

The default value is "10".

ShipmentsPerOrderForm

String

The maximum number of Shipments that a ShipmentCollection can contain.

This string value must represent an integer.

The default value is "40".

OrderAddressesPerOrderGroup

String

The maximum number of OrderAddresses that an OrderGroup can contain.

This string value must represent an integer.

The default value is "10".

Note

Bercause the Basket class, the OrderTemplate class, and the PurchaseOrder class all derive from the OrderGroup class, any attribute that limits an OrderGroup also limits a Basket, an OrderTemplate, and a PurchaseOrder.

Example

<orders>
     <Limits 
         OrderFormsPerOrderGroup="1" 
         PromoCodeRecordsPerOrderForm="5" 
         LineItemsPerOrderForm="25" 
         OrderTemplatesPerUser="10" 
         PaymentstPerOrderGroup="5" 
         ShipmentsPerOrderForm="5" 
         BasketsPerUser="5" 
         OrderAddressesPerOrderGroup="5"
     />
</orders>

See Also

Other Resources

Orders Runtime Object Model

Web.Config Configuration Settings