A real-time chat application built with ASP.NET Core SignalR and WPF, featuring a modern client-server architecture for instant messaging.
This project consists of two main components:
- ChatServer: ASP.NET Core 8.0 web application with SignalR hub
- ChatClient: WPF desktop application (.NET Framework 4.8) with a modern UI
- Real-time bidirectional communication using SignalR
- User registration and connection management
- Thread-safe user tracking with
ConcurrentDictionary - CORS enabled for cross-origin connections
- Automatic reconnection support
- Modern, styled WPF interface with custom controls
- Real-time message delivery with timestamps
- User list showing all connected participants
- Typing indicators (shows when other users are typing)
- Audio notification on new messages
- Username validation (prevents duplicate names)
- Auto-scroll chat display
- Enter key support for quick actions
Server:
- .NET 8.0
- ASP.NET Core
- SignalR
- Swagger/OpenAPI
Client:
- .NET Framework 4.8
- WPF (Windows Presentation Foundation)
- SignalR Client
- Custom styled controls with rounded corners
- Visual Studio 2022 or later
- .NET 8.0 SDK
- .NET Framework 4.8 Developer Pack
- Start the Server:
cd ChatServer dotnet run The server will start at https://localhost:7045 - Start the Client:
- Open the solution in Visual Studio
- Set ChatClient as startup project
- Press F5 to run
- Or build and run the executable from ChatClient/bin/Debug
- Using the Chat:
- Enter a unique username in the name field
- Click "Connect" or press Enter
- Type messages in the message field
- Click "Send" or press Enter to send messages
- Watch the user list to see who's online
- See typing indicators when others are typing
ChatServer/
├── ChatServer/ # ASP.NET Core server application
│ ├── # SignalR hub implementation
│ ├── # Server configuration and startup
│ └── appsettings.json # Server configuration
│
└── ChatClient/ # WPF desktop client
├── # UI layout with custom styling
├── # Client logic and SignalR connection
└── Sounds/ # Notification sound filesThis is a demonstration project for learning SignalR and real-time communication.