We have a very custom UI we're trying to build and we want to build our shopping site using .Net MVC. We have bought the able commerce source code.
I am having issues with all the configuration files. How do I redirect the able commerce configuration files? At this point I have rewritten parts of the Token class to deal with this.
I'm now stuck on the Encryption configuration. I put the encryptionKey in the web.config and here's the code I'm using to get the byte array.
Here's the code I'm using in the EncryptionHelper class
/// <summary>
/// Gets the encryption key from AbleCommerce settings
/// </summary>
/// <returns>The encryption key</returns>
public static byte[] GetEncryptionKey()
{
var key = ConfigurationManager.AppSettings["encryptionKey"];
var encoding = new UTF8Encoding();
var byteCount = encoding.GetByteCount(key.ToCharArray(), 0, 32);
var bytes = new Byte[byteCount];
var bytesEncodedCount = encoding.GetBytes(key, 0, 32, bytes, 0);
return bytes;
}
This runs with no errors but is it returning the proper byte array? I can't see how you're encoding the string in the configuration assembly.
In general, it looks like I'm going to keep having issues with your configuration assembly. Is there a way to move those configurations to the the web.config?
I have read that people are using some sort of virtual directory solution where you install the project and then map your implementation to a virtual directory. This is going to be a royal pain for everyone's local development environments and I'd prefer not to do it that way. All I want to do is have the configuration files in the web.config for the project.
Thanks,
KeithWe have a very custom UI we're trying to build and we want to build our shopping site using .Net MVC. We have bought the able commerce source code.
I am having issues with all the configuration files. How do I redirect the able commerce configuration files? At this point I have rewritten parts of the Token class to deal with this.
I'm now stuck on the Encryption configuration. I put the encryptionKey in the web.config and here's the code I'm using to get the byte array.
Here's the code I'm using in the EncryptionHelper class
/// <summary>
/// Gets the encryption key from AbleCommerce settings
/// </summary>
/// <returns>The encryption key</returns>
public static byte[] GetEncryptionKey()
{
var key = ConfigurationManager.AppSettings["encryptionKey"];
var encoding = new UTF8Encoding();
var byteCount = encoding.GetByteCount(key.ToCharArray(), 0, 32);
var bytes = new Byte[byteCount];
var bytesEncodedCount = encoding.GetBytes(key, 0, 32, bytes, 0);
return bytes;
}
This runs with no errors but is it returning the proper byte array? I can't see how you're encoding the string in the configuration assembly.
In general, it looks like I'm going to keep having issues with your configuration assembly. Is there a way to move those configurations to the the web.config?
I have read that people are using some sort of virtual directory solution where you install the project and then map your implementation to a virtual directory. This is going to be a royal pain for everyone's local development environments and I'd prefer not to do it that way. All I want to do is have the configuration files in the web.config for the project.
Thanks,
Keith