DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Access a File of type File extension placed in Virtual Directory

 4 Replies
 1 Subscribed to this topic
 26 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 1
New Around Here

    Tried the below mentioned setps in DNN to access a file of type ".file"

    1. Created a virtual directory in DNN and placed the file "apple-developer-merchantid-domain-association" in the virtual directory folder ".well-known"

    2. Now I tried accessing the file using the following URL: "https://[DomainName]/.well-known/apple-developer-merchantid-domain-association"

    3. But that redirected to 404 Page not found page. DNN treats the file as a page name tries to find the page instead of file in the virtual directory.

    Looking for a solution to access the file in DNN. Please let me know is there a way to access the file in DNN.

    Growing Member
    Posts: 103
    Growing Member
      Make sure the file has .txt as the extension. See https://forums.developer....forums/thread/744311
      Senior Member
      Posts: 1357
      Senior Member

        I would caution against using a virtual directory for all kinds of reasons.  The main reason is that you'll effectively prevent anyone from having a truly working development/staging environment.  Worst case, they'll have a lot of issues creating it, and it will most likely be created with a glaring security hole.  

        Also, DNN have a very useful and stable feature called "Folder Provider." This allows you to map folders of any kind in a way that makes the site portable for all kinds of staging and development scenarios.  

        https://dnnsupport.dnnsof...and-Folder-Providers

        For more information about how files work in DNN, this blog could be helpful.  

        https://dnncommunity.org/...s-DNN-Store-My-Files

        New Around Here
        Posts: 1
        New Around Here
          Appreciate your quick responses.

          The file has to be in Virtual directory. We cannot move that to DNN file folders as that won't help us to validate the apple file.

          We tried adding the ".txt" extension for the apple file. But the form is not displaying any apple pay option. It is failing to validate the apple pay file with ".txt".

          Is there any alternate way to validate the apple pay file which has ".File" type.

          Thank you
          Growing Member
          Posts: 103
          Growing Member
            You need to add a mime type in IIS, see https://learn.microsoft.c...aticcontent/mimemap. I would keep the whole .wellknown folder outside of DNN. Do not try to create that in DNN but add it in IIS.

            These Forums are dedicated to the discussion of DNN Platform.

            For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

            1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
            2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
            3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
            4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
            5. No Flaming or Trolling.
            6. No Profanity, Racism, or Prejudice.
            7. Site Moderators have the final word on approving / removing a thread or post or comment.
            8. English language posting only, please.

            Would you like to help us?

            Awesome! Simply post in the forums using the link below and we'll get you started.

            Get Involved