Overview
RDP (Remote Desktop Protocol) files are configuration files that tell the Microsoft Remote Desktop client how to connect to a RemoteApp or desktop session. RDSWeb Custom dynamically generates these files with user-specific settings, gateway configuration, and security parameters.RDP File Format
RDP files use a simple key-value format:- Each line:
key:type:value - Types:
i(integer),s(string),b(binary) - Line endings:
\r\n(Windows CRLF)
RemoteApp RDP Generation
When a user clicks on an application, RDSWeb Custom generates a custom RDP file:Example Generated File
Desktop RDP Generation
For full desktop sessions, the configuration differs:Key Configuration Parameters
Display Settings
| Parameter | RemoteApp | Desktop | Description |
|---|---|---|---|
screen mode id | 1 | 2 | 1=Windowed, 2=Full screen |
desktopwidth | 1024 | 1920 | Window/screen width |
desktopheight | 768 | 1080 | Window/screen height |
session bpp | 32 | 32 | Color depth (bits per pixel) |
Connection Settings
RD Gateway Configuration
0- Do not use gateway1- Always use gateway2- Use gateway if direct connection fails3- Use default gateway settings4- Do not use gateway (bypass for local)
Authentication
0- No authentication required (insecure)1- Server authentication required2- Server authentication attempted3- Server authentication required with NLA (most secure)
RemoteApp Configuration
||ALIAS- Published RemoteApp (via RDCB)C:\Program Files\...- Direct executable path%ProgramFiles%\...- Environment variable expansion
Resource Redirection
Session Timeout
Performance Optimization
- Desktop composition and font smoothing improve appearance but use bandwidth
- Disable for slow connections
- Enable for LAN connections
API Endpoint
The frontend requests RDP files via:Client Compatibility
Windows
Microsoft Remote Desktop Connection (mstsc.exe)- Built into Windows
- Full support for all RDP features
- Double-click
.rdpfile to launch
macOS
Microsoft Remote Desktop (App Store)- Download from Mac App Store
- Supports RemoteApps and RD Gateway
- Import
.rdpfiles via File > Import
Linux
FreeRDP- GUI RDP client for Linux
- Import RDP files via File > Import
iOS/Android
Microsoft Remote Desktop (Mobile)- Available on App Store and Google Play
- Limited RemoteApp support (varies by version)
- Better for desktop sessions
Security Considerations
Network Level Authentication (NLA)
- Authentication before session establishment
- Protection against man-in-the-middle attacks
- Reduced server load from unauthenticated connections
RD Gateway
Using an RD Gateway:- Encrypts all traffic over HTTPS (TLS)
- Eliminates need to expose RDP port 3389
- Provides centralized access control
- Enables multifactor authentication
Credential Handling
- Username is pre-filled (convenience)
- Password is never included in RDP file
- User must enter password when launching
- Credentials can be saved by RDP client (user choice)
Drive Redirection
- Prevents data exfiltration from client to server
- Reduces attack surface
- Recommended for public/untrusted devices
Troubleshooting
Connection Fails
Check:- Server address:
full address:s:SRV-APPS.LAB-MH.LOCAL - Gateway hostname:
gatewayhostname:s:rdgateway.lab-mh.local - Network connectivity to gateway
- Firewall allows HTTPS (443) to gateway
Authentication Errors
Common issues:- Wrong username format (should be
DOMAIN\username) - User not authorized for RemoteApp collection
- NLA not enabled on RD Session Host
RemoteApp Not Found
Verify:- Application is published with correct alias
- User has permission to access the app
- Collection name matches RDCB configuration
Session Timeout
If sessions disconnect too quickly:- RDP file timeout value
- Server-side timeout policies (GPO)
- Idle timeout vs. session timeout
Advanced Customization
Command-Line Arguments
Pass arguments to RemoteApps:Multi-Monitor Support
USB Redirection
- Windows Server 2012 R2 or later
- RemoteFX USB Redirection enabled
Configuration Reference
RDP generation is configured via environment variables:Next Steps
- Learn about Session Modes and timeout behavior
- Understand Authentication and user credentials
- Explore the RemoteApp Catalog system