Hi All,
In 2012 we could use local folder path in our code for specifying any file. As we are upgrading to ax 365 how do we handle the file folder path. I read that the local file folder is being deprecated. Please revert with any suggestions.
Thanks
*This post is locked for comments
I'm still not sure if you understand. AX uses the storage for files, so you can store your certificate there.
Regarding your error, it says that the path you provided is in an invalid format, therefore you should review it. I can't help you with it because you didn't share it with us. I hope you're not using a local path on your PC in X++ - we discussed before why it can't work.
Ok so we wont have access to that storage account which is owned by Microsoft to store our files.....
to check the feasibility I uploaded a file in azure storage and tried to acess the url in my code,
My AX code passes the certificate path password and service url to the .net code.
which throws an error the given path format is not supported.
I don't want to use azure certificate store (which is again paid) until there is no other workaround.
public ExchangeRateWSClient(string certificateFilePath, string certificateFilePassword, string serviceUrl)
{
try
{
currencyPairList = new List<string>();
clientCert = new X509Certificate2(certificateFilePath, certificateFilePassword);
serviceEndpointAddress = serviceUrl;
pollInterval = 5000;
}
catch (Exception e)
{
throw new Exception(string.Format(e.Message));
}
}
Yes, every production environment has its own internal storage, which can be used for storing files attached to records, for example.
But it doesn't mean that you get a storage with which you can do anything you like.
Pricing applies if you use your own Azure subscription. I'm talking about the subscription owned by Microsoft, where they deploy your production environment.
Hi martin
You mean to say out of box one default azure storage accounts comes with every production environment? because I don't want to suggest a solution which includes pricing for the customer only for using a single certificate
I could see azure.microsoft.com/.../files where the prices are mentioned.
You could use your own storage (which you would pay for), but why, if you your production environment already comes with a bloc storage for storing files? That's where files are stored if you configure document management to use Azure storage. You can use it from your code too, if you want.
Hi martin
My certificate file is static, can I use azure storage like Files and use the file url in my code, is there any pricing factor which comes if we use azure storage account
What was bad design even in AX 2012, because it wasn't prepared for a clustered AOS. And it's impossible in AX 7, because you don't have access to production servers.
Storing files in database used to be very common (think about product images, for example), although Microsoft now tries to put files to a separate storage rather than to the database (the database has a limited size).
To upload a file, you can use File::GetFileFromUser(). It returns FileUploadResultBase, which will give you the data as a stream. If you want to store it as a container, use the Binary class (constructFromMemoryStream() and getContainer()).
Ok... fyi In 2012 it was stored in the machine where the AOS server was installed.
could you please elaborate on how to store the certificate in database..as in any table ?
The discussion wasn't about changing or deleting either.
Okay, you have a local path in a table, but which computer does it refer to? One of several servers running the AOS? Your computer (so it's invalid for any other user)? Some server in your network unknown and not accessible to the web application in Azure?
In either case, it won't work. You must address the problem differently. Why don't you simply store the certificate in the database or in the blob storage?
I martin thanks for the prompt response,
In my scenario the File is not being changed or deleted I am trying to acess a certificate file path that I am storing in system parameters table for exchange rates import.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156