web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Unable to save the file from web client in required directory.

(0) ShareShare
ReportReport
Posted on by 12

Hello All,
I am trying to export the invoice file in xml format through XMLPORT. I have written the code to export the xmlport in C:\XmlData directory.  I have already created the folder with name XmlData in C drive. The code executes when the post and print action is clicked on sales order card page. It works fine for RTC but when I am trying to do it from web client then I get the error about folder not being accessible.

web-error.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Unable to save the file from web client in required directory.

    From web client, the C drive is on the server. You cannot access the C for sure. The best practice is to save the file to the temporary folder or to a folder where the user has permissions.

  • Sulav Thapaliya Profile Picture
    12 on at
    RE: Unable to save the file from web client in required directory.

    The user type is a NavUser. Is it possible to give permission to NavUser for the folder.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Unable to save the file from web client in required directory.

    The folder cannot be C:\ (root of the C drive) because this location cannot be written for security reasons.

    Create a custom folder under C: and give it the appropriate permissions for the web user (service account under which the NAV service tier runs).

  • Sulav Thapaliya Profile Picture
    12 on at
    RE: Unable to save the file from web client in required directory.

    The user credential type is NavUserPassword. The client that are accessing the web client are not in a network domain. Is there any other way I can do in C/AL code so that I do not need to add the user in every clients folder.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Unable to save the file from web client in required directory.

    No need to give all user the permissions to that folder. Just give the permission to IIS_IUSR (IIS worker role) and to the service account under which NAV service runs.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans