I'll try and give a little more info. The UserFiles module is admin configurable. This allows the admin to enter the pass phrase and salt value etc in order for the encryption to work. This is all done in a settings control.
The gallery is the more conventional DNN module with several view controls and again an admin configurable settings page. Once the image(s) have been uploaded, again a different module but we'll ignore this for now, the gallery needs to pull back the images from the user files module. The transport medium here really doesn't matter, whether IMC or WCF. However the place were the image processing is happening is in a generic handler like so:
public
void
ProcessRequest(HttpContext context)
{
//Parse the querystring
string
cipherText = context.Request.QueryString[
"CipherText"
];
cipherText = cipherText.Replace(
" "
,
"+"
);
context.Response.ContentType =
"image/jpeg"
;
DotNetNuke.Modules.UserFiles.StorageController storageController =
new
UserFiles.StorageController(PortalId, StorageType.FileSystem);
System.Drawing.Image image =
new
Bitmap(storageController.GetStream(cipherText));
image.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
image.Dispose();
}
The parts in bold is were I am currently using a dll reference to access the user files module. I need to decouple this.
So this is were I was hoping IMC or WCF or something like that would fit in. I've tried with IMC but because this is a handler I need to pass the HttpContext through with the request otherwise it will get lost.
The more I think of this the more I think this isn't suited to IMC and more related to WCF. Has anyone successfully integrated a WCF service in a DNN module? I've created the service before already but when i add a service reference I then get errors between the project web.config and the main DNN web.config.
Any ideas would be really appreciated.
Phil