-
August 27th, 2018, 05:31 PM
#1
Cannot run C++ console application on Azure
I have a console application written with Visual C++, which is created image metal file and bmp file. It works perfectly on Window system, but on Azure, nothing happened, not creating any image files.
Any suggestions and help will be appreciated!
Wei
-
August 28th, 2018, 07:15 AM
#2
Re: Cannot run C++ console application on Azure
I've never used Azure so I'm not sure what debugging tools are available, but you may want to write to a log file at various points in your program to see how far it gets.
-
August 28th, 2018, 03:57 PM
#3
Re: Cannot run C++ console application on Azure
 Originally Posted by GCDEF
I've never used Azure so I'm not sure what debugging tools are available, but you may want to write to a log file at various points in your program to see how far it gets.
I cannot write debugging files on Azure either. Be more specific, it is on Azure App Services.
Thanks,
Wei
-
August 28th, 2018, 11:33 PM
#4
Re: Cannot run C++ console application on Azure
 Originally Posted by geomark
I cannot write debugging files on Azure either. Be more specific, it is on Azure App Services.
Thanks,
Wei
Why would you expect to be able to run a native Windows console application as an Azure app service?
-
August 29th, 2018, 11:14 AM
#5
Re: Cannot run C++ console application on Azure
 Originally Posted by Arjay
Why would you expect to be able to run a native Windows console application as an Azure app service?
The website is hosted on an Azure app service. In the web application it needs to run a console application to create image files. Does anybody know how to create image files (.gif, .bmp or .emf) on Azure app service?
Thanks,
Wei
-
August 29th, 2018, 11:47 PM
#6
Re: Cannot run C++ console application on Azure
Not sure why you needed a console app in the pre-Azure website to save the files.
In pre-Azure (.net core shown below), if the file was uploaded by a user, you could save it with (filePath is the destination path and IFormFile is the uploaded file):
Code:
public async Task UploadSupportingDocumentAsync(string filePath, IFormFile formFile)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
If the files weren't uploaded, did the console app generate the file images? If so, convert the console app to a Azure service and do the same in C#.
Lastly, there are all sorts of file storage options in Azure. Google for the various options.
Last edited by Arjay; August 29th, 2018 at 11:51 PM.
-
August 30th, 2018, 08:22 AM
#7
Re: Cannot run C++ console application on Azure
 Originally Posted by Arjay
Not sure why you needed a console app in the pre-Azure website to save the files.
In pre-Azure (.net core shown below), if the file was uploaded by a user, you could save it with (filePath is the destination path and IFormFile is the uploaded file):
Code:
public async Task UploadSupportingDocumentAsync(string filePath, IFormFile formFile)
{
using (var stream = new FileStream(filePath, FileMode.Create))
{
await formFile.CopyToAsync(stream);
}
}
If the files weren't uploaded, did the console app generate the file images? If so, convert the console app to a Azure service and do the same in C#.
Lastly, there are all sorts of file storage options in Azure. Google for the various options.
Thank you for your response.
The image files are not created on Azure service using my console application written by visual c++
Regards,
Wei
-
March 27th, 2024, 06:59 AM
#8
Re: Cannot run C++ console application on Azure
Migrating and Running C++ Console Applications on Azure: Challenges and Solutions
Migrating C++ console applications to Azure and successfully running them can present unique challenges due to differences in environment configurations, dependencies, and deployment processes. However, with careful planning and utilization of Azure services, these challenges can be overcome effectively.
Challenges in Migrating C++ Console Applications to Azure:
Environment Configuration: Azure infrastructure differs from traditional on-premises environments, requiring adjustments to configurations related to operating systems, libraries, and runtime environments.
Dependencies Management: C++ applications often rely on external dependencies and libraries, which need to be managed and integrated into the Azure environment. Ensuring compatibility and availability of these dependencies can be challenging during migration.
Deployment Process: Transitioning from on-premises deployment models to Azure requires understanding Azure's deployment mechanisms, such as Azure App Service, Azure Virtual Machines, or Azure Container Instances, and adapting the application deployment accordingly.
Networking and Security: Addressing networking considerations, such as network security groups, virtual networks, and access controls, is essential to ensure secure communication between the C++ application and other Azure services.
Solutions for Migrating and Running C++ Console Applications on Azure:
Containerization with Azure Container Instances (ACI): Containerizing the C++ application using Docker and deploying it to Azure Container Instances simplifies deployment and provides flexibility in managing dependencies and runtime environments.
Azure Virtual Machines (VMs): Provisioning Azure VMs with the appropriate configurations allows running C++ applications in an environment similar to on-premises setups. VM extensions and custom images can streamline environment setup and management.
Azure App Service: Leveraging Azure App Service, particularly the Windows App Service for C++, enables deploying and running C++ console applications with minimal configuration overhead. App Service offers scalability, automatic OS updates, and integration with Azure DevOps for continuous deployment.
Azure Functions: Refactoring parts of the C++ application into Azure Functions allows leveraging serverless computing for specific tasks or functionalities. Azure Functions support various programming languages, including C++ via custom handlers.
Integration with Azure DevOps: Utilize Azure DevOps pipelines for automated builds, testing, and deployment of the C++ . Azure DevOps provides robust CI/CD capabilities and integrates seamlessly with Azure services.
Networking and Security Considerations: Configure Azure networking components, such as virtual networks, subnets, and network security groups, to facilitate secure communication between the C++ application and other Azure resources. Utilize Azure Key Vault for managing sensitive data and credentials securely.
Last edited by 2kaud; March 27th, 2024 at 07:06 AM.
Reason: Web link removed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|