The host file block fix is a "band-aid." It stops the bleeding (connectivity loss) but doesn't heal the wound (underlying network/DNS issues). Use it for immediate downtime recovery, but ensure your IT department investigates the root cause of the DNS resolution failure later.
The "host file block fix" is a common workaround used in SOLIDWORKS PDM to resolve connectivity issues when a client machine cannot communicate with the server due to DNS resolution failures. This process involves manually mapping the server's IP address to its name in the Windows hosts file to bypass the network's DNS. When to Use This Fix You should apply this fix if you encounter errors such as: "Ping request could not find host".
"Could not log in to the database" specifically due to server name resolution issues.
PDM connectivity tests fail when trying to reach the Archive or Database server. Step-by-Step Instructions Open Notepad as Administrator Click the Start menu and type Notepad. Right-click Notepad and select Run as Administrator. Navigate to the Hosts File In Notepad, go to File > Open.
Navigate to the following path: C:\Windows\System32\drivers\etc\.
Crucial Step: In the bottom-right corner of the open dialog, change the file type filter from Text Documents (*.txt) to All Files (.) so the hosts file becomes visible. Edit the File Scroll to the bottom of the file.
On a new line (underneath any existing lines), enter the IP address of your PDM server, followed by a Tab space, and then the Server Name. Example: 192.168.1.100 MyPDMSeverName
If your Archive and Database servers are on the same machine, you only need one entry. Save and Flush DNS Select File > Save and close Notepad. Open the Command Prompt (type cmd in the Start menu).
Type ipconfig /flushdns and press Enter to ensure Windows recognizes the new manual mapping immediately.
Resolving SOLIDWORKS Connection Issues via Local Hosts File Modifying the local Windows hosts file
is a common troubleshooting step when SOLIDWORKS PDM or License Manager cannot connect to a server due to DNS or name-resolution failures. This workaround directs your computer to the correct server IP address by bypassing standard network lookups. 1. Identify Connection Requirements Before editing, ensure you have the server’s IP address exact server name used by your organization. Standard Ports: Ensure your firewall allows communication through ports (License Manager) and (Vendor Daemon). 2. Access the Hosts File with Administrative Rights Windows protects the hosts file; you must use Administrator privileges to save any changes. Right-click Notepad and select Run as Administrator In Notepad, go to File > Open Navigate to: C:\Windows\System32\drivers\etc\ Change the file filter from "Text Documents (*.txt)" to to see the 3. Apply the Fix
Add a new entry at the bottom of the file following this format: [IP Address] [TAB] [Server Name] 192.168.1.100 MySWServerName Single Server Note:
If your Archive and Database servers share one machine, only one line is needed. Save the File: File > Save and close Notepad. 4. Verify the Connection
After saving, clear your local cache to ensure the new settings take effect immediately. Command Prompt ipconfig /flushdns PDM Connectivity Test Tool or a simple ping [Server Name] to confirm the connection is active. Troubleshooting Host File "Blocks" If you cannot save the file even as an administrator: Antivirus Interference: Software like SentinelOne solidworks host file block fix
may "lock" the hosts file. Disable "Lock Hosts File" in your antivirus advanced settings before editing. Read-Only Attribute: Right-click the file, select Properties , and ensure is unchecked. File Extensions: Ensure the file is named exactly extension.
Fixing "SolidWorks host file block" issues typically involves unblocking the Windows hosts file from security software or manually editing it to resolve server connection problems. This common technical hurdle often prevents SolidWorks PDM or license managers from communicating with their servers. Common Causes for Host File Blocks
Antivirus/Security Software Interruption: Programs like SentinelOne, ZoneAlarm, and Webroot often lock the hosts file to prevent unauthorized modifications by malware.
File Permissions: The hosts file may be set to "Read-only" or requires administrative privileges to modify.
DNS Resolution Failure: When a network cannot translate server hostnames to IP addresses, the system may need a manual override in the hosts file. Step 1: Unblock the Hosts File from Security Software
Before editing, ensure your security suite is not actively blocking access to C:\Windows\System32\drivers\etc\hosts.
Webroot: Go to settings and uncheck "Prevent any program from modifying the HOSTs file".
ZoneAlarm Firewall: Navigate to Advanced Settings and uncheck "Lock Hosts File".
SentinelOne: A Security Exclusion Policy must be created via the management console to allow writes to the file. Step 2: Clear "Read-Only" Attributes
If the file remains inaccessible even after disabling security blocks: Navigate to C:\Windows\System32\drivers\etc. Right-click the hosts file and select Properties.
Uncheck the Read-only attribute at the bottom of the General tab and click Apply. Step 3: Manually Edit the Hosts File for Server Connection
For SolidWorks PDM or network licenses to work when DNS fails, you must manually point the machine to the correct server IP.
Launch Notepad as Administrator: Search for Notepad in the Start Menu, right-click it, and select Run as Administrator. The host file block fix is a "band-aid
Open the File: In Notepad, go to File > Open. Navigate to C:\Windows\System32\drivers\etc\. Ensure the file type filter in the bottom right is set to All Files (.) so the extensionless hosts file appears.
Add Server Entries: Scroll to the bottom and add a new line for each server using the format: [IP Address] [Server Name]. Example: 192.168.1.100 MyPDMVaultServer Save and Close: Save the file. Do not add a .txt extension.
Flush DNS: Open a Command Prompt and type ipconfig /flushdns to ensure the system recognizes the new manual entries immediately. Step 4: Verify the Fix
After unblocking and editing the hosts file, verify the connection using the PDM Connectivity Test Tool or by attempting to ping the server by name in the Command Prompt. If the connection still fails, check if the FlexNet Licensing Service or SolidWorks Licensing Service are running and set to Automatic in Windows Services.
Are you currently facing a specific error code (like -15,10,10061) when trying to connect to your SolidWorks license?
To resolve SOLIDWORKS connectivity issues, specifically when a client machine cannot communicate with the license or PDM server, modifying the Windows
file is a common and effective workaround. This bypasses DNS resolution issues by manually mapping a server's IP address to its hostname. GoEngineer 🛠️ Step-by-Step Fix: Modifying the Hosts File
Follow these steps to manually "unblock" the connection by defining the host entry: Open Notepad as Administrator menu and type "Notepad". Right-click and select Run as Administrator (this is required to save changes to system files). Navigate to the Hosts File In Notepad, go to File > Open Paste this path into the address bar: C:\Windows\System32\drivers\etc\
Change the file filter (bottom right) from "Text Documents ( .txt)" to **"All Files ( .*)"** to see the Add the Server Entry Scroll to the bottom of the file. On a new line (without a symbol), type the IP Address , press the key, and then type the Server Name 192.168.1.50 SW-SERVER-01 Save and Refresh File > Save Command Prompt (cmd) and type ipconfig /flushdns , then press to clear the DNS cache. GoEngineer 🔍 Why is this fix used?
This method addresses specific communication "blocks" where the software cannot find the server despite being on the same network: DNS Failures:
When your network's DNS server cannot translate a name like "Server01" into its IP address. VPN/Remote Work:
Common for users working from home who need to reach a corporate license server over a VPN. PDM Connection Errors:
Fixes "Could not log into the database" or "Server not found" errors in SOLIDWORKS PDM. SolidWorks Blog ⚠️ Important Considerations Temporary Solution: If your company uses a golden image for
This is generally considered a short-term workaround. If the server's IP address changes, you must update the hosts file again, or the connection will break. Static IPs: Ensure the server has a static IP address
; otherwise, this fix will only work until the server reboots and receives a new IP from the router. Security Software:
Occasionally, aggressive antivirus software may block or revert changes to the hosts file. Ensure your security suite allows these modifications. GoEngineer 💡 Alternative Troubleshooting
If the host file fix does not work, consider these other common "blocks": Firewall Ports: TCP ports 25734 and 25735
(standard for SolidNetWork License) are open on both the server and client firewalls. Ping Test: Open Command Prompt and type ping [ServerName]
. If it fails, there is a deeper network connection issue beyond just name resolution. SolidWorks Blog How would you like to proceed? , or provide instructions for opening specific firewall ports if the connection is still blocked. Top 8 troubleshooting steps for PDM connectivity issues 18 May 2020 —
Note: This draft assumes the "fix" refers to attempting to block SolidWorks license verification servers via the Windows hosts file to bypass licensing (piracy). I have framed this as a warning against that practice.
If your company uses a golden image for Windows deployment, and that image contained a cracked version of SolidWorks two years ago (even if removed), the Hosts file entries are baked into the registry as a scheduled task.
How to find the hidden resurrecting entry:
The user edits the Windows hosts file (located at C:\Windows\System32\drivers\etc\hosts) to manually map the license server's IP address to its hostname.
The logic: Instead of asking the internet or the DNS server "Where is the license server?", SolidWorks checks the host file first. If it finds a match, it goes directly to that IP address. This bypasses DNS lookup errors and broadcast failures.
Contact support or your reseller if:
The Hosts file blocks DNS, but some SolidWorks processes bypass it by using hard-coded IP addresses. You must also block the executable in the firewall.