Skip to main content

Notifications

Announcements

No record found.

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

  • 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.

  • 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.

    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 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.

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans