NAS cannot see mapped drive
b2amol
Member Posts: 64
Hi,
I have a web application running from NAS. There is a file browse function on it, which does not work without supplying UNC path for a file to be uploaded.
Is there any way to store a mapping for a drive-letter within NAV and that can provide path to NAS?
Thanks,
Amol
I have a web application running from NAS. There is a file browse function on it, which does not work without supplying UNC path for a file to be uploaded.
Is there any way to store a mapping for a drive-letter within NAV and that can provide path to NAS?
Thanks,
Amol
0
Comments
-
Your NAV (?) solution can't handle UNC :?: Does i understood this correct?
U can only use mapped drives on your NAS service machine????
I cant belive that, because i also use NAS and UNC!
Maybe you have a security problem, that the windows user of the NAS serice doesn't have permissions to connect to this drive.
So check the permissions.
so, this could help also (as a little tip):
viewtopic.php?f=5&t=22930Do you make it right, it works too!0 -
I suspect the problem he's got is a windows user problem. Many users don't get the idea of UNC paths and if a user has to enter a path for the NAS this is a problem.
Drive mappings are not shared between security areas, different users and different sessions have different sets of mapped drives. In general this means a NAS will only have the drives it maps for itself.
This can be done two main ways ways ... firstly a command line. Get the NAS to run the commandnet use X: \\host\share
Drive X: should then be available to the NAS.
The second is to either run directly or translate into Navision COM manipulation this vbscriptSet WshNetwork = WScript.CreateObject("WScript.Network") Set AllDrives = WshNetwork.EnumNetworkDrives() Set FSO = CreateObject("Scripting.FileSystemObject") MapDrive "X:", "\\host\share" Function MapDrive(DriveLetter, DrivePath) Dim f Set f = FSO.GetFolder(DrivePath) If not f is Nothing then UnMapDrive(DriveLetter) Set AllDrives = nothing Set AllDrives = WshNetwork.EnumNetworkDrives() AlreadyConnected = False For i = 0 To AllDrives.Count - 1 Step 2 If AllDrives.Item(i) = DriveLetter Then AlreadyConnected = True Next If AlreadyConnected = False then WShNetwork.MapNetworkDrive DriveLetter, DrivePath, False End if End if End Function Function UnMapDrive(DriveLetter) For i = 0 To AllDrives.Count - 1 Step 2 If AllDrives.Item(i) = DriveLetter Then WShNetwork.RemoveNetworkDrive DriveLetter Next End FunctionI've been lucky, for me the users have been fine with 'use local drives only' or 'use UNC paths'.Robert de Bath
TVision Technology Ltd0 -
Thank you Robert,
I have some problem executing this
I am trying out this:
Using command:
nassql.exe appservername=ServerName, nettype=tcp, servername=SeverName, database=dbName, company=CompanyName, startupparameter=Parameter1, startuppar
ameter=Parameter2, objectcache=8000, net use X: \\host\share
but i get error: Program Property 'net use X: \\host\share' is unknown. Could you please explain where to run net use?
Thanks,
Amol0 -
Hmm, that's an interesting interpretation.
Try the mapdrive function in this, put a call to it somewhere like CU1 trigger 99.OBJECT Report 60101 Map Drive { OBJECT-PROPERTIES { Date=12/04/10; Time=20:07:24; Modified=Yes; Version List=; } PROPERTIES { ProcessingOnly=Yes; OnPreReport=BEGIN MapDrive('\\vmbackup\backup'); END; } DATAITEMS { } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { PROCEDURE MapDrive@1000000000(UNC@1000000001 : Text[1024]); VAR WSH@1000000000 : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{72C24DD5-D70A-438B-8A42-98424B88AFB8}:'Windows Script Host Object Model'.WshShell"; WindowStyle@1000000002 : Integer; WaitOnRun@1000000003 : Integer; CmdString@1000000004 : Text[1024]; BEGIN IF EXISTS('X:\NUL') THEN EXIT; CmdString := 'net use X: ' + UNC; CREATE(WSH); WindowStyle := 1; // 1 = Normal, 2 = Minimise, 3 = Maximise WaitOnRun := 1; WSH.Run(CmdString, WindowStyle, WaitOnRun); MESSAGE('Mapped'); END; BEGIN END. } }Robert de Bath
TVision Technology Ltd0 -
Hello Robert,
That is Excellent! :thumbsup: That solved my problem, and I have a shared drive visible to NAS now.
Thank you for your help!
Amol0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 329 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