Zongsoft.Web
7.18.0
dotnet add package Zongsoft.Web --version 7.18.0
NuGet\Install-Package Zongsoft.Web -Version 7.18.0
<PackageReference Include="Zongsoft.Web" Version="7.18.0" />
<PackageVersion Include="Zongsoft.Web" Version="7.18.0" />
<PackageReference Include="Zongsoft.Web" />
paket add Zongsoft.Web --version 7.18.0
#r "nuget: Zongsoft.Web, 7.18.0"
#:package Zongsoft.Web@7.18.0
#addin nuget:?package=Zongsoft.Web&version=7.18.0
#tool nuget:?package=Zongsoft.Web&version=7.18.0
Zongsoft.Web Web Library
Overview
Zongsoft.Web is the Web library in the Zongsoft open-source framework. It provides functionality for ASP.NET application development.
It is the framework's ASP.NET Core integration layer: service-oriented controllers, model binding and JSON formatting, credential authentication, controller metadata, file endpoints, SignalR discovery, and multi-site configuration. Add Zongsoft.Plugins.Web when the application is assembled from plugin manifests.
Concepts
- A service controller projects an
IDataService<TModel>as HTTP operations while retaining filtering, sorting, paging, validation, and authorization semantics. - A controller descriptor gives tooling a stable view of modules, services, routes, operations, and parameters derived from MVC's application model.
- A binder converts compact HTTP values such as ranges, mixtures, booleans, paging, and sorting into framework abstractions.
- A site describes a logical web site and its hosts; it is configuration metadata, not another ASP.NET server.
See the ASP.NET Core MVC overview for the underlying request model.
Installation
dotnet add package Zongsoft.Web
Real Controller: Discussions Forums
ForumController exposes the forum domain service over HTTP. This excerpt contains its declaration and moderator-query action, not invented models or the complete source file:
[ControllerName("Forums")]
public class ForumController : ServiceController<Forum, ForumService>
{
[ActionName("Moderators")]
[HttpGet("{id}/[action]")]
public IEnumerable<UserProfile> GetModerators(ushort id)
{
return this.DataService.GetModerators(id, this.Request.Headers.GetDataSchema());
}
}
Models come from Discussions Models and the service from ForumService. The base provides standard operations according to service capabilities; the derived controller adds forum-specific actions. GetDataSchema() passes the request schema to the service.
Deploy the complete domain and Web plugins and configure data, security and site dependencies before calling these actions; do not construct drivers in controllers. See the real Plugins.Web use case for composition and request templates.
💡 Final routes combine module ownership, ControllerName, the base [area]/[controller] route and action templates. Use source, existing .http requests and host descriptors instead of inventing a product API.
HTTP Conventions
WebUtility.Paginate writes paging metadata to response headers. The JSON formatters use the framework serializer. Binders understand Paging, Sorting, Range<T>, Mixture<T>, booleans, and time spans; invalid input is reported through MVC model state.
Register the credential scheme through ASP.NET authentication:
builder.Services
.AddAuthentication()
.AddCredentials();
AuthorizationAttribute and AuthorizationConvention connect operations to framework authorization metadata. Credential issuance and privilege services live in Zongsoft.Security.
🚨 Authentication identifies a caller; it does not authorize every endpoint. Configure policies explicitly, and never log raw credentials or place them in query strings.
Files, SignalR, and Extension Points
WebFileAccessor and the built-in file/directory controllers expose framework file systems over HTTP; constrain roots, permissions, sizes, and media types before enabling them. SignalR discovery identifies Hub implementations for plugin-aware hosts. Host and site collections provide matching metadata through IWebEnvironment.
Extension points include the generic service controllers, MVC conventions, binders, formatters, filters, credential options, web host/site abstractions, and ControllerServiceDescriptor metadata.
Related Resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Zongsoft.Core (>= 7.59.0)
-
net8.0
- Zongsoft.Core (>= 7.59.0)
-
net9.0
- Zongsoft.Core (>= 7.59.0)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Zongsoft.Web:
| Package | Downloads |
|---|---|
|
Zongsoft.Plugins.Web
This is a framework about plugin web application development. |
|
|
Zongsoft.Security.Web
This is a web class library about security development. |
|
|
Zongsoft.Externals.Wechat.Web
This is a web api library about Wechat. |
|
|
Zongsoft.Intelligences.Web
This is a web class library about artificial intelligence development. |
|
|
Zongsoft.Discussions.Web
This is a web class library about discussions. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.18.0 | 105 | 9/27/2026 |
| 7.17.0 | 105 | 9/18/2026 |
| 7.16.0 | 183 | 8/13/2026 |
| 7.15.2 | 111 | 8/12/2026 |
| 7.15.1 | 125 | 8/8/2026 |
| 7.15.0 | 179 | 6/17/2026 |
| 7.14.0 | 142 | 5/26/2026 |
| 7.13.0 | 135 | 5/25/2026 |
| 7.12.0 | 272 | 3/12/2026 |
| 7.11.1 | 175 | 2/13/2026 |
| 7.11.0 | 175 | 2/11/2026 |
| 7.10.1 | 162 | 1/21/2026 |
| 7.10.0 | 179 | 1/19/2026 |
| 7.9.1 | 171 | 1/13/2026 |
| 7.8.0 | 343 | 12/24/2025 |
| 7.7.12 | 729 | 12/1/2025 |
| 7.7.11 | 303 | 11/26/2025 |
| 7.7.10 | 452 | 8/29/2025 |
| 7.7.9 | 489 | 8/26/2025 |