DocumentUltimateWebConfigurationCacheLocation Property | ![]() |
Namespace: GleamTech.DocumentUltimate.AspNet
Using physical/virtual path for cache location:
//Setting physical location via string: //(can also be virtual path string like "~/App_Data/DocumentCache") DocumentUltimateWebConfiguration.Current.CacheLocation = @"c:\SomeFolder\DocumentCache"; //Same as above DocumentUltimateWebConfiguration.Current.CacheLocation = @"Type=Physical; Path=c:\SomeFolder\DocumentCache"; //Setting physical location via a PhysicalLocation instance (same as above) DocumentUltimateWebConfiguration.Current.CacheLocation = new PhysicalLocation { Path = @"c:\SomeFolder\DocumentCache" }; //Using a UNC share for cache location //User Name can be speficied as Domain\User, User@Domain (UPN format), MachineName\User //or User (local user). If a value contains semi-colon character, that value should be enclosed //in single quotes (eg. Password='PASSWORD') or double quotes (eg. Password="PASSWORD"). DocumentUltimateWebConfiguration.Current.CacheLocation = @"Path=\\server\share; User Name=USERNAME; Password=PASSWORD"; //Same as above DocumentUltimateWebConfiguration.Current.CacheLocation = new PhysicalLocation { Path = @"\\server\share", UserName = "USERNAME", Password = "PASSWORD" }; //If Windows Authentication is used in IIS for this site, location can be specified like this //to connect as the already authenticated user: DocumentUltimateWebConfiguration.Current.CacheLocation = @"Path=\\server\share; Authenticated User=Windows"; //Same as above DocumentUltimateWebConfiguration.Current.CacheLocation = new PhysicalLocation { Path = @"\\server\share", AuthenticatedUser = AuthenticatedUser.Windows };
<!-- Setting physical/virtual cache location in <appSettings> tag of Web.config --> <appSettings> <!-- Setting a physical path (can also be virtual path string like "~/App_Data/DocumentCache") --> <add key="DocumentUltimateWeb:CacheLocation" value="c:\SomeFolder\DocumentCache"/> <!-- Setting a UNC share --> <add key="DocumentUltimateWeb:CacheLocation" value="Path=\\server\share; User Name=USERNAME; Password=PASSWORD"/> </appSettings>
Using Amazon S3 for cache location:
//Setting Amazon S3 location via string: DocumentUltimateWebConfiguration.Current.CacheLocation = "Type=AmazonS3; Bucket Name=BUCKET; Region=eu-central-1; Access Key Id=XXX; Secret Access Key=XXX; Path=DocumentCache"; //Setting Amazon S3 location via an AmazonS3Location instance (same as above) DocumentUltimateWebConfiguration.Current.CacheLocation = new AmazonS3Location { BucketName = "BUCKET", Region = "eu-central-1", AccessKeyId = "XXX", SecretAccessKey = "XXX", Path = "DocumentCache" };
<!-- Setting Amazon S3 cache location in <appSettings> tag of Web.config --> <appSettings> <add key="DocumentUltimateWeb:CacheLocation" value="Type=AmazonS3; Bucket Name=BUCKET; Region=eu-central-1; Access Key Id=XXX; Secret Access Key=XXX; Path=DocumentCache"/> </appSettings>
Using Azure for cache location:
//Setting Azure Blob location via string: DocumentUltimateWebConfiguration.Current.CacheLocation = "Type=AzureBlob; Container=CONTAINER; Account Name=XXX; Account Key=XXX; Path=DocumentCache"; //Setting Azure Blob location via an AzureBlobLocation instance (same as above) DocumentUltimateWebConfiguration.Current.CacheLocation = new AzureBlobLocation { Container = "CONTAINER", AccountName = "XXX", AccountKey = "XXX", Path = "DocumentCache" };
<!-- Setting Azure Blob cache location in <appSettings> tag of Web.config --> <appSettings> <add key="DocumentUltimateWeb:CacheLocation" value="Type=AzureBlob; Container=CONTAINER; Account Name=XXX; Account Key=XXX; Path=DocumentCache"/> </appSettings>