Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Articles
Search: 

Mapping a drive to an NT server from Win '95/'98 PC on the internet
John Harvey, January 23, 2000
This is a short article that includes copies of a couple of pages from MS's MSDN on configuring lmhost files for mapping a drive across the internet using tcp-ip. There's also a link to another internet resource that has a great deal of information on this subject. YOU HAVE FOUND THE HOLY GRAIL FOR...
Summary
This is a short article that includes copies of a couple of pages from MS's MSDN on configuring lmhost files for mapping a drive across the internet using tcp-ip. There's also a link to another internet resource that has a great deal of information on this subject. YOU HAVE FOUND THE HOLY GRAIL FOR MAPPING DRIVES FROM '95/'98 MACHINES TO NT SERVERS OVER THE INTERNET!!!
Description
Since so many have asked about this issue, I put this together from MS's MSDN website and also have put an additional link at the bottom of this article. You should be able to connect over the internet with '95/'98 clients unless you have firewall limitations. Those are addressed on the MSDN website as to which ports need to be accessible. Finally, use Windows 2000 it is rock solid and you don't have to mess with all this stuff, you just connect. For that matter Windows NT workstation also works well. John Harvey ********************************************************************** The link to msdn referencing LMHOST FILE CONFIGURATION http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/winresource/dnwinnt/s7e65.htm An excerpt from Microsoft MSDN: Rules for LMHOSTS Use the following rules for entries in LMHOSTS: Each entry should be placed on a separate line. The IP address should begin in the first column, followed by the corresponding computer name. The address and the computer name should be separated by at least one space or tab. NetBIOS names can contain uppercase and lowercase characters and special characters. If a name is placed between double quotation marks, it is used exactly as entered. For example, "AccountingPDC" is a mixed-case name, and "HumanRscSr \0x03" generates a name with a special character. Note With Microsoft networks, a NetBIOS computer name displayed within straight quotation marks that is less than 16 characters long is padded with spaces. If you do not want this behavior, make sure the quoted string is 16 characters long. The pound sign (#) character is usually used to mark the start of a comment. However, it can also designate special keywords, as described in this section. The keywords listed in the following table can be used in LMHOSTS under Windows NT. (LAN Manager 2.x, which also uses LMHOSTS for NetBIOS over TCP/IP name resolution, treats these keywords as comments.) Table 15.1 LMHOSTS Keywords Keyword Description #PRE Added after an entry to cause that entry to be preloaded into the name cache. By default, entries are not preloaded into the name cache but are parsed only after WINS and name query broadcasts fail to resolve a name. The #PRE keyword must be appended for entries that also appear in #INCLUDE statements; otherwise, the entry in #INCLUDE is ignored. #DOM: Added after an entry to associate that entry with the domain specified by . This keyword affects how the Browser and Logon services behave in routed TCP/IP environments. To preload a #DOM entry, you must also add the #PRE keyword to the line. #INCLUDE Forces the system to seek the specified and parse it as if it were local. Specifying a Uniform Naming Convention (UNC) allows you to use a centralized LMHOSTS file on a server. If the server is located outside of the local broadcast area, you must add a mapping for the server before its entry in the #INCLUDE section and also append the #PRE keyword to ensure that it preloaded. #BEGIN_ALTERNATE Used to group multiple #INCLUDE statements. Any single successful #INCLUDE causes the group to succeed. #END_ALTERNATE Used to mark the end of an #INCLUDE statement grouping. \0xnn Support for nonprinting characters in NetBIOS names. Enclose the NetBIOS name in double quotation marks and use \0xnn notation to specify a hexadecimal value for the character. This allows custom applications that use special names to function properly in routed topologies. However, LAN Manager TCP/IP does not recognize the hexadecimal format, so you surrender backward compatibility if you use this feature. Note that the hexadecimal notation applies only to one character in the name. The name should be padded with blanks so the special character is last in the string (character 16). The following example shows how all of these keywords are used: 102.54.94.98 localsrv #PRE 102.54.94.97 trey #PRE #DOM:networking #net group's PDC 102.54.94.102 "appname \0x14" #special app server 102.54.94.123 popular #PRE #source server #BEGIN_ALTERNATE #INCLUDE \\localsrv\public\lmhosts #adds LMHOSTS from this server #INCLUDE \\trey\public\lmhosts #adds LMHOSTS from this server #END_ALTERNATE In the above example: The servers named localsrv and trey are specified so they can be used later in an #INCLUDE statement in a centrally maintained LMHOSTS file. The server named "appname \0x14" contains a special character after the 15 characters in its name (including the blanks), so its name is enclosed in double quotation marks. The server named popular is preloaded, based on the #PRE keyword. Send feedback on this article. Find support options. © 1999 Microsoft Corporation. All rights reserved. Terms of use. ********************************************************************** An additional article on Specifying Remote Servers in LMHOSTS from MSDN Computer names can be resolved outside the local broadcast area if computer name and IP address mappings are specified in the LMHOSTS file. For example, suppose the computer named ClientA wants to connect to the computer named ServerB, which is outside of its IP broadcast area. Both Windows NT computers are configured with Microsoft TCP/IP. Under a strict b-node broadcast protocol, as defined in RFCs 1001 and 1002, ClientA's name query request for ServerB would fail (by timing out), because ServerB is located on a remote subnet and does not respond to ClientA's broadcast requests. So an alternate method is provided for name resolution. Windows NT maintains a limited cache of computer name and IP address mappings, which is initialized at system startup. When a workstation needs to resolve a name, the cache is examined first and, if there is no match in the cache, Windows NT uses b-node broadcast name resolution. If this fails, the LMHOSTS file is used. If this last method fails, the name is unresolved, and an error message appears. This strategy allows the LMHOSTS file to contain a large number of mappings without requiring a large chunk of static memory to maintain an infrequently used cache. At system startup, the name cache is preloaded only with entries from LMHOSTS tagged with the #PRE keyword. For example, the LMHOSTS file could contain the following information: 102.54.94.91 accounting #accounting server 102.54.94.94 payroll #payroll server 102.54.94.97 stockquote #PRE #stock quote server 102.54.94.102 printqueue #print server in Bldg 10 In this example, the server named stockquote is preloaded into the name cache, because it is tagged with the #PRE keyword. Entries in the LMHOSTS file can represent Windows NT Workstation computers, Windows NT Server computers, LAN Manager servers, or Windows for Workgroups 3.11 computers running Microsoft TCP/IP. There is no need to distinguish between different platforms in LMHOSTS. Note The Windows NT tag #PRE allows backward compatibility with LAN Manager 2.x LMHOSTS files and offers added flexibility in Windows NT. Under LAN Manager, the pound sign (#) character identifies a comment, so all characters thereafter are ignored. But #PRE is a valid tag for Windows NT. In the above example, the servers named accounting, payroll, and printqueue would be resolved only after the cache entries failed to match and after broadcast queries failed to locate them. After nonpreloaded entries are resolved, their mappings are cached for a period of time for reuse. Windows NT limits the preload name cache to 100 entries by default. This limit only affects entries marked with the #PRE keyword. If you specify more than 100 entries, only the first 100 #PRE entries are preloaded. Any additional #PRE entries are ignored at startup but are resolved when the system parses the LMHOSTS file after dynamic resolution fails. Finally, you can reprime the name cache by using the nbtstat -R command to purge and reload the name cache, reread the LMHOSTS file, and then insert entries tagged with the #PRE keyword. Use the nbtstat command to remove or correct preloaded entries that might have been mistyped or any names cached by successful broadcast resolution. Send feedback on this article. Find support options. © 1999 Microsoft Corporation. All rights reserved. Terms of use. ********************************************************************** And finally, a great link to a resource on this topic: http://home.att.net/~j.buchan/main.htm John Harvey
John Harvey, Shelbynet.Com
Custom database applications written primarily in Visual FoxPro and other Microsoft tools i.e. Visual Interdev, IE, VBA, VB Script as well as java script. Support for MS Windows NT as well. Web application development using MS Visual FoxPro and West-Wind's Web Connection. We also offer web hosting for VFP or other systems on a computer lease or co-locate basis. Certified Hughes Direcway Satellite Installer. I started with dBase III and jumped ship to FoxBase, never left. I have been on every beta since Dr. Fulton gave us the free copy at Devcon I. I am now a technical consultant with the Memphis Police Department, and also do independent consulting with other compaines like Honeywell, The Justice Network, other police departments, etc. I consult with other companies and developers both locally and nationally and recently started a web hosting service with emphasis on co-locating or leasing NT Servers for Web Connection and VFP. Http://www.shelbynet.com Have Computer, Will Travel
More articles from this author
John Harvey, September 28, 1998
The following code will retrieve your local ip address as well as your hostname, the remote host and remote host ip address. To view additional properties run the program then open the debug window. You would most likely want to remove the public declaration when using this in a class or prg. *...
John Harvey, November 13, 1999
I am posting this because I've seen several questions regarding this issue. Yes, you can use JPG files in a VFP report and also only store the pathname. Here's how: 1. Use a character field or memo to store the path to the image. 2. Drop the picture/activex bound control on the report. 3. ...
John Harvey, January 1, 2001
FoxPro is alive and well! Devcon had many eye opening sessions and the technology is moving forward. I wished this version had been version 3. With all the new wizards and the extensible framework, we should pick up alot of new users. The learning curve coupled with the lack of a built-in framew...