dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Cannot run C++ console application on Azure

  1. #1
    Join Date
    Aug 2018
    Posts
    4

    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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,521

    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.

  3. #3
    Join Date
    Aug 2018
    Posts
    4

    Re: Cannot run C++ console application on Azure

    Quote Originally Posted by GCDEF View Post
    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

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,801

    Re: Cannot run C++ console application on Azure

    Quote Originally Posted by geomark View Post
    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?

  5. #5
    Join Date
    Aug 2018
    Posts
    4

    Re: Cannot run C++ console application on Azure

    Quote Originally Posted by Arjay View Post
    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

  6. #6
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,801

    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.

  7. #7
    Join Date
    Aug 2018
    Posts
    4

    Re: Cannot run C++ console application on Azure

    Quote Originally Posted by Arjay View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)