-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Check RootPageNamespace, PageAssembly, the page namespace, class name, and BasePage inheritance. / requires a Default class. Normal type lookup is case-insensitive, but the class must be in the configured assembly.
If the URL is data-driven, configure OnNotFound and return the page type. Return null for paths it does not own.
Property names are case-sensitive. The property must be public and writable, and its type/value must be supported. Enum values are case-sensitive and must name a defined enum member. Invalid values are ignored rather than reported; validate required input explicitly.
The page or reusable layout resource name is wrong or the file is not embedded. Confirm the .csproj EmbeddedResource item and inspect:
typeof(Program).Assembly.GetManifestResourceNames()[PageTemplate] needs the full manifest name. Template.Site looks beneath RootTemplateNamespace for Site.htm.
Templates must be well-formed XML, not permissive HTML. Close elements, quote attributes, escape ampersands, and keep exactly one root (PageTemplate or Template).
The method must be public, on the page type, and named exactly after Dynamic.Name. Its signature is Task Name(TextWriter, DynamicContentArgs). Loop sources are public parameterless methods returning IEnumerable.
Resources are embedded at build time and compiled/cached at runtime. Rebuild and restart the process. Hot reload of the source .htm file does not replace an already embedded resource.
Register UseStaticFiles() before UseImp(). Confirm the asset is under the configured web root and its URL is correct.
[SecurePage] requires an Authenticate callback. Also ensure UseAuthentication() runs before Imp and the callback returns false for unauthenticated users.
Imp does not validate tokens automatically. Register AddAntiforgery, render a token, and call ValidateRequestAsync inside every state-changing postback.
Use Imp 0.1.1 or later. The response writer was changed to remain asynchronous for modern Kestrel. Do not enable AllowSynchronousIO as a workaround unless unrelated legacy code requires it and the risk is understood.
Imp is terminal and does not invoke the next delegate. Move required middleware before Imp or use an explicit branched pipeline.
Include Imp/package and .NET versions, OS, minimal page/template, path/query, full exception/stack trace with secrets removed, and whether the issue reproduces in the Todo sample. File reports at KitchenPC/Imp issues.
Imp is MIT licensed. See the source and Todo sample on GitHub.
Imp
Templates
Application integration
- Forms and antiforgery
- Dependency injection
- Authentication and secure pages
- Static assets and CDN paths
- Configuration reference
Help and reference