How do I allocate rights to allow asp.net to write to a directory

In order to allocate write writes to a asp.net 2.0 program allocate the rights to NETWORK SERVICE, and also ASPNET accounts