mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Cleaned up and fixed a couple of errors in Orchard.Web.csproj.
Publishing now works for both Release and Debug configurations (previously worked only for Debug). Added missing module project Orchard.AzureBlobStogare to Orchard.Azure.sln and added a reference to it from Orchard.Azure.Web.csproj. Created separate solution folders Modules and Modules.Deprecated in Orchard.Azure.sln to be consistent with Orchard.sln. Cleaned up web.config transformation files. Upgraded Orchard.Azure, Orchard.Web and Orchard.Azure.Web to new storage client (version 2.0). Removed duplication between Orchard.Azure and Orchard.AzureBlobStorage (the latter is now just a thin wrapper over the former). Added proper transformations for log4net.config and HostComponents.config in both Orchard.Azure.Web and Orchard.Web (recreating what was previously done by custom MSBuild logic in the project files).
This commit is contained in:

committed by
Sebastien Ros

parent
f3169400bc
commit
d4154fa1fe
@@ -1,422 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
using System.Xml.XPath;
|
|
||||||
using Microsoft.Win32;
|
|
||||||
using Microsoft.WindowsAzure;
|
|
||||||
using Microsoft.WindowsAzure.ServiceRuntime;
|
|
||||||
using Microsoft.WindowsAzure.StorageClient;
|
|
||||||
using Orchard.FileSystems.Media;
|
|
||||||
|
|
||||||
namespace Orchard.Azure {
|
|
||||||
public class AzureFileSystem {
|
|
||||||
public const string FolderEntry = "$$$ORCHARD$$$.$$$";
|
|
||||||
|
|
||||||
public string ContainerName { get; protected set; }
|
|
||||||
|
|
||||||
private readonly CloudStorageAccount _storageAccount;
|
|
||||||
protected readonly string _root;
|
|
||||||
protected readonly string _absoluteRoot;
|
|
||||||
public CloudBlobClient BlobClient { get; private set; }
|
|
||||||
public CloudBlobContainer Container { get; private set; }
|
|
||||||
|
|
||||||
public AzureFileSystem(string containerName, string root, bool isPrivate)
|
|
||||||
: this(containerName, root, isPrivate, CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("DataConnectionString"))) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public AzureFileSystem(string containerName, string root, bool isPrivate, CloudStorageAccount storageAccount) {
|
|
||||||
// Setup the connection to custom storage accountm, e.g. Development Storage
|
|
||||||
_storageAccount = storageAccount;
|
|
||||||
ContainerName = containerName;
|
|
||||||
_root = String.IsNullOrEmpty(root) ? "" : root + "/";
|
|
||||||
_absoluteRoot = Combine(Combine(_storageAccount.BlobEndpoint.AbsoluteUri, containerName), root);
|
|
||||||
|
|
||||||
BlobClient = _storageAccount.CreateCloudBlobClient();
|
|
||||||
// Get and create the container if it does not exist
|
|
||||||
// The container is named with DNS naming restrictions (i.e. all lower case)
|
|
||||||
Container = BlobClient.GetContainerReference(ContainerName);
|
|
||||||
|
|
||||||
Container.CreateIfNotExist();
|
|
||||||
|
|
||||||
Container.SetPermissions(isPrivate
|
|
||||||
? new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Off }
|
|
||||||
: new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Container });
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string ConvertToRelativeUriPath(string path) {
|
|
||||||
var newPath = path.Replace(@"\", "/");
|
|
||||||
|
|
||||||
if (newPath.StartsWith("/") || newPath.StartsWith("http://") || newPath.StartsWith("https://"))
|
|
||||||
throw new ArgumentException("Path must be relative");
|
|
||||||
|
|
||||||
return newPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Combine(string path1, string path2) {
|
|
||||||
if (path1 == null) {
|
|
||||||
throw new ArgumentNullException("path1");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (path2 == null) {
|
|
||||||
throw new ArgumentNullException("path2");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(path2)) {
|
|
||||||
return path1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(path1)) {
|
|
||||||
return path2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (path2.StartsWith("http://") || path2.StartsWith("https://")) {
|
|
||||||
return path2;
|
|
||||||
}
|
|
||||||
|
|
||||||
var ch = path1[path1.Length - 1];
|
|
||||||
|
|
||||||
if (ch != '/') {
|
|
||||||
return (path1.TrimEnd('/') + '/' + path2.TrimStart('/'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (path1 + path2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IStorageFile GetFile(string path) {
|
|
||||||
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
|
||||||
return new AzureBlobFileStorage(Container.GetBlockBlobReference(String.Concat(_root, path)), _absoluteRoot);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool FileExists(string path) {
|
|
||||||
return Container.BlobExists(String.Concat(_root, path));
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool FolderExists(string path) {
|
|
||||||
return Container.DirectoryExists(String.Concat(_root, path));
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<IStorageFile> ListFiles(string path) {
|
|
||||||
|
|
||||||
path = path ?? String.Empty;
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
string prefix = Combine(Combine(Container.Name, _root), path);
|
|
||||||
|
|
||||||
if (!prefix.EndsWith("/"))
|
|
||||||
prefix += "/";
|
|
||||||
|
|
||||||
return BlobClient
|
|
||||||
.ListBlobsWithPrefix(prefix)
|
|
||||||
.OfType<CloudBlockBlob>()
|
|
||||||
.Where(blobItem => !blobItem.Uri.AbsoluteUri.EndsWith(FolderEntry))
|
|
||||||
.Select(blobItem => new AzureBlobFileStorage(blobItem, _absoluteRoot))
|
|
||||||
.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<IStorageFolder> ListFolders(string path) {
|
|
||||||
|
|
||||||
path = path ?? String.Empty;
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
// return root folders
|
|
||||||
if (String.Concat(_root, path) == String.Empty) {
|
|
||||||
return Container.ListBlobs()
|
|
||||||
.OfType<CloudBlobDirectory>()
|
|
||||||
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
|
||||||
try {
|
|
||||||
CreateFolder(path);
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
throw new ArgumentException(string.Format("The folder could not be created at path: {0}. {1}",
|
|
||||||
path, ex));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Container.GetDirectoryReference(String.Concat(_root, path))
|
|
||||||
.ListBlobs()
|
|
||||||
.OfType<CloudBlobDirectory>()
|
|
||||||
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool TryCreateFolder(string path) {
|
|
||||||
try {
|
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
|
||||||
CreateFolder(path);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return false to be consistent with FileSystemProvider's implementation
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CreateFolder(string path) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
Container.EnsureDirectoryDoesNotExist(String.Concat(_root, path));
|
|
||||||
|
|
||||||
// Creating a virtually hidden file to make the directory an existing concept
|
|
||||||
CreateFile(Combine(path, FolderEntry));
|
|
||||||
|
|
||||||
int lastIndex;
|
|
||||||
while ((lastIndex = path.LastIndexOf('/')) > 0) {
|
|
||||||
path = path.Substring(0, lastIndex);
|
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
|
||||||
CreateFile(Combine(path, FolderEntry));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteFolder(string path) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
Container.EnsureDirectoryExists(String.Concat(_root, path));
|
|
||||||
foreach (var blob in Container.GetDirectoryReference(String.Concat(_root, path)).ListBlobs()) {
|
|
||||||
if (blob is CloudBlob)
|
|
||||||
((CloudBlob)blob).Delete();
|
|
||||||
|
|
||||||
if (blob is CloudBlobDirectory)
|
|
||||||
DeleteFolder(blob.Uri.ToString().Substring(Container.Uri.ToString().Length + 1 + _root.Length));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RenameFolder(string path, string newPath) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
newPath = ConvertToRelativeUriPath(newPath);
|
|
||||||
|
|
||||||
if (!path.EndsWith("/"))
|
|
||||||
path += "/";
|
|
||||||
|
|
||||||
if (!newPath.EndsWith("/"))
|
|
||||||
newPath += "/";
|
|
||||||
foreach (var blob in Container.GetDirectoryReference(_root + path).ListBlobs()) {
|
|
||||||
if (blob is CloudBlob) {
|
|
||||||
string filename = Path.GetFileName(blob.Uri.ToString());
|
|
||||||
string source = String.Concat(path, filename);
|
|
||||||
string destination = String.Concat(newPath, filename);
|
|
||||||
RenameFile(source, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (blob is CloudBlobDirectory) {
|
|
||||||
string foldername = blob.Uri.Segments.Last();
|
|
||||||
string source = String.Concat(path, foldername);
|
|
||||||
string destination = String.Concat(newPath, foldername);
|
|
||||||
RenameFolder(source, destination);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteFile(string path) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
Container.EnsureBlobExists(Combine(_root, path));
|
|
||||||
var blob = Container.GetBlockBlobReference(Combine(_root, path));
|
|
||||||
blob.Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RenameFile(string path, string newPath) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
newPath = ConvertToRelativeUriPath(newPath);
|
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
|
||||||
Container.EnsureBlobDoesNotExist(String.Concat(_root, newPath));
|
|
||||||
|
|
||||||
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
|
||||||
var newBlob = Container.GetBlockBlobReference(String.Concat(_root, newPath));
|
|
||||||
newBlob.CopyFromBlob(blob);
|
|
||||||
blob.Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IStorageFile CreateFile(string path) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
if (Container.BlobExists(String.Concat(_root, path))) {
|
|
||||||
throw new ArgumentException("File " + path + " already exists");
|
|
||||||
}
|
|
||||||
|
|
||||||
// create all folder entries in the hierarchy
|
|
||||||
int lastIndex;
|
|
||||||
var localPath = path;
|
|
||||||
while ((lastIndex = localPath.LastIndexOf('/')) > 0) {
|
|
||||||
localPath = localPath.Substring(0, lastIndex);
|
|
||||||
var folder = Container.GetBlockBlobReference(String.Concat(_root, Combine(localPath, FolderEntry)));
|
|
||||||
folder.OpenWrite().Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
|
||||||
var contentType = GetContentType(path);
|
|
||||||
if (!String.IsNullOrWhiteSpace(contentType)) {
|
|
||||||
blob.Properties.ContentType = contentType;
|
|
||||||
}
|
|
||||||
|
|
||||||
blob.UploadByteArray(new byte[0]);
|
|
||||||
return new AzureBlobFileStorage(blob, _absoluteRoot);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetPublicUrl(string path) {
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
|
||||||
return Container.GetBlockBlobReference(String.Concat(_root, path)).Uri.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the mime-type of the specified file path, looking into IIS configuration and the Registry
|
|
||||||
/// </summary>
|
|
||||||
private string GetContentType(string path) {
|
|
||||||
string extension = Path.GetExtension(path);
|
|
||||||
if (String.IsNullOrWhiteSpace(extension)) {
|
|
||||||
return "application/unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
try {
|
|
||||||
string applicationHost = System.Environment.ExpandEnvironmentVariables(@"%windir%\system32\inetsrv\config\applicationHost.config");
|
|
||||||
string webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null).FilePath;
|
|
||||||
|
|
||||||
// search for custom mime types in web.config and applicationhost.config
|
|
||||||
foreach (var configFile in new[] { webConfig, applicationHost }) {
|
|
||||||
if (File.Exists(configFile)) {
|
|
||||||
var xdoc = XDocument.Load(configFile);
|
|
||||||
var mimeMap = xdoc.XPathSelectElements("//staticContent/mimeMap[@fileExtension='" + extension + "']").FirstOrDefault();
|
|
||||||
if (mimeMap != null) {
|
|
||||||
var mimeType = mimeMap.Attribute("mimeType");
|
|
||||||
if (mimeType != null) {
|
|
||||||
return mimeType.Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
// ignore issues with web.config to fall back to registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// search into the registry
|
|
||||||
RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(extension.ToLower());
|
|
||||||
if (regKey != null) {
|
|
||||||
var contentType = regKey.GetValue("Content Type");
|
|
||||||
if (contentType != null) {
|
|
||||||
return contentType.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
// if an exception occured return application/unknown
|
|
||||||
return "application/unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "application/unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
private class AzureBlobFileStorage : IStorageFile {
|
|
||||||
private CloudBlockBlob _blob;
|
|
||||||
private readonly string _rootPath;
|
|
||||||
|
|
||||||
public AzureBlobFileStorage(CloudBlockBlob blob, string rootPath) {
|
|
||||||
_blob = blob;
|
|
||||||
_rootPath = rootPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetPath() {
|
|
||||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetName() {
|
|
||||||
return Path.GetFileName(GetPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetSize() {
|
|
||||||
return _blob.Properties.Length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime GetLastUpdated() {
|
|
||||||
return _blob.Properties.LastModifiedUtc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetFileType() {
|
|
||||||
return Path.GetExtension(GetPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Stream OpenRead() {
|
|
||||||
return _blob.OpenRead();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Stream OpenWrite() {
|
|
||||||
return _blob.OpenWrite();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Stream CreateFile() {
|
|
||||||
// as opposed to the File System implementation, if nothing is done on the stream
|
|
||||||
// the file will be emptied, because Azure doesn't implement FileMode.Truncate
|
|
||||||
_blob.DeleteIfExists();
|
|
||||||
_blob = _blob.Container.GetBlockBlobReference(_blob.Uri.ToString());
|
|
||||||
_blob.OpenWrite().Dispose(); // force file creation
|
|
||||||
|
|
||||||
return OpenWrite();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class AzureBlobFolderStorage : IStorageFolder {
|
|
||||||
private readonly CloudBlobDirectory _blob;
|
|
||||||
private readonly string _rootPath;
|
|
||||||
|
|
||||||
public AzureBlobFolderStorage(CloudBlobDirectory blob, string rootPath) {
|
|
||||||
_blob = blob;
|
|
||||||
_rootPath = rootPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetName() {
|
|
||||||
var path = GetPath();
|
|
||||||
return path.Substring(path.LastIndexOf('/') + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetPath() {
|
|
||||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetSize() {
|
|
||||||
return GetDirectorySize(_blob);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime GetLastUpdated() {
|
|
||||||
return DateTime.MinValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IStorageFolder GetParent() {
|
|
||||||
if (_blob.Parent != null) {
|
|
||||||
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
|
|
||||||
}
|
|
||||||
throw new ArgumentException("Directory " + _blob.Uri + " does not have a parent directory");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long GetDirectorySize(CloudBlobDirectory directoryBlob) {
|
|
||||||
long size = 0;
|
|
||||||
|
|
||||||
foreach (var blobItem in directoryBlob.ListBlobs()) {
|
|
||||||
if (blobItem is CloudBlob)
|
|
||||||
size += ((CloudBlob)blobItem).Properties.Length;
|
|
||||||
|
|
||||||
if (blobItem is CloudBlobDirectory)
|
|
||||||
size += GetDirectorySize((CloudBlobDirectory)blobItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,58 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.WindowsAzure.StorageClient;
|
|
||||||
|
|
||||||
namespace Orchard.Azure {
|
|
||||||
public static class CloudBlobContainerExtensions {
|
|
||||||
|
|
||||||
public static bool BlobExists(this CloudBlobContainer container, string path) {
|
|
||||||
if ( String.IsNullOrEmpty(path) || path.Trim() == String.Empty )
|
|
||||||
throw new ArgumentException("Path can't be empty");
|
|
||||||
|
|
||||||
try {
|
|
||||||
var blob = container.GetBlockBlobReference(path);
|
|
||||||
blob.FetchAttributes();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch ( StorageClientException e ) {
|
|
||||||
if ( e.ErrorCode == StorageErrorCode.ResourceNotFound ) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void EnsureBlobExists(this CloudBlobContainer container, string path) {
|
|
||||||
if ( !BlobExists(container, path) ) {
|
|
||||||
throw new ArgumentException("File " + path + " does not exist");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void EnsureBlobDoesNotExist(this CloudBlobContainer container, string path) {
|
|
||||||
if ( BlobExists(container, path) ) {
|
|
||||||
throw new ArgumentException("File " + path + " already exists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool DirectoryExists(this CloudBlobContainer container, string path) {
|
|
||||||
if ( String.IsNullOrEmpty(path) || path.Trim() == String.Empty )
|
|
||||||
throw new ArgumentException("Path can't be empty");
|
|
||||||
|
|
||||||
return container.GetDirectoryReference(path).ListBlobs().Count() > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void EnsureDirectoryExists(this CloudBlobContainer container, string path) {
|
|
||||||
if ( !DirectoryExists(container, path) ) {
|
|
||||||
throw new ArgumentException("Directory " + path + " does not exist");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void EnsureDirectoryDoesNotExist(this CloudBlobContainer container, string path) {
|
|
||||||
if ( DirectoryExists(container, path) ) {
|
|
||||||
throw new ArgumentException("Directory " + path + " already exists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -5,58 +5,62 @@ using System.Linq;
|
|||||||
using Microsoft.WindowsAzure;
|
using Microsoft.WindowsAzure;
|
||||||
using Microsoft.WindowsAzure.ServiceRuntime;
|
using Microsoft.WindowsAzure.ServiceRuntime;
|
||||||
using Orchard.Environment.Configuration;
|
using Orchard.Environment.Configuration;
|
||||||
|
using Orchard.Azure.FileSystems;
|
||||||
|
using Microsoft.WindowsAzure.Storage;
|
||||||
|
using Orchard.FileSystems.Media;
|
||||||
|
|
||||||
namespace Orchard.Azure.Environment.Configuration {
|
namespace Orchard.Azure.Environment.Configuration {
|
||||||
|
|
||||||
public class AzureShellSettingsManager : IShellSettingsManager {
|
public class AzureShellSettingsManager : IShellSettingsManager {
|
||||||
public const string ContainerName = "sites"; // container names must be lower cased
|
public const string ContainerName = "sites"; // container names must be lower cased
|
||||||
public const string SettingsFilename = "Settings.txt";
|
public const string SettingsFilename = "Settings.txt";
|
||||||
public const char Separator = ':';
|
public const char Separator = ':';
|
||||||
public const string EmptyValue = "null";
|
public const string EmptyValue = "null";
|
||||||
|
|
||||||
private readonly IShellSettingsManagerEventHandler _events;
|
private readonly IShellSettingsManagerEventHandler _events;
|
||||||
private readonly AzureFileSystem _fileSystem;
|
private readonly AzureFileSystem _fileSystem;
|
||||||
|
|
||||||
public AzureShellSettingsManager(IShellSettingsManagerEventHandler events)
|
public AzureShellSettingsManager(IShellSettingsManagerEventHandler events, IMimeTypeProvider mimeTypeProvider)
|
||||||
: this(CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("DataConnectionString")), events) {}
|
: this(CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("DataConnectionString")), events, mimeTypeProvider) {}
|
||||||
|
|
||||||
public AzureShellSettingsManager(CloudStorageAccount storageAccount, IShellSettingsManagerEventHandler events) {
|
public AzureShellSettingsManager(CloudStorageAccount storageAccount, IShellSettingsManagerEventHandler events, IMimeTypeProvider mimeTypeProvider)
|
||||||
_events = events;
|
{
|
||||||
_fileSystem = new AzureFileSystem(ContainerName, String.Empty, true, storageAccount);
|
_events = events;
|
||||||
}
|
_fileSystem = new AzureFileSystem(ContainerName, String.Empty, true, mimeTypeProvider);
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerable<ShellSettings> IShellSettingsManager.LoadSettings() {
|
IEnumerable<ShellSettings> IShellSettingsManager.LoadSettings() {
|
||||||
var settings = LoadSettings().ToArray();
|
var settings = LoadSettings().ToArray();
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IShellSettingsManager.SaveSettings(ShellSettings settings) {
|
void IShellSettingsManager.SaveSettings(ShellSettings settings) {
|
||||||
var content = ShellSettingsSerializer.ComposeSettings(settings);
|
var content = ShellSettingsSerializer.ComposeSettings(settings);
|
||||||
var filePath = _fileSystem.Combine(settings.Name, SettingsFilename);
|
var filePath = _fileSystem.Combine(settings.Name, SettingsFilename);
|
||||||
|
|
||||||
var file = _fileSystem.FileExists(filePath)
|
var file = _fileSystem.FileExists(filePath)
|
||||||
? _fileSystem.GetFile(filePath)
|
? _fileSystem.GetFile(filePath)
|
||||||
: _fileSystem.CreateFile(filePath);
|
: _fileSystem.CreateFile(filePath);
|
||||||
|
|
||||||
using (var stream = file.OpenWrite()) {
|
using (var stream = file.OpenWrite()) {
|
||||||
using (var writer = new StreamWriter(stream)) {
|
using (var writer = new StreamWriter(stream)) {
|
||||||
writer.Write(content);
|
writer.Write(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_events.Saved(settings);
|
_events.Saved(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<ShellSettings> LoadSettings() {
|
IEnumerable<ShellSettings> LoadSettings() {
|
||||||
foreach (var folder in _fileSystem.ListFolders(null))
|
foreach (var folder in _fileSystem.ListFolders(null))
|
||||||
foreach (var file in _fileSystem.ListFiles(folder.GetPath())) {
|
foreach (var file in _fileSystem.ListFiles(folder.GetPath())) {
|
||||||
if (!String.Equals(file.GetName(), SettingsFilename))
|
if (!String.Equals(file.GetName(), SettingsFilename))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
using (var stream = file.OpenRead())
|
using (var stream = file.OpenRead())
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
yield return ShellSettingsSerializer.ParseSettings(reader.ReadToEnd());
|
yield return ShellSettingsSerializer.ParseSettings(reader.ReadToEnd());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,391 +1,391 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.WindowsAzure;
|
using Microsoft.WindowsAzure;
|
||||||
using Microsoft.WindowsAzure.Storage;
|
using Microsoft.WindowsAzure.Storage;
|
||||||
using Microsoft.WindowsAzure.Storage.Blob;
|
using Microsoft.WindowsAzure.Storage.Blob;
|
||||||
using Orchard.FileSystems.Media;
|
using Orchard.FileSystems.Media;
|
||||||
|
|
||||||
namespace Orchard.AzureBlobStorage.Services {
|
namespace Orchard.Azure.FileSystems {
|
||||||
public class AzureFileSystem {
|
public class AzureFileSystem {
|
||||||
public const string FolderEntry = "$$$ORCHARD$$$.$$$";
|
public const string FolderEntry = "$$$ORCHARD$$$.$$$";
|
||||||
|
|
||||||
private readonly bool _isPrivate;
|
private readonly bool _isPrivate;
|
||||||
private readonly IMimeTypeProvider _mimeTypeProvider;
|
private readonly IMimeTypeProvider _mimeTypeProvider;
|
||||||
|
|
||||||
protected string _root;
|
protected string _root;
|
||||||
protected string _absoluteRoot;
|
protected string _absoluteRoot;
|
||||||
|
|
||||||
private CloudStorageAccount _storageAccount;
|
private CloudStorageAccount _storageAccount;
|
||||||
private CloudBlobClient _blobClient;
|
private CloudBlobClient _blobClient;
|
||||||
private CloudBlobContainer _container;
|
private CloudBlobContainer _container;
|
||||||
|
|
||||||
public string ContainerName { get; protected set; }
|
public string ContainerName { get; protected set; }
|
||||||
|
|
||||||
public CloudBlobClient BlobClient {
|
public CloudBlobClient BlobClient {
|
||||||
get {
|
get {
|
||||||
EnsureInitialized();
|
EnsureInitialized();
|
||||||
return _blobClient;
|
return _blobClient;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CloudBlobContainer Container {
|
public CloudBlobContainer Container {
|
||||||
get {
|
get {
|
||||||
EnsureInitialized();
|
EnsureInitialized();
|
||||||
return _container;
|
return _container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AzureFileSystem(string containerName, string root, bool isPrivate, IMimeTypeProvider mimeTypeProvider) {
|
public AzureFileSystem(string containerName, string root, bool isPrivate, IMimeTypeProvider mimeTypeProvider) {
|
||||||
_isPrivate = isPrivate;
|
_isPrivate = isPrivate;
|
||||||
_mimeTypeProvider = mimeTypeProvider;
|
_mimeTypeProvider = mimeTypeProvider;
|
||||||
ContainerName = containerName;
|
ContainerName = containerName;
|
||||||
_root = String.IsNullOrEmpty(root) ? "" : root + "/";
|
_root = String.IsNullOrEmpty(root) ? "" : root + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureInitialized() {
|
private void EnsureInitialized() {
|
||||||
if (_storageAccount != null) {
|
if (_storageAccount != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
|
_storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
|
||||||
_absoluteRoot = Combine(Combine(_storageAccount.BlobEndpoint.AbsoluteUri, ContainerName), _root);
|
_absoluteRoot = Combine(Combine(_storageAccount.BlobEndpoint.AbsoluteUri, ContainerName), _root);
|
||||||
|
|
||||||
_blobClient = _storageAccount.CreateCloudBlobClient();
|
_blobClient = _storageAccount.CreateCloudBlobClient();
|
||||||
// Get and create the container if it does not exist
|
// Get and create the container if it does not exist
|
||||||
// The container is named with DNS naming restrictions (i.e. all lower case)
|
// The container is named with DNS naming restrictions (i.e. all lower case)
|
||||||
_container = _blobClient.GetContainerReference(ContainerName);
|
_container = _blobClient.GetContainerReference(ContainerName);
|
||||||
|
|
||||||
_container.CreateIfNotExists();
|
_container.CreateIfNotExists();
|
||||||
|
|
||||||
_container.SetPermissions(_isPrivate
|
_container.SetPermissions(_isPrivate
|
||||||
? new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Off }
|
? new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Off }
|
||||||
: new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Container });
|
: new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Container });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string ConvertToRelativeUriPath(string path) {
|
private static string ConvertToRelativeUriPath(string path) {
|
||||||
var newPath = path.Replace(@"\", "/");
|
var newPath = path.Replace(@"\", "/");
|
||||||
|
|
||||||
if (newPath.StartsWith("/") || newPath.StartsWith("http://") || newPath.StartsWith("https://"))
|
if (newPath.StartsWith("/") || newPath.StartsWith("http://") || newPath.StartsWith("https://"))
|
||||||
throw new ArgumentException("Path must be relative");
|
throw new ArgumentException("Path must be relative");
|
||||||
|
|
||||||
return newPath;
|
return newPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Combine(string path1, string path2) {
|
public string Combine(string path1, string path2) {
|
||||||
if (path1 == null) {
|
if (path1 == null) {
|
||||||
throw new ArgumentNullException("path1");
|
throw new ArgumentNullException("path1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path2 == null) {
|
if (path2 == null) {
|
||||||
throw new ArgumentNullException("path2");
|
throw new ArgumentNullException("path2");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(path2)) {
|
if (String.IsNullOrEmpty(path2)) {
|
||||||
return path1;
|
return path1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(path1)) {
|
if (String.IsNullOrEmpty(path1)) {
|
||||||
return path2;
|
return path2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path2.StartsWith("http://") || path2.StartsWith("https://")) {
|
if (path2.StartsWith("http://") || path2.StartsWith("https://")) {
|
||||||
return path2;
|
return path2;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ch = path1[path1.Length - 1];
|
var ch = path1[path1.Length - 1];
|
||||||
|
|
||||||
if (ch != '/') {
|
if (ch != '/') {
|
||||||
return (path1.TrimEnd('/') + '/' + path2.TrimStart('/'));
|
return (path1.TrimEnd('/') + '/' + path2.TrimStart('/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (path1 + path2);
|
return (path1 + path2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IStorageFile GetFile(string path) {
|
public IStorageFile GetFile(string path) {
|
||||||
|
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
Container.EnsureBlobExists(String.Concat(_root, path));
|
||||||
return new AzureBlobFileStorage(Container.GetBlockBlobReference(String.Concat(_root, path)), _absoluteRoot);
|
return new AzureBlobFileStorage(Container.GetBlockBlobReference(String.Concat(_root, path)), _absoluteRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool FileExists(string path) {
|
public bool FileExists(string path) {
|
||||||
return Container.BlobExists(String.Concat(_root, path));
|
return Container.BlobExists(String.Concat(_root, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool FolderExists(string path) {
|
public bool FolderExists(string path) {
|
||||||
return Container.DirectoryExists(String.Concat(_root, path));
|
return Container.DirectoryExists(String.Concat(_root, path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IStorageFile> ListFiles(string path) {
|
public IEnumerable<IStorageFile> ListFiles(string path) {
|
||||||
|
|
||||||
path = path ?? String.Empty;
|
path = path ?? String.Empty;
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
string prefix = Combine(Combine(Container.Name, _root), path);
|
string prefix = Combine(Combine(Container.Name, _root), path);
|
||||||
|
|
||||||
if (!prefix.EndsWith("/"))
|
if (!prefix.EndsWith("/"))
|
||||||
prefix += "/";
|
prefix += "/";
|
||||||
|
|
||||||
return BlobClient.ListBlobs(prefix, true)
|
return BlobClient.ListBlobs(prefix, true)
|
||||||
.OfType<CloudBlockBlob>()
|
.OfType<CloudBlockBlob>()
|
||||||
.Where(blobItem => !blobItem.Uri.AbsoluteUri.EndsWith(FolderEntry))
|
.Where(blobItem => !blobItem.Uri.AbsoluteUri.EndsWith(FolderEntry))
|
||||||
.Select(blobItem => new AzureBlobFileStorage(blobItem, _absoluteRoot))
|
.Select(blobItem => new AzureBlobFileStorage(blobItem, _absoluteRoot))
|
||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IStorageFolder> ListFolders(string path) {
|
public IEnumerable<IStorageFolder> ListFolders(string path) {
|
||||||
|
|
||||||
path = path ?? String.Empty;
|
path = path ?? String.Empty;
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
// return root folders
|
// return root folders
|
||||||
if (String.Concat(_root, path) == String.Empty) {
|
if (String.Concat(_root, path) == String.Empty) {
|
||||||
return Container.ListBlobs()
|
return Container.ListBlobs()
|
||||||
.OfType<CloudBlobDirectory>()
|
.OfType<CloudBlobDirectory>()
|
||||||
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
||||||
try {
|
try {
|
||||||
CreateFolder(path);
|
CreateFolder(path);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
throw new ArgumentException(string.Format("The folder could not be created at path: {0}. {1}",
|
throw new ArgumentException(string.Format("The folder could not be created at path: {0}. {1}",
|
||||||
path, ex));
|
path, ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container.GetDirectoryReference(String.Concat(_root, path))
|
return Container.GetDirectoryReference(String.Concat(_root, path))
|
||||||
.ListBlobs()
|
.ListBlobs()
|
||||||
.OfType<CloudBlobDirectory>()
|
.OfType<CloudBlobDirectory>()
|
||||||
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
.Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, _absoluteRoot))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryCreateFolder(string path) {
|
public bool TryCreateFolder(string path) {
|
||||||
try {
|
try {
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
||||||
CreateFolder(path);
|
CreateFolder(path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return false to be consistent with FileSystemProvider's implementation
|
// return false to be consistent with FileSystemProvider's implementation
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateFolder(string path) {
|
public void CreateFolder(string path) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
Container.EnsureDirectoryDoesNotExist(String.Concat(_root, path));
|
Container.EnsureDirectoryDoesNotExist(String.Concat(_root, path));
|
||||||
|
|
||||||
// Creating a virtually hidden file to make the directory an existing concept
|
// Creating a virtually hidden file to make the directory an existing concept
|
||||||
CreateFile(Combine(path, FolderEntry));
|
CreateFile(Combine(path, FolderEntry));
|
||||||
|
|
||||||
int lastIndex;
|
int lastIndex;
|
||||||
while ((lastIndex = path.LastIndexOf('/')) > 0) {
|
while ((lastIndex = path.LastIndexOf('/')) > 0) {
|
||||||
path = path.Substring(0, lastIndex);
|
path = path.Substring(0, lastIndex);
|
||||||
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
if (!Container.DirectoryExists(String.Concat(_root, path))) {
|
||||||
CreateFile(Combine(path, FolderEntry));
|
CreateFile(Combine(path, FolderEntry));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteFolder(string path) {
|
public void DeleteFolder(string path) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
Container.EnsureDirectoryExists(String.Concat(_root, path));
|
Container.EnsureDirectoryExists(String.Concat(_root, path));
|
||||||
foreach (var blob in Container.GetDirectoryReference(String.Concat(_root, path)).ListBlobs()) {
|
foreach (var blob in Container.GetDirectoryReference(String.Concat(_root, path)).ListBlobs()) {
|
||||||
if (blob is CloudBlockBlob)
|
if (blob is CloudBlockBlob)
|
||||||
((CloudBlockBlob)blob).Delete();
|
((CloudBlockBlob)blob).Delete();
|
||||||
|
|
||||||
if (blob is CloudBlobDirectory)
|
if (blob is CloudBlobDirectory)
|
||||||
DeleteFolder(blob.Uri.ToString().Substring(Container.Uri.ToString().Length + 1 + _root.Length));
|
DeleteFolder(blob.Uri.ToString().Substring(Container.Uri.ToString().Length + 1 + _root.Length));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameFolder(string path, string newPath) {
|
public void RenameFolder(string path, string newPath) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
newPath = ConvertToRelativeUriPath(newPath);
|
newPath = ConvertToRelativeUriPath(newPath);
|
||||||
|
|
||||||
if (!path.EndsWith("/"))
|
if (!path.EndsWith("/"))
|
||||||
path += "/";
|
path += "/";
|
||||||
|
|
||||||
if (!newPath.EndsWith("/"))
|
if (!newPath.EndsWith("/"))
|
||||||
newPath += "/";
|
newPath += "/";
|
||||||
foreach (var blob in Container.GetDirectoryReference(_root + path).ListBlobs()) {
|
foreach (var blob in Container.GetDirectoryReference(_root + path).ListBlobs()) {
|
||||||
if (blob is CloudBlockBlob) {
|
if (blob is CloudBlockBlob) {
|
||||||
string filename = Path.GetFileName(blob.Uri.ToString());
|
string filename = Path.GetFileName(blob.Uri.ToString());
|
||||||
string source = String.Concat(path, filename);
|
string source = String.Concat(path, filename);
|
||||||
string destination = String.Concat(newPath, filename);
|
string destination = String.Concat(newPath, filename);
|
||||||
RenameFile(source, destination);
|
RenameFile(source, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blob is CloudBlobDirectory) {
|
if (blob is CloudBlobDirectory) {
|
||||||
string foldername = blob.Uri.Segments.Last();
|
string foldername = blob.Uri.Segments.Last();
|
||||||
string source = String.Concat(path, foldername);
|
string source = String.Concat(path, foldername);
|
||||||
string destination = String.Concat(newPath, foldername);
|
string destination = String.Concat(newPath, foldername);
|
||||||
RenameFolder(source, destination);
|
RenameFolder(source, destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteFile(string path) {
|
public void DeleteFile(string path) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
Container.EnsureBlobExists(Combine(_root, path));
|
Container.EnsureBlobExists(Combine(_root, path));
|
||||||
var blob = Container.GetBlockBlobReference(Combine(_root, path));
|
var blob = Container.GetBlockBlobReference(Combine(_root, path));
|
||||||
blob.DeleteIfExists();
|
blob.DeleteIfExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameFile(string path, string newPath) {
|
public void RenameFile(string path, string newPath) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
newPath = ConvertToRelativeUriPath(newPath);
|
newPath = ConvertToRelativeUriPath(newPath);
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
Container.EnsureBlobExists(String.Concat(_root, path));
|
||||||
Container.EnsureBlobDoesNotExist(String.Concat(_root, newPath));
|
Container.EnsureBlobDoesNotExist(String.Concat(_root, newPath));
|
||||||
|
|
||||||
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
||||||
var newBlob = Container.GetBlockBlobReference(String.Concat(_root, newPath));
|
var newBlob = Container.GetBlockBlobReference(String.Concat(_root, newPath));
|
||||||
newBlob.StartCopyFromBlob(blob);
|
newBlob.StartCopyFromBlob(blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IStorageFile CreateFile(string path) {
|
public IStorageFile CreateFile(string path) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
if (Container.BlobExists(String.Concat(_root, path))) {
|
if (Container.BlobExists(String.Concat(_root, path))) {
|
||||||
throw new ArgumentException("File " + path + " already exists");
|
throw new ArgumentException("File " + path + " already exists");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create all folder entries in the hierarchy
|
// create all folder entries in the hierarchy
|
||||||
int lastIndex;
|
int lastIndex;
|
||||||
var localPath = path;
|
var localPath = path;
|
||||||
while ((lastIndex = localPath.LastIndexOf('/')) > 0) {
|
while ((lastIndex = localPath.LastIndexOf('/')) > 0) {
|
||||||
localPath = localPath.Substring(0, lastIndex);
|
localPath = localPath.Substring(0, lastIndex);
|
||||||
var folder = Container.GetBlockBlobReference(String.Concat(_root, Combine(localPath, FolderEntry)));
|
var folder = Container.GetBlockBlobReference(String.Concat(_root, Combine(localPath, FolderEntry)));
|
||||||
folder.OpenWrite().Dispose();
|
folder.OpenWrite().Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
var blob = Container.GetBlockBlobReference(String.Concat(_root, path));
|
||||||
var contentType = _mimeTypeProvider.GetMimeType(path);
|
var contentType = _mimeTypeProvider.GetMimeType(path);
|
||||||
if (!String.IsNullOrWhiteSpace(contentType)) {
|
if (!String.IsNullOrWhiteSpace(contentType)) {
|
||||||
blob.Properties.ContentType = contentType;
|
blob.Properties.ContentType = contentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
blob.UploadFromStream(new MemoryStream(new byte[0]));
|
blob.UploadFromStream(new MemoryStream(new byte[0]));
|
||||||
return new AzureBlobFileStorage(blob, _absoluteRoot);
|
return new AzureBlobFileStorage(blob, _absoluteRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPublicUrl(string path) {
|
public string GetPublicUrl(string path) {
|
||||||
path = ConvertToRelativeUriPath(path);
|
path = ConvertToRelativeUriPath(path);
|
||||||
|
|
||||||
Container.EnsureBlobExists(String.Concat(_root, path));
|
Container.EnsureBlobExists(String.Concat(_root, path));
|
||||||
return Container.GetBlockBlobReference(String.Concat(_root, path)).Uri.ToString();
|
return Container.GetBlockBlobReference(String.Concat(_root, path)).Uri.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class AzureBlobFileStorage : IStorageFile {
|
private class AzureBlobFileStorage : IStorageFile {
|
||||||
private CloudBlockBlob _blob;
|
private CloudBlockBlob _blob;
|
||||||
private readonly string _rootPath;
|
private readonly string _rootPath;
|
||||||
|
|
||||||
public AzureBlobFileStorage(CloudBlockBlob blob, string rootPath) {
|
public AzureBlobFileStorage(CloudBlockBlob blob, string rootPath) {
|
||||||
_blob = blob;
|
_blob = blob;
|
||||||
_rootPath = rootPath;
|
_rootPath = rootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPath() {
|
public string GetPath() {
|
||||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetName() {
|
public string GetName() {
|
||||||
return Path.GetFileName(GetPath());
|
return Path.GetFileName(GetPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetSize() {
|
public long GetSize() {
|
||||||
return _blob.Properties.Length;
|
return _blob.Properties.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime GetLastUpdated() {
|
public DateTime GetLastUpdated() {
|
||||||
return _blob.Properties.LastModified.GetValueOrDefault().DateTime;
|
return _blob.Properties.LastModified.GetValueOrDefault().DateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetFileType() {
|
public string GetFileType() {
|
||||||
return Path.GetExtension(GetPath());
|
return Path.GetExtension(GetPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream OpenRead() {
|
public Stream OpenRead() {
|
||||||
return _blob.OpenRead();
|
return _blob.OpenRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream OpenWrite() {
|
public Stream OpenWrite() {
|
||||||
return _blob.OpenWrite();
|
return _blob.OpenWrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream CreateFile() {
|
public Stream CreateFile() {
|
||||||
// as opposed to the File System implementation, if nothing is done on the stream
|
// as opposed to the File System implementation, if nothing is done on the stream
|
||||||
// the file will be emptied, because Azure doesn't implement FileMode.Truncate
|
// the file will be emptied, because Azure doesn't implement FileMode.Truncate
|
||||||
_blob.DeleteIfExists();
|
_blob.DeleteIfExists();
|
||||||
_blob = _blob.Container.GetBlockBlobReference(_blob.Uri.ToString());
|
_blob = _blob.Container.GetBlockBlobReference(_blob.Uri.ToString());
|
||||||
_blob.UploadFromStream(new MemoryStream(new byte[0]));
|
_blob.UploadFromStream(new MemoryStream(new byte[0]));
|
||||||
|
|
||||||
return OpenWrite();
|
return OpenWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class AzureBlobFolderStorage : IStorageFolder {
|
private class AzureBlobFolderStorage : IStorageFolder {
|
||||||
private readonly CloudBlobDirectory _blob;
|
private readonly CloudBlobDirectory _blob;
|
||||||
private readonly string _rootPath;
|
private readonly string _rootPath;
|
||||||
|
|
||||||
public AzureBlobFolderStorage(CloudBlobDirectory blob, string rootPath) {
|
public AzureBlobFolderStorage(CloudBlobDirectory blob, string rootPath) {
|
||||||
_blob = blob;
|
_blob = blob;
|
||||||
_rootPath = rootPath;
|
_rootPath = rootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetName() {
|
public string GetName() {
|
||||||
var path = GetPath();
|
var path = GetPath();
|
||||||
return path.Substring(path.LastIndexOf('/') + 1);
|
return path.Substring(path.LastIndexOf('/') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPath() {
|
public string GetPath() {
|
||||||
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetSize() {
|
public long GetSize() {
|
||||||
return GetDirectorySize(_blob);
|
return GetDirectorySize(_blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime GetLastUpdated() {
|
public DateTime GetLastUpdated() {
|
||||||
return DateTime.MinValue;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IStorageFolder GetParent() {
|
public IStorageFolder GetParent() {
|
||||||
if (_blob.Parent != null) {
|
if (_blob.Parent != null) {
|
||||||
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
|
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
|
||||||
}
|
}
|
||||||
throw new ArgumentException("Directory " + _blob.Uri + " does not have a parent directory");
|
throw new ArgumentException("Directory " + _blob.Uri + " does not have a parent directory");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static long GetDirectorySize(CloudBlobDirectory directoryBlob) {
|
private static long GetDirectorySize(CloudBlobDirectory directoryBlob) {
|
||||||
long size = 0;
|
long size = 0;
|
||||||
|
|
||||||
foreach (var blobItem in directoryBlob.ListBlobs()) {
|
foreach (var blobItem in directoryBlob.ListBlobs()) {
|
||||||
if (blobItem is CloudBlockBlob)
|
if (blobItem is CloudBlockBlob)
|
||||||
size += ((CloudBlockBlob)blobItem).Properties.Length;
|
size += ((CloudBlockBlob)blobItem).Properties.Length;
|
||||||
|
|
||||||
if (blobItem is CloudBlobDirectory)
|
if (blobItem is CloudBlobDirectory)
|
||||||
size += GetDirectorySize((CloudBlobDirectory)blobItem);
|
size += GetDirectorySize((CloudBlobDirectory)blobItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,54 +1,54 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.WindowsAzure.Storage;
|
using Microsoft.WindowsAzure.Storage;
|
||||||
using Microsoft.WindowsAzure.Storage.Blob;
|
using Microsoft.WindowsAzure.Storage.Blob;
|
||||||
|
|
||||||
namespace Orchard.AzureBlobStorage.Services {
|
namespace Orchard.Azure.FileSystems {
|
||||||
public static class CloudBlobContainerExtensions {
|
public static class CloudBlobContainerExtensions {
|
||||||
|
|
||||||
public static bool BlobExists(this CloudBlobContainer container, string path) {
|
public static bool BlobExists(this CloudBlobContainer container, string path) {
|
||||||
if (String.IsNullOrEmpty(path) || path.Trim() == String.Empty)
|
if (String.IsNullOrEmpty(path) || path.Trim() == String.Empty)
|
||||||
throw new ArgumentException("Path can't be empty");
|
throw new ArgumentException("Path can't be empty");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var blob = container.GetBlockBlobReference(path);
|
var blob = container.GetBlockBlobReference(path);
|
||||||
blob.FetchAttributes();
|
blob.FetchAttributes();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (StorageException) {
|
catch (StorageException) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void EnsureBlobExists(this CloudBlobContainer container, string path) {
|
public static void EnsureBlobExists(this CloudBlobContainer container, string path) {
|
||||||
if (!BlobExists(container, path)) {
|
if (!BlobExists(container, path)) {
|
||||||
throw new ArgumentException("File " + path + " does not exist");
|
throw new ArgumentException("File " + path + " does not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void EnsureBlobDoesNotExist(this CloudBlobContainer container, string path) {
|
public static void EnsureBlobDoesNotExist(this CloudBlobContainer container, string path) {
|
||||||
if (BlobExists(container, path)) {
|
if (BlobExists(container, path)) {
|
||||||
throw new ArgumentException("File " + path + " already exists");
|
throw new ArgumentException("File " + path + " already exists");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool DirectoryExists(this CloudBlobContainer container, string path) {
|
public static bool DirectoryExists(this CloudBlobContainer container, string path) {
|
||||||
if (String.IsNullOrEmpty(path) || path.Trim() == String.Empty)
|
if (String.IsNullOrEmpty(path) || path.Trim() == String.Empty)
|
||||||
throw new ArgumentException("Path can't be empty");
|
throw new ArgumentException("Path can't be empty");
|
||||||
|
|
||||||
return container.GetDirectoryReference(path).ListBlobs().Any();
|
return container.GetDirectoryReference(path).ListBlobs().Any();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void EnsureDirectoryExists(this CloudBlobContainer container, string path) {
|
public static void EnsureDirectoryExists(this CloudBlobContainer container, string path) {
|
||||||
if (!DirectoryExists(container, path)) {
|
if (!DirectoryExists(container, path)) {
|
||||||
throw new ArgumentException("Directory " + path + " does not exist");
|
throw new ArgumentException("Directory " + path + " does not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void EnsureDirectoryDoesNotExist(this CloudBlobContainer container, string path) {
|
public static void EnsureDirectoryDoesNotExist(this CloudBlobContainer container, string path) {
|
||||||
if (DirectoryExists(container, path)) {
|
if (DirectoryExists(container, path)) {
|
||||||
throw new ArgumentException("Directory " + path + " already exists");
|
throw new ArgumentException("Directory " + path + " already exists");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,16 +1,13 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.WindowsAzure;
|
|
||||||
using Orchard.Environment.Configuration;
|
using Orchard.Environment.Configuration;
|
||||||
|
using Orchard.Environment.Extensions;
|
||||||
using Orchard.FileSystems.Media;
|
using Orchard.FileSystems.Media;
|
||||||
|
|
||||||
namespace Orchard.Azure.FileSystems.Media {
|
namespace Orchard.Azure.FileSystems.Media {
|
||||||
|
|
||||||
public class AzureBlobStorageProvider : AzureFileSystem, IStorageProvider {
|
public class AzureBlobStorageProvider : AzureFileSystem, IStorageProvider {
|
||||||
|
|
||||||
public AzureBlobStorageProvider(ShellSettings shellSettings)
|
public AzureBlobStorageProvider(ShellSettings shellSettings, IMimeTypeProvider mimeTypeProvider) : base("media", shellSettings.Name, false, mimeTypeProvider) { }
|
||||||
: this(shellSettings, CloudStorageAccount.FromConfigurationSetting("DataConnectionString")) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public AzureBlobStorageProvider(ShellSettings shellSettings, CloudStorageAccount storageAccount) : base("media", shellSettings.Name, false, storageAccount) { }
|
|
||||||
|
|
||||||
public bool TrySaveStream(string path, Stream inputStream) {
|
public bool TrySaveStream(string path, Stream inputStream) {
|
||||||
try {
|
try {
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</log4net>
|
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</log4net>
|
@@ -1,27 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<log4net>
|
<log4net>
|
||||||
<root>
|
|
||||||
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
|
<root>
|
||||||
<priority value="WARN" />
|
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF. -->
|
||||||
<appender-ref ref="AzureAppender" />
|
<priority value="WARN" />
|
||||||
</root>
|
<appender-ref ref="AzureAppender" />
|
||||||
|
</root>
|
||||||
|
|
||||||
<!--
|
<appender name="AzureAppender" type="Orchard.Azure.Logging.AzureAppender, Orchard.Azure">
|
||||||
<logger name="Orchard.Localization">
|
<filter type="log4net.Filter.LevelRangeFilter">
|
||||||
<priority value="WARN" />
|
<!-- Only error and fatal messages end up in this target, even if child loggers accept lower priority. -->
|
||||||
<appender-ref ref="RollingLogFileAppender" />
|
<levelMin value="ERROR" />
|
||||||
</logger>
|
</filter>
|
||||||
-->
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
||||||
<appender name="AzureAppender" type="Orchard.Azure.Logging.AzureAppender, Orchard.Azure">
|
</layout>
|
||||||
|
</appender>
|
||||||
<filter type="log4net.Filter.LevelRangeFilter">
|
|
||||||
<!-- only error and fatal messages end up in this target, even if child loggers accept lower priority -->
|
|
||||||
<levelMin value="ERROR" />
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
|
||||||
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
|
||||||
</layout>
|
|
||||||
</appender>
|
|
||||||
</log4net>
|
</log4net>
|
||||||
|
@@ -3,8 +3,8 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Microsoft.WindowsAzure;
|
|
||||||
using Microsoft.WindowsAzure.ServiceRuntime;
|
using Microsoft.WindowsAzure.ServiceRuntime;
|
||||||
|
using Microsoft.WindowsAzure.Storage;
|
||||||
using Orchard.Environment;
|
using Orchard.Environment;
|
||||||
|
|
||||||
namespace Orchard.Azure.Web {
|
namespace Orchard.Azure.Web {
|
||||||
@@ -19,10 +19,6 @@ namespace Orchard.Azure.Web {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void Application_Start() {
|
protected void Application_Start() {
|
||||||
CloudStorageAccount.SetConfigurationSettingPublisher(
|
|
||||||
(configName, configSetter) =>
|
|
||||||
configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))
|
|
||||||
);
|
|
||||||
|
|
||||||
// For information on handling configuration changes
|
// For information on handling configuration changes
|
||||||
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
|
||||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
<!--
|
|
||||||
In the example below, the "SetAttributes" transform will change the value of
|
|
||||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
|
||||||
finds an attribute "name" that has a value of "MyDB".
|
|
||||||
|
|
||||||
<connectionStrings>
|
|
||||||
<add name="MyDB"
|
|
||||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
|
||||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
|
||||||
</connectionStrings>
|
|
||||||
-->
|
|
||||||
<system.web>
|
|
||||||
<!--
|
|
||||||
In the example below, the "Replace" transform will replace the entire
|
|
||||||
<customErrors> section of your web.config file.
|
|
||||||
Note that because there is only one customErrors section under the
|
|
||||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
|
||||||
|
|
||||||
<customErrors defaultRedirect="GenericError.htm"
|
|
||||||
mode="RemoteOnly" xdt:Transform="Replace">
|
|
||||||
<error statusCode="500" redirect="InternalError.htm"/>
|
|
||||||
</customErrors>
|
|
||||||
-->
|
|
||||||
</system.web>
|
|
||||||
</configuration>
|
</configuration>
|
@@ -1,31 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
|
||||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
<!--
|
<system.web>
|
||||||
In the example below, the "SetAttributes" transform will change the value of
|
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
</system.web>
|
||||||
finds an attribute "name" that has a value of "MyDB".
|
|
||||||
|
|
||||||
<connectionStrings>
|
|
||||||
<add name="MyDB"
|
|
||||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
|
||||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
|
||||||
</connectionStrings>
|
|
||||||
-->
|
|
||||||
<system.web>
|
|
||||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
|
||||||
<!--
|
|
||||||
In the example below, the "Replace" transform will replace the entire
|
|
||||||
<customErrors> section of your web.config file.
|
|
||||||
Note that because there is only one customErrors section under the
|
|
||||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
|
||||||
|
|
||||||
<customErrors defaultRedirect="GenericError.htm"
|
|
||||||
mode="RemoteOnly" xdt:Transform="Replace">
|
|
||||||
<error statusCode="500" redirect="InternalError.htm"/>
|
|
||||||
</customErrors>
|
|
||||||
-->
|
|
||||||
</system.web>
|
|
||||||
</configuration>
|
</configuration>
|
@@ -56,6 +56,7 @@
|
|||||||
<Reference Include="log4net">
|
<Reference Include="log4net">
|
||||||
<HintPath>..\..\lib\log4net\log4net.dll</HintPath>
|
<HintPath>..\..\lib\log4net\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\ref\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
|
<HintPath>C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\ref\Microsoft.WindowsAzure.Diagnostics.dll</HintPath>
|
||||||
@@ -64,9 +65,7 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.configuration" />
|
<Reference Include="System.configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
@@ -83,12 +82,15 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CloudBlobContainerExtensions.cs" />
|
<Compile Include="FileSystems\CloudBlobContainerExtensions.cs" />
|
||||||
<Compile Include="Environment\Configuration\AzureShellSettingsManager.cs" />
|
<Compile Include="Environment\Configuration\AzureShellSettingsManager.cs" />
|
||||||
<Compile Include="FileSystems\Media\AzureBlobStorageProvider.cs" />
|
<Compile Include="FileSystems\Media\AzureBlobStorageProvider.cs">
|
||||||
|
<SubType>
|
||||||
|
</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Logging\AzureAppender.cs" />
|
<Compile Include="Logging\AzureAppender.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="AzureFileSystem.cs" />
|
<Compile Include="FileSystems\AzureFileSystem.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||||
@@ -114,9 +116,6 @@
|
|||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<WCFMetadata Include="Service References\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
@@ -133,6 +133,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Scripting.CSharp",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Taxonomies", "..\Orchard.Web\Modules\Orchard.Taxonomies\Orchard.Taxonomies.csproj", "{E649EA64-D213-461B-87F7-D67035801443}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Taxonomies", "..\Orchard.Web\Modules\Orchard.Taxonomies\Orchard.Taxonomies.csproj", "{E649EA64-D213-461B-87F7-D67035801443}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.AzureBlobStorage", "..\Orchard.Web\Modules\Orchard.AzureBlobStorage\Orchard.AzureBlobStorage.csproj", "{CBC7993C-57D8-4A6C-992C-19E849DFE71D}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules.Deprecated", "Modules.Deprecated", "{B6092A92-1071-4C30-AD55-8E8D46BC2F14}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -391,6 +395,10 @@ Global
|
|||||||
{E649EA64-D213-461B-87F7-D67035801443}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E649EA64-D213-461B-87F7-D67035801443}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E649EA64-D213-461B-87F7-D67035801443}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -400,7 +408,6 @@ Global
|
|||||||
{14C049FD-B35B-415A-A824-87F26B26E7FD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{14C049FD-B35B-415A-A824-87F26B26E7FD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{0E7646E8-FE8F-43C1-8799-D97860925EC4} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{0E7646E8-FE8F-43C1-8799-D97860925EC4} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{EA2B9121-EF54-40A6-A53E-6593C86EE696} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
|
||||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{72457126-E118-4171-A08F-9A709EE4B7FC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{72457126-E118-4171-A08F-9A709EE4B7FC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{D10AD48F-407D-4DB5-A328-173EC7CB010F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{D10AD48F-407D-4DB5-A328-173EC7CB010F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
@@ -419,19 +426,16 @@ Global
|
|||||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
|
||||||
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{3420C92A-747F-4990-BA08-F2C9531E44AD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{3420C92A-747F-4990-BA08-F2C9531E44AD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{C889167C-E52C-4A65-A419-224B3D1B957D} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{C889167C-E52C-4A65-A419-224B3D1B957D} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{99002B65-86F7-415E-BF4A-381AA8AB9CCC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{99002B65-86F7-415E-BF4A-381AA8AB9CCC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{2AD6973D-C7BB-416E-89FE-EEE34664E05F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{2AD6973D-C7BB-416E-89FE-EEE34664E05F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{4A4595EF-6C37-4F99-96ED-4AE0B9E438D3} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{4A4595EF-6C37-4F99-96ED-4AE0B9E438D3} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{43D0EC0B-1955-4566-8D31-7B9102DA1703} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
|
||||||
{FC1D74E8-7A4D-48F4-83DE-95C6173780C4} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{FC1D74E8-7A4D-48F4-83DE-95C6173780C4} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{3158C928-888C-4A84-8BC1-4A8257489538} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{3158C928-888C-4A84-8BC1-4A8257489538} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{642A49D7-8752-4177-80D6-BFBBCFAD3DE0} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{642A49D7-8752-4177-80D6-BFBBCFAD3DE0} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{6F759635-13D7-4E94-BCC9-80445D63F117} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{6F759635-13D7-4E94-BCC9-80445D63F117} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{966EC390-3C7F-4D98-92A6-F0F30D02E9B1} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
|
||||||
{3F72A4E9-7B72-4260-B010-C16EC54F9BAF} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{3F72A4E9-7B72-4260-B010-C16EC54F9BAF} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{475B6C45-B27C-438B-8966-908B9D6D1077} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{475B6C45-B27C-438B-8966-908B9D6D1077} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{66FCCD76-2761-47E3-8D11-B45D0001DDAA} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{66FCCD76-2761-47E3-8D11-B45D0001DDAA} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
@@ -452,7 +456,12 @@ Global
|
|||||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{5D13EF34-8B39-4EC5-847F-E12892ACF841} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{5D13EF34-8B39-4EC5-847F-E12892ACF841} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{E649EA64-D213-461B-87F7-D67035801443} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{E649EA64-D213-461B-87F7-D67035801443} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{33B1BC8D-E292-4972-A363-22056B207156} = {75E7476C-C05B-4C41-8E38-081D3EB55659}
|
{33B1BC8D-E292-4972-A363-22056B207156} = {75E7476C-C05B-4C41-8E38-081D3EB55659}
|
||||||
{CB70A642-8CEC-4DDE-8C9F-AD08900EC98D} = {84650275-884D-4CBB-9CC0-67553996E211}
|
{CB70A642-8CEC-4DDE-8C9F-AD08900EC98D} = {84650275-884D-4CBB-9CC0-67553996E211}
|
||||||
|
{137906EA-15FE-4AD8-A6A0-27528F0477D6} = {B6092A92-1071-4C30-AD55-8E8D46BC2F14}
|
||||||
|
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {B6092A92-1071-4C30-AD55-8E8D46BC2F14}
|
||||||
|
{43D0EC0B-1955-4566-8D31-7B9102DA1703} = {B6092A92-1071-4C30-AD55-8E8D46BC2F14}
|
||||||
|
{966EC390-3C7F-4D98-92A6-F0F30D02E9B1} = {B6092A92-1071-4C30-AD55-8E8D46BC2F14}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
4
src/Orchard.Web/Config/HostComponents.Debug.config
Normal file
4
src/Orchard.Web/Config/HostComponents.Debug.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<HostComponents xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</HostComponents>
|
11
src/Orchard.Web/Config/HostComponents.Release.config
Normal file
11
src/Orchard.Web/Config/HostComponents.Release.config
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<HostComponents xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
<Components>
|
||||||
|
<Component>
|
||||||
|
<Properties>
|
||||||
|
<Property Name="DisableMonitoring" Value="true" xdt:Locator="Match(Name)" xdt:Transform="SetAttributes(Value)" />
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</Components>
|
||||||
|
</HostComponents>
|
@@ -1,85 +1,85 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<HostComponents>
|
<HostComponents>
|
||||||
<Components>
|
<Components>
|
||||||
|
|
||||||
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
|
||||||
<Properties>
|
|
||||||
<!-- Set Value="true" to disable new extensions monitoring -->
|
|
||||||
<Property Name="Disabled" Value="false"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
|
|
||||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
<!-- Set Value="true" to disable new extensions monitoring -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="Disabled" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable source files monitoring -->
|
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
</Properties>
|
||||||
<Property Name="Disabled" Value="false"/>
|
</Component>
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
|
|
||||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
<!-- Set Value="true" to disable source files monitoring -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||||
</Component>
|
<Property Name="Disabled" Value="false"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||||
<Property Name="DisableMonitoring" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
||||||
<Properties>
|
<Properties>
|
||||||
<!-- Set Value="true" to disable parallel cache resolution -->
|
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
||||||
<Property Name="Disabled" Value="false"/>
|
<Property Name="DisableMonitoring" Value="false"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
</Components>
|
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
||||||
|
<Properties>
|
||||||
|
<!-- Set Value="true" to disable parallel cache resolution -->
|
||||||
|
<Property Name="Disabled" Value="false"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
|
||||||
|
</Components>
|
||||||
</HostComponents>
|
</HostComponents>
|
||||||
|
4
src/Orchard.Web/Config/log4net.Debug.config
Normal file
4
src/Orchard.Web/Config/log4net.Debug.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</log4net>
|
21
src/Orchard.Web/Config/log4net.Release.config
Normal file
21
src/Orchard.Web/Config/log4net.Release.config
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
<root>
|
||||||
|
<priority value="ERROR" xdt:Transform="SetAttributes(value)" />
|
||||||
|
<appender-ref ref="debug-file" xdt:Locator="Match(ref)" xdt:Transform="Remove" />
|
||||||
|
</root>
|
||||||
|
<logger name="Orchard" xdt:Locator="Match(name)" xdt:Transform="Remove" />
|
||||||
|
<logger name="Orchard.Localization" xdt:Locator="Match(name)" xdt:Transform="Remove" />
|
||||||
|
<logger>
|
||||||
|
<priority value="ERROR" xdt:Transform="SetAttributes(value)" />
|
||||||
|
</logger>
|
||||||
|
<appender>
|
||||||
|
<immediateFlush value="false" xdt:Transform="SetAttributes(value)" />
|
||||||
|
</appender>
|
||||||
|
<appender name="debugger" xdt:Locator="Match(name)" xdt:Transform="Remove" />
|
||||||
|
<appender name="debug-file" xdt:Locator="Match(name)" xdt:Transform="Remove" />
|
||||||
|
<appender name="error-file" xdt:Locator="Match(name)">
|
||||||
|
<filter xdt:Transform="Remove" />
|
||||||
|
</appender>
|
||||||
|
</log4net>
|
@@ -1,110 +1,93 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<log4net>
|
<log4net>
|
||||||
<!--
|
|
||||||
If you are looking here and want more output,
|
|
||||||
first thing to do is change root/priority/@value to "INFO" or "ALL"
|
|
||||||
-->
|
|
||||||
|
|
||||||
<root>
|
|
||||||
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
|
|
||||||
<priority value="WARN" />
|
|
||||||
|
|
||||||
<appender-ref ref="error-file" />
|
<!-- If you are looking here and want more output, first thing to do is change root/priority/@value to "INFO" or "ALL". -->
|
||||||
<appender-ref ref="debug-file" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!-- example of turning on the output from a component or namespace-->
|
<root>
|
||||||
<!--
|
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF. -->
|
||||||
<logger name="Orchard.Data.SessionLocator">
|
<priority value="WARN" />
|
||||||
<priority value="INFO" />
|
<appender-ref ref="error-file" />
|
||||||
</logger>
|
<appender-ref ref="debug-file" />
|
||||||
-->
|
</root>
|
||||||
|
|
||||||
<logger name="Orchard">
|
|
||||||
<!-- messages coming from orchard are provided to the attached debugger -->
|
|
||||||
<appender-ref ref="debugger"/>
|
|
||||||
|
|
||||||
<!--
|
<!-- Example of turning on the output from a component or namespace. -->
|
||||||
note: if you put a ref=debugger into root above and widen the priority to ALL or DEBUG,
|
<!--
|
||||||
then you will see nhibernate trace in the attached debugger as well
|
<logger name="Orchard.Data.SessionLocator">
|
||||||
-->
|
<priority value="INFO" />
|
||||||
</logger>
|
</logger>
|
||||||
|
-->
|
||||||
|
|
||||||
<logger name="Orchard.Localization">
|
<logger name="Orchard">
|
||||||
<!-- this source is very verbose - setting priority here to avoid flooding trace if root priority is lowered -->
|
<!-- Messages coming from Orchard are sent to the attached debugger. -->
|
||||||
<priority value="WARN" />
|
<appender-ref ref="debugger"/>
|
||||||
</logger>
|
<!-- Note: if you put a ref=debugger into <root> element above and widen the priority to ALL or DEBUG, then you will see nhibernate trace in the attached debugger as well. -->
|
||||||
|
</logger>
|
||||||
<logger name="NHibernate.Cache">
|
|
||||||
<!-- this source is very verbose - setting priority here to avoid flooding trace if root priority is lowered -->
|
|
||||||
<priority value="ERROR" />
|
|
||||||
</logger>
|
|
||||||
|
|
||||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
<logger name="Orchard.Localization">
|
||||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected -->
|
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||||
<priority value="OFF" />
|
<priority value="WARN" />
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
<logger name="NHibernate.Cache">
|
||||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected -->
|
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||||
<priority value="OFF" />
|
<priority value="ERROR" />
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<logger name="NHibernate.Util.ADOExceptionReporter">
|
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected -->
|
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||||
<priority value="OFF" />
|
<priority value="OFF" />
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<appender name="debugger" type="log4net.Appender.DebugAppender">
|
|
||||||
<!-- debugger: visual studio, if attached -->
|
|
||||||
|
|
||||||
<immediateFlush value="true" />
|
|
||||||
<layout type="log4net.Layout.SimpleLayout" />
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="debug-file" type="Orchard.Logging.OrchardFileAppender">
|
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||||
<!-- debug log: all messages, based on logger priority settings of namespaces above -->
|
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||||
|
<priority value="OFF" />
|
||||||
<file value="App_Data/Logs/orchard-debug" />
|
</logger>
|
||||||
<appendToFile value="true" />
|
|
||||||
|
|
||||||
<!-- immediate flush on error log, to avoid data loss with sudden termination -->
|
<logger name="NHibernate.Util.ADOExceptionReporter">
|
||||||
<immediateFlush value="true" />
|
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||||
|
<priority value="OFF" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
<staticLogFileName value="false" />
|
<appender name="debugger" type="log4net.Appender.DebugAppender">
|
||||||
<rollingStyle value="Date" />
|
<!-- Sends log messages to Visual Studio if attached. -->
|
||||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
<immediateFlush value="true" />
|
||||||
<!-- prevent orchard.exe from displaying locking debug messages -->
|
<layout type="log4net.Layout.SimpleLayout" />
|
||||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
</appender>
|
||||||
|
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
|
||||||
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
|
||||||
</layout>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="error-file" type="Orchard.Logging.OrchardFileAppender">
|
<appender name="debug-file" type="Orchard.Logging.OrchardFileAppender">
|
||||||
<!-- error log: only ERROR and FATAL subset of debug log -->
|
<!-- Sends log messages to a file in App_Data. -->
|
||||||
|
<file value="App_Data/Logs/orchard-debug" />
|
||||||
<file value="App_Data/Logs/orchard-error" />
|
<appendToFile value="true" />
|
||||||
<appendToFile value="true" />
|
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||||
|
<immediateFlush value="true" />
|
||||||
|
<staticLogFileName value="false" />
|
||||||
|
<rollingStyle value="Date" />
|
||||||
|
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||||
|
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||||
|
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<!-- immediate flush on error log, to avoid data loss with sudden termination -->
|
<appender name="error-file" type="Orchard.Logging.OrchardFileAppender">
|
||||||
<immediateFlush value="true" />
|
<!-- Sends ERROR and FATAL log messages to a file in App_Data. -->
|
||||||
|
<file value="App_Data/Logs/orchard-error" />
|
||||||
<staticLogFileName value="false" />
|
<appendToFile value="true" />
|
||||||
<rollingStyle value="Date" />
|
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
<immediateFlush value="true" />
|
||||||
|
<staticLogFileName value="false" />
|
||||||
<!-- prevent orchard.exe from displaying locking error messages -->
|
<rollingStyle value="Date" />
|
||||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||||
|
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||||
<filter type="log4net.Filter.LevelRangeFilter">
|
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||||
<!-- only error and fatal messages end up in this target, even if child loggers accept lower priority -->
|
<filter type="log4net.Filter.LevelRangeFilter">
|
||||||
<levelMin value="ERROR" />
|
<!-- Only ERROR and FATAL log messages end up in this target, even if child loggers accept lower priority. -->
|
||||||
</filter>
|
<levelMin value="ERROR" />
|
||||||
|
</filter>
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
<conversionPattern value="%date [%thread] %logger - %message%newline" />
|
||||||
</layout>
|
</layout>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
</log4net>
|
</log4net>
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
Name: Orchard.AzureBlobStorage
|
Name: Orchard.AzureBlobStorage
|
||||||
AntiForgery: enabled
|
AntiForgery: enabled
|
||||||
Author: The Orchard Team
|
Author: The Orchard Team
|
||||||
Website: http://orchardproject.net
|
Website: http://orchardproject.net
|
||||||
Version: 1.0
|
Version: 1.0
|
||||||
OrchardVersion: 1.7
|
OrchardVersion: 1.7
|
||||||
Description: Description for the module
|
Description: Description for the module
|
||||||
Features:
|
Features:
|
||||||
Orchard.AzureBlobStorage:
|
Orchard.AzureBlobStorage:
|
||||||
Description: Stores the files on Azure Blob Storage
|
Description: Configures Windows Azure Blob Storage to be used as the underlying storage for Orchard
|
||||||
Name: Azure Blob Storage
|
Name: Azure Blob Storage
|
||||||
Category: Hosting
|
Category: Hosting
|
@@ -1,139 +1,141 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{CBC7993C-57D8-4A6C-992C-19E849DFE71D}</ProjectGuid>
|
<ProjectGuid>{CBC7993C-57D8-4A6C-992C-19E849DFE71D}</ProjectGuid>
|
||||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Orchard.AzureBlobStorage</RootNamespace>
|
<RootNamespace>Orchard.AzureBlobStorage</RootNamespace>
|
||||||
<AssemblyName>Orchard.AzureBlobStorage</AssemblyName>
|
<AssemblyName>Orchard.AzureBlobStorage</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<MvcBuildViews>false</MvcBuildViews>
|
<MvcBuildViews>false</MvcBuildViews>
|
||||||
<FileUpgradeFlags>
|
<FileUpgradeFlags>
|
||||||
</FileUpgradeFlags>
|
</FileUpgradeFlags>
|
||||||
<OldToolsVersion>4.0</OldToolsVersion>
|
<OldToolsVersion>4.0</OldToolsVersion>
|
||||||
<UpgradeBackupLocation />
|
<UpgradeBackupLocation />
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
<UseIISExpress>false</UseIISExpress>
|
<UseIISExpress>false</UseIISExpress>
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
<IISExpressWindowsAuthentication />
|
<IISExpressWindowsAuthentication />
|
||||||
<IISExpressUseClassicPipelineMode />
|
<IISExpressUseClassicPipelineMode />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Configuration.dll</HintPath>
|
<HintPath>..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Configuration.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Storage.dll</HintPath>
|
<HintPath>..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Storage.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Abstractions" />
|
<Reference Include="System.Web.Abstractions" />
|
||||||
<Reference Include="System.Web.Routing" />
|
<Reference Include="System.Web.Routing" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
<Content Include="Properties\AssemblyInfo.cs" />
|
<Content Include="Properties\AssemblyInfo.cs" />
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
<ProjectReference Include="..\..\..\Orchard.Azure\Orchard.Azure.csproj">
|
||||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
<Project>{2505aa84-65a6-43d0-9c27-4f44fd576284}</Project>
|
||||||
<Name>Orchard.Framework</Name>
|
<Name>Orchard.Azure</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||||
<Name>Orchard.Core</Name>
|
<Name>Orchard.Framework</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||||
<ItemGroup>
|
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||||
<Compile Include="Services\AzureFileSystem.cs" />
|
<Name>Orchard.Core</Name>
|
||||||
<Compile Include="Services\CloudBlobContainerExtensions.cs" />
|
</ProjectReference>
|
||||||
<Compile Include="Services\AzureBlobStorageProvider.cs" />
|
</ItemGroup>
|
||||||
</ItemGroup>
|
<ItemGroup>
|
||||||
<ItemGroup />
|
<Compile Include="Services\AzureBlobStorageProviderDependency.cs" />
|
||||||
<PropertyGroup>
|
</ItemGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<ItemGroup />
|
||||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
<PropertyGroup>
|
||||||
</PropertyGroup>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
</PropertyGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||||
<Target Name="BeforeBuild">
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
</Target> -->
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
|
<Target Name="BeforeBuild">
|
||||||
<PropertyGroup>
|
</Target> -->
|
||||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
|
||||||
</PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- If this is an area child project, uncomment the following line:
|
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
</PropertyGroup>
|
||||||
-->
|
<!-- If this is an area child project, uncomment the following line:
|
||||||
<!-- If this is an area parent project, uncomment the following lines:
|
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
-->
|
||||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
<!-- If this is an area parent project, uncomment the following lines:
|
||||||
-->
|
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||||
</Target>
|
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
-->
|
||||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
</Target>
|
||||||
</Target>
|
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||||
<ProjectExtensions>
|
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
||||||
<VisualStudio>
|
</Target>
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
<ProjectExtensions>
|
||||||
<WebProjectProperties>
|
<VisualStudio>
|
||||||
<UseIIS>False</UseIIS>
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
<AutoAssignPort>True</AutoAssignPort>
|
<WebProjectProperties>
|
||||||
<DevelopmentServerPort>45979</DevelopmentServerPort>
|
<UseIIS>False</UseIIS>
|
||||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
<AutoAssignPort>True</AutoAssignPort>
|
||||||
<IISUrl>
|
<DevelopmentServerPort>45979</DevelopmentServerPort>
|
||||||
</IISUrl>
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
<NTLMAuthentication>False</NTLMAuthentication>
|
<IISUrl>
|
||||||
<UseCustomServer>True</UseCustomServer>
|
</IISUrl>
|
||||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<UseCustomServer>True</UseCustomServer>
|
||||||
</WebProjectProperties>
|
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||||
</FlavorProperties>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</VisualStudio>
|
</WebProjectProperties>
|
||||||
</ProjectExtensions>
|
</FlavorProperties>
|
||||||
|
</VisualStudio>
|
||||||
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@@ -1,57 +0,0 @@
|
|||||||
using System.IO;
|
|
||||||
using Orchard.Environment.Configuration;
|
|
||||||
using Orchard.Environment.Extensions;
|
|
||||||
using Orchard.FileSystems.Media;
|
|
||||||
|
|
||||||
namespace Orchard.AzureBlobStorage.Services {
|
|
||||||
[OrchardSuppressDependency("Orchard.FileSystems.Media.FileSystemStorageProvider")]
|
|
||||||
public class AzureBlobStorageProvider : AzureFileSystem, IStorageProvider {
|
|
||||||
|
|
||||||
public AzureBlobStorageProvider(ShellSettings shellSettings, IMimeTypeProvider mimeTypeProvider) : base("media", shellSettings.Name, false, mimeTypeProvider) { }
|
|
||||||
|
|
||||||
public bool TrySaveStream(string path, Stream inputStream) {
|
|
||||||
try {
|
|
||||||
SaveStream(path, inputStream);
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveStream(string path, Stream inputStream) {
|
|
||||||
// Create the file.
|
|
||||||
// The CreateFile method will map the still relative path
|
|
||||||
var file = CreateFile(path);
|
|
||||||
|
|
||||||
using(var outputStream = file.OpenWrite()) {
|
|
||||||
var buffer = new byte[8192];
|
|
||||||
for (;;) {
|
|
||||||
var length = inputStream.Read(buffer, 0, buffer.Length);
|
|
||||||
if (length <= 0)
|
|
||||||
break;
|
|
||||||
outputStream.Write(buffer, 0, length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Retrieves the local path for a given url within the storage provider.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="url">The public url of the media.</param>
|
|
||||||
/// <returns>The local path.</returns>
|
|
||||||
public string GetStoragePath(string url) {
|
|
||||||
if (url.StartsWith(_absoluteRoot)) {
|
|
||||||
return url.Substring(Combine(_absoluteRoot, "/").Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetRelativePath(string path) {
|
|
||||||
return GetPublicUrl(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,12 @@
|
|||||||
|
using System.IO;
|
||||||
|
using Orchard.Environment.Configuration;
|
||||||
|
using Orchard.Environment.Extensions;
|
||||||
|
using Orchard.FileSystems.Media;
|
||||||
|
using Orchard.Azure.FileSystems.Media;
|
||||||
|
|
||||||
|
namespace Orchard.AzureBlobStorage.Services {
|
||||||
|
[OrchardSuppressDependency("Orchard.FileSystems.Media.FileSystemStorageProvider")]
|
||||||
|
public class AzureBlobStorageProviderDependency : AzureBlobStorageProvider {
|
||||||
|
public AzureBlobStorageProviderDependency(ShellSettings shellSettings, IMimeTypeProvider mimeTypeProvider) : base(shellSettings, mimeTypeProvider) { }
|
||||||
|
}
|
||||||
|
}
|
@@ -14,12 +14,6 @@
|
|||||||
<AssemblyName>Orchard.Web</AssemblyName>
|
<AssemblyName>Orchard.Web</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<MvcBuildViews>false</MvcBuildViews>
|
<MvcBuildViews>false</MvcBuildViews>
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>4.0</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
@@ -46,6 +40,8 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish>
|
||||||
|
<PackageAsSingleFile>false</PackageAsSingleFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Autofac, Version=2.6.3.862, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
<Reference Include="Autofac, Version=2.6.3.862, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
@@ -128,12 +124,6 @@
|
|||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Content Include="Config\log4net.config">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Config\HostComponents.config">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -165,7 +155,13 @@
|
|||||||
<Content Include="Config\Host.config" />
|
<Content Include="Config\Host.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<None Include="Properties\PublishProfiles\TestProfile.pubxml" />
|
||||||
|
<None Include="Web.Debug.config">
|
||||||
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<None Include="Web.Release.config">
|
||||||
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
@@ -174,15 +170,71 @@
|
|||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||||
|
<ItemGroup>
|
||||||
|
<WebConfigsToTransform Include="Config\log4net.config">
|
||||||
|
<DestinationRelativePath>Config\log4net.config</DestinationRelativePath>
|
||||||
|
<Exclude>False</Exclude>
|
||||||
|
<TransformFileFolder>$(TransformWebConfigIntermediateLocation)\original</TransformFileFolder>
|
||||||
|
<TransformFile>Config\log4net.$(Configuration).config</TransformFile>
|
||||||
|
<TransformOriginalFolder>$(TransformWebConfigIntermediateLocation)\original</TransformOriginalFolder>
|
||||||
|
<TransformOriginalFile>$(TransformWebConfigIntermediateLocation)\original\%(DestinationRelativePath)</TransformOriginalFile>
|
||||||
|
<TransformOutputFile>$(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
|
||||||
|
<TransformScope>$(_PackageTempDir)\%(DestinationRelativePath)</TransformScope>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</WebConfigsToTransform>
|
||||||
|
<None Include="Config\log4net.Debug.config">
|
||||||
|
<DependentUpon>log4net.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<None Include="Config\log4net.Release.config">
|
||||||
|
<DependentUpon>log4net.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<WebConfigsToTransform Include="Config\HostComponents.config">
|
||||||
|
<DestinationRelativePath>Config\HostComponents.config</DestinationRelativePath>
|
||||||
|
<Exclude>False</Exclude>
|
||||||
|
<TransformFileFolder>$(TransformWebConfigIntermediateLocation)\original</TransformFileFolder>
|
||||||
|
<TransformFile>Config\HostComponents.$(Configuration).config</TransformFile>
|
||||||
|
<TransformOriginalFolder>$(TransformWebConfigIntermediateLocation)\original</TransformOriginalFolder>
|
||||||
|
<TransformOriginalFile>$(TransformWebConfigIntermediateLocation)\original\%(DestinationRelativePath)</TransformOriginalFile>
|
||||||
|
<TransformOutputFile>$(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
|
||||||
|
<TransformScope>$(_PackageTempDir)\%(DestinationRelativePath)</TransformScope>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</WebConfigsToTransform>
|
||||||
|
<None Include="Config\HostComponents.Debug.config">
|
||||||
|
<DependentUpon>HostComponents.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<None Include="Config\HostComponents.Release.config">
|
||||||
|
<DependentUpon>HostComponents.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||||
|
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||||
|
</Target>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<VisualStudio>
|
||||||
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
|
<WebProjectProperties>
|
||||||
|
<UseIIS>True</UseIIS>
|
||||||
|
<AutoAssignPort>False</AutoAssignPort>
|
||||||
|
<DevelopmentServerPort>30321</DevelopmentServerPort>
|
||||||
|
<DevelopmentServerVPath>/OrchardLocal</DevelopmentServerVPath>
|
||||||
|
<IISUrl>http://localhost:30321/OrchardLocal</IISUrl>
|
||||||
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
|
<UseCustomServer>False</UseCustomServer>
|
||||||
|
<CustomServerUrl>
|
||||||
|
</CustomServerUrl>
|
||||||
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
|
</WebProjectProperties>
|
||||||
|
</FlavorProperties>
|
||||||
|
</VisualStudio>
|
||||||
|
</ProjectExtensions>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target> -->
|
</Target> -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
|
<CopyAllFilesToSingleFolderForMsdeployDependsOn>CustomCollectFiles;$(CopyAllFilesToSingleFolderForMsdeployDependsOn);</CopyAllFilesToSingleFolderForMsdeployDependsOn>
|
||||||
CustomCollectFiles;
|
|
||||||
$(CopyAllFilesToSingleFolderForMsdeployDependsOn);
|
|
||||||
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="CustomCollectFiles">
|
<Target Name="CustomCollectFiles">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -209,63 +261,19 @@
|
|||||||
<SqlCeBinariesx64 Include="$(ProjectDir)..\..\lib\sqlce\amd64\**\*" />
|
<SqlCeBinariesx64 Include="$(ProjectDir)..\..\lib\sqlce\amd64\**\*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Copy SourceFiles="@(SqlCeBinariesx86)" DestinationFolder="$(OutputPath)\x86\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="@(SqlCeBinariesx86)" DestinationFolder="$(OutputPath)\x86\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
||||||
<Copy SourceFiles="@(SqlCeBinariesx86)" DestinationFolder="$(OutputPath)\x86\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
<Copy SourceFiles="@(SqlCeBinariesx64)" DestinationFolder="$(OutputPath)\amd64\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="$(ProjectDir)..\..\lib\msbuild\MSBuild.Community.Tasks.Targets" />
|
<Target Name="AfterBuild" DependsOnTargets="MvcBuildViews">
|
||||||
<UsingTask AssemblyFile="$(ProjectDir)\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
|
|
||||||
<Target Name="ProcessConfigurationFiles" AfterTargets="CopyAllFilesToSingleFolderForMsdeploy">
|
|
||||||
<PropertyGroup>
|
|
||||||
<PackageTmp>$(ProjectDir)obj\Release\Package\PackageTmp</PackageTmp>
|
|
||||||
</PropertyGroup>
|
|
||||||
<!-- extra processing of the staged config files -->
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/compilation/@debug" Value="false" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/trust" />
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/@validationKey" Value="AutoGenerate" />
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/@decryptionKey" Value="AutoGenerate" />
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender/immediateFlush/@value" Value="false" />
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger/priority/@value" Value="ERROR" />
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/priority/@value" Value="ERROR" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='debug-file']" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='debugger']" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='error-file']/filter" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[@name='Orchard.Localization']" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[@name='Orchard']" />
|
|
||||||
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/appender-ref[@ref='debug-file']" />
|
|
||||||
<!-- disable all file monitoring but ExtensionMonitoringCorrdinator to detect new modules/themes -->
|
|
||||||
<XmlUpdate XmlFileName="$(PackageTmp)\Config\HostComponents.config" XPath="/HostComponents/Components/Component/Properties/Property[@Name='DisableMonitoring']/@Value" Value="true" />
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<CallTarget Targets="CopySqlCeBinaries" />
|
<CallTarget Targets="CopySqlCeBinaries" />
|
||||||
<!-- If this is an area child project, uncomment the following line:
|
<!-- If this is an area child project, uncomment the following line:
|
||||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||||
-->
|
-->
|
||||||
<!-- If this is an area parent project, uncomment the following lines:
|
<!-- If this is an area parent project, uncomment the following lines:
|
||||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||||
-->
|
-->
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
|
||||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
|
||||||
</Target>
|
|
||||||
<ProjectExtensions>
|
|
||||||
<VisualStudio>
|
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
|
||||||
<WebProjectProperties>
|
|
||||||
<UseIIS>True</UseIIS>
|
|
||||||
<AutoAssignPort>False</AutoAssignPort>
|
|
||||||
<DevelopmentServerPort>30321</DevelopmentServerPort>
|
|
||||||
<DevelopmentServerVPath>/OrchardLocal</DevelopmentServerVPath>
|
|
||||||
<IISUrl>http://localhost:30321/OrchardLocal</IISUrl>
|
|
||||||
<NTLMAuthentication>False</NTLMAuthentication>
|
|
||||||
<UseCustomServer>False</UseCustomServer>
|
|
||||||
<CustomServerUrl>
|
|
||||||
</CustomServerUrl>
|
|
||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
|
||||||
</WebProjectProperties>
|
|
||||||
</FlavorProperties>
|
|
||||||
</VisualStudio>
|
|
||||||
</ProjectExtensions>
|
|
||||||
</Project>
|
</Project>
|
4
src/Orchard.Web/Web.Debug.config
Normal file
4
src/Orchard.Web/Web.Debug.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</configuration>
|
8
src/Orchard.Web/Web.Release.config
Normal file
8
src/Orchard.Web/Web.Release.config
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
<system.web>
|
||||||
|
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||||
|
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" xdt:Transform="SetAttributes(validationKey,decryptionKey)" />
|
||||||
|
</system.web>
|
||||||
|
</configuration>
|
@@ -1,195 +1,196 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
Note: As an alternative to hand editing this file you can use the
|
Note: As an alternative to hand editing this file you can use the
|
||||||
web admin tool to configure settings for your application. Use
|
web admin tool to configure settings for your application. Use
|
||||||
the Website->Asp.Net Configuration option in Visual Studio.
|
the Website->Asp.Net Configuration option in Visual Studio.
|
||||||
A full list of settings and comments can be found in
|
A full list of settings and comments can be found in
|
||||||
machine.config.comments usually located in
|
machine.config.comments usually located in
|
||||||
\Windows\Microsoft.Net\Framework\v2.x\Config
|
\Windows\Microsoft.Net\Framework\v2.x\Config
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||||
<remove name="host"/>
|
<remove name="host"/>
|
||||||
<remove name="pages"/>
|
<remove name="pages"/>
|
||||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
|
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
|
||||||
</configSections>
|
</configSections>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Enabled" value="false"/>
|
<add key="webpages:Enabled" value="false"/>
|
||||||
<add key="log4net.Config" value="Config\log4net.config"/>
|
<add key="log4net.Config" value="Config\log4net.config"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<system.web.webPages.razor>
|
<system.web.webPages.razor>
|
||||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<add namespace="System.Web.Mvc"/>
|
<add namespace="System.Web.Mvc"/>
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
<add namespace="System.Web.Mvc.Ajax"/>
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
<add namespace="System.Web.Mvc.Html"/>
|
||||||
<add namespace="System.Web.Routing"/>
|
<add namespace="System.Web.Routing"/>
|
||||||
<add namespace="System.Web.WebPages"/>
|
<add namespace="System.Web.WebPages"/>
|
||||||
<add namespace="System.Linq"/>
|
<add namespace="System.Linq"/>
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Collections.Generic"/>
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
<add namespace="Orchard.Mvc.Html"/>
|
||||||
</namespaces>
|
</namespaces>
|
||||||
</pages>
|
</pages>
|
||||||
</system.web.webPages.razor>
|
</system.web.webPages.razor>
|
||||||
<!--
|
<!--
|
||||||
Set default transaction timeout to 30 minutes so that interactive debugging
|
Set default transaction timeout to 30 minutes so that interactive debugging
|
||||||
is easier (default timeout is less than one minute)
|
is easier (default timeout is less than one minute)
|
||||||
-->
|
-->
|
||||||
<system.transactions>
|
<system.transactions>
|
||||||
<defaultSettings timeout="00:30:00"/>
|
<defaultSettings timeout="00:30:00"/>
|
||||||
</system.transactions>
|
</system.transactions>
|
||||||
<system.web>
|
<system.web>
|
||||||
<!--<trust level="Medium" originUrl="" />-->
|
<!-- Accept file uploads up to 64 Mb -->
|
||||||
<!-- Accept file uploads up to 64 Mb -->
|
<httpRuntime requestValidationMode="2.0" maxRequestLength="65536" />
|
||||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="65536" />
|
<!--
|
||||||
<!--
|
Set compilation debug="true" to insert debugging
|
||||||
Set compilation debug="true" to insert debugging
|
symbols into the compiled page. Because this
|
||||||
symbols into the compiled page. Because this
|
affects performance, set this value to true only
|
||||||
affects performance, set this value to true only
|
during development.
|
||||||
during development.
|
-->
|
||||||
-->
|
<compilation debug="true" targetFramework="4.0" batch="true" numRecompilesBeforeAppRestart="250" optimizeCompilations="true">
|
||||||
<compilation debug="true" targetFramework="4.0" batch="true" numRecompilesBeforeAppRestart="250" optimizeCompilations="true">
|
<buildProviders>
|
||||||
<buildProviders>
|
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
|
||||||
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
|
</buildProviders>
|
||||||
</buildProviders>
|
<assemblies>
|
||||||
<assemblies>
|
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
<remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||||
<remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||||
<remove assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
<remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
<remove assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||||
<remove assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
<remove assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
<remove assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
<remove assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||||
<remove assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||||
<remove assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
<remove assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
<remove assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
<remove assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
<remove assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
<remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
<remove assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||||
</assemblies>
|
<remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||||
</compilation>
|
</assemblies>
|
||||||
<!--
|
</compilation>
|
||||||
The <authentication> section enables configuration
|
<!--
|
||||||
of the security authentication mode used by
|
The <authentication> section enables configuration
|
||||||
ASP.NET to identify an incoming user.
|
of the security authentication mode used by
|
||||||
-->
|
ASP.NET to identify an incoming user.
|
||||||
<authentication mode="Forms">
|
-->
|
||||||
<forms loginUrl="~/Users/Account/AccessDenied" timeout="2880"/>
|
<authentication mode="Forms">
|
||||||
</authentication>
|
<forms loginUrl="~/Users/Account/AccessDenied" timeout="2880"/>
|
||||||
<!--
|
</authentication>
|
||||||
The <customErrors> section enables configuration
|
<!--
|
||||||
of what to do if/when an unhandled error occurs
|
The <customErrors> section enables configuration
|
||||||
during the execution of a request. Specifically,
|
of what to do if/when an unhandled error occurs
|
||||||
it enables developers to configure html error pages
|
during the execution of a request. Specifically,
|
||||||
to be displayed in place of a error stack trace.
|
it enables developers to configure html error pages
|
||||||
-->
|
to be displayed in place of a error stack trace.
|
||||||
<customErrors mode="RemoteOnly"/>
|
-->
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
<customErrors mode="RemoteOnly"/>
|
||||||
<namespaces>
|
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||||
<add namespace="System.Web.Mvc"/>
|
<namespaces>
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
<add namespace="System.Web.Mvc"/>
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
<add namespace="System.Web.Mvc.Ajax"/>
|
||||||
<add namespace="System.Web.Routing"/>
|
<add namespace="System.Web.Mvc.Html"/>
|
||||||
<add namespace="System.Linq"/>
|
<add namespace="System.Web.Routing"/>
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Linq"/>
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
<add namespace="System.Collections.Generic"/>
|
||||||
</namespaces>
|
<add namespace="Orchard.Mvc.Html"/>
|
||||||
</pages>
|
</namespaces>
|
||||||
<httpHandlers>
|
</pages>
|
||||||
<!-- see below -->
|
<httpHandlers>
|
||||||
<clear/>
|
<!-- see below -->
|
||||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
<clear/>
|
||||||
</httpHandlers>
|
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||||
<httpModules>
|
</httpHandlers>
|
||||||
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7, Culture=neutral"/>
|
<httpModules>
|
||||||
</httpModules>
|
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7, Culture=neutral"/>
|
||||||
</system.web>
|
</httpModules>
|
||||||
<!--
|
</system.web>
|
||||||
The system.webServer section is required for running ASP.NET AJAX under Internet
|
<!--
|
||||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
The system.webServer section is required for running ASP.NET AJAX under Internet
|
||||||
|
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||||
-->
|
-->
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<validation validateIntegratedModeConfiguration="false"/>
|
<validation validateIntegratedModeConfiguration="false"/>
|
||||||
<modules runAllManagedModulesForAllRequests="false">
|
<modules runAllManagedModulesForAllRequests="false">
|
||||||
<remove name="WarmupHttpModule"/>
|
<remove name="WarmupHttpModule"/>
|
||||||
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7, Culture=neutral"/>
|
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7, Culture=neutral"/>
|
||||||
</modules>
|
</modules>
|
||||||
<handlers accessPolicy="Script">
|
<handlers accessPolicy="Script">
|
||||||
<!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
|
<!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
|
||||||
<clear/>
|
<clear/>
|
||||||
<!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
|
<!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
|
||||||
<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>
|
<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>
|
||||||
<!-- WebApi -->
|
<!-- WebApi -->
|
||||||
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
|
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
|
||||||
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
|
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
|
||||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
|
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
|
||||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
|
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
|
||||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
|
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
|
||||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
|
||||||
</handlers>
|
</handlers>
|
||||||
<!-- Prevent IIS 7.0 from returning a custom 404/500 error page of its own -->
|
<!-- Prevent IIS 7.0 from returning a custom 404/500 error page of its own -->
|
||||||
<httpErrors existingResponse="PassThrough"/>
|
<httpErrors existingResponse="PassThrough"/>
|
||||||
<security>
|
<security>
|
||||||
<requestFiltering>
|
<requestFiltering>
|
||||||
<!-- Accept file uploads up to 64 Mb -->
|
<!-- Accept file uploads up to 64 Mb -->
|
||||||
<requestLimits maxAllowedContentLength="67108864" />
|
<requestLimits maxAllowedContentLength="67108864" />
|
||||||
</requestFiltering>
|
</requestFiltering>
|
||||||
</security>
|
</security>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
<runtime>
|
<runtime>
|
||||||
<gcServer enabled="true"/>
|
<gcServer enabled="true"/>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<probing privatePath="App_Data/Dependencies"/>
|
<probing privatePath="App_Data/Dependencies"/>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35"/>
|
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
|
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.3.1.4000" newVersion="3.3.1.4000"/>
|
<bindingRedirect oldVersion="0.0.0.0-3.3.1.4000" newVersion="3.3.1.4000"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"/>
|
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"/>
|
||||||
<bindingRedirect oldVersion="2.2.0.0-2.6.3.862" newVersion="3.0.0.0"/>
|
<bindingRedirect oldVersion="2.2.0.0-2.6.3.862" newVersion="3.0.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0"/>
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
@@ -162,6 +162,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules.Deprecated", "Modul
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.AzureBlobStorage", "Orchard.Web\Modules\Orchard.AzureBlobStorage\Orchard.AzureBlobStorage.csproj", "{CBC7993C-57D8-4A6C-992C-19E849DFE71D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.AzureBlobStorage", "Orchard.Web\Modules\Orchard.AzureBlobStorage\Orchard.AzureBlobStorage.csproj", "{CBC7993C-57D8-4A6C-992C-19E849DFE71D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Azure", "Orchard.Azure\Orchard.Azure.csproj", "{2505AA84-65A6-43D0-9C27-4F44FD576284}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||||
@@ -900,6 +902,16 @@ Global
|
|||||||
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||||
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CBC7993C-57D8-4A6C-992C-19E849DFE71D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2505AA84-65A6-43D0-9C27-4F44FD576284}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
Reference in New Issue
Block a user