NAV2016 Upload Temp MSAccess File to Server using CU419
rsaritzky
Member Posts: 469
Hi all,
I'm upgrading a process from NAV2009 Classic that takes a small MSAccess file (.mdb) and uses the JET OLEDB driver to import this data into NAV.
In NAV2016, the process requires (as far as I know) that you create a temporary file on the server and upload the file to that temporary file. Then, the NAV codeunit can find the file.
I'm using "standard" functions in CU419 (File Management) to create the temporary file and upload the file
When I select the .mdb file, I get the following error:
I did a test and renamed the .mdb file to .txt, and it uploaded just fine.
So, my question is if this is a restriction of CU419/NAV, or is this a Windows security type of error that has nothing to do with NAV?
Thanks in advance,
Ron
I'm upgrading a process from NAV2009 Classic that takes a small MSAccess file (.mdb) and uses the JET OLEDB driver to import this data into NAV.
In NAV2016, the process requires (as far as I know) that you create a temporary file on the server and upload the file to that temporary file. Then, the NAV codeunit can find the file.
I'm using "standard" functions in CU419 (File Management) to create the temporary file and upload the file
FileName := FileMgt.OpenFileDialog('Select Access Import File','','All Files (*.*)|*.*');
ServerFileName := FileMgt.UploadFileSilent(FileName);
When I select the .mdb file, I get the following error:
The file that you are trying to create cannot be created. The destination file has an extension that may be blocked. Contact your system administrator.
I did a test and renamed the .mdb file to .txt, and it uploaded just fine.
So, my question is if this is a restriction of CU419/NAV, or is this a Windows security type of error that has nothing to do with NAV?
Thanks in advance,
Ron
Ron
0
Best Answer
-
Hi all,
I found my own answer:
There is a parameter in CustomSettings.config on the server called ClientServicesProhibitedFileTypes which will not allow you to create files with certain extensions.
The default string is:
"ade;adp;app;asp;bat;bas;chm;cmd;com;cpl;csh;exe;fxp;gadget;hlp;hta;inf;ins;isp;its;js;jse;ksh;lnk;mad;maf;mag;mam;maq;mar;mas;mat;mau;mav;maw;mda;mdb;mde;mdt;mdw;mdz;msc;msi;msp;mst;ops;pcd;pif;prf;prg;pst;reg;scf;scr;sct;shb;shs;url;vb;vbe;vbs;vsmacros;vss;vst;vsw;ws;wsc;wsf;wsh"
I removed the "mdb" value from this property and restarted the service tier.
File uploads now OK.Ron0
Answers
-
Hi all,
I found my own answer:
There is a parameter in CustomSettings.config on the server called ClientServicesProhibitedFileTypes which will not allow you to create files with certain extensions.
The default string is:
"ade;adp;app;asp;bat;bas;chm;cmd;com;cpl;csh;exe;fxp;gadget;hlp;hta;inf;ins;isp;its;js;jse;ksh;lnk;mad;maf;mag;mam;maq;mar;mas;mat;mau;mav;maw;mda;mdb;mde;mdt;mdw;mdz;msc;msi;msp;mst;ops;pcd;pif;prf;prg;pst;reg;scf;scr;sct;shb;shs;url;vb;vbe;vbs;vsmacros;vss;vst;vsw;ws;wsc;wsf;wsh"
I removed the "mdb" value from this property and restarted the service tier.
File uploads now OK.Ron0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions