Search code examples
azureazure-cloud-services

Azure Cloud App File Access


I am using log4net to write out a log file for my Azure Cloud App.

I can see the log file in the browser, but cannot open it:

http://document-pdfgen.cloudapp.net/

I went through the entire Azure Portal and cannot find a way to access this file. Has anyone done this before?

Thanks,

Philip


Solution

  • As Andrés Nava - .NET mentioned that we could add the MIME extension log MIME type text/plain to IIS.

    For CloudService application, we could remote to Web role to set IIS by ourselves. How to remote cloudservice please refer to Azure offical tutorials.

    The following detail steps:

    1. Remote to corrosponding role desktop
    2. Lanuch IIS manager.
    3. Switch to Feature view tab and click MIME Types

    enter image description here

    1. add the MIME extension log MIME type text/plain to IIS

    enter image description here

    1. Restart the IIS, then it should work correctly.

    Note :According to you metioned link that you have enabled Dirctory Browsing. If it is not necessary we also could disable it in the IIS manager.

    enter image description here