Web Connection
Template Pathing intentions...
Gravatar is a globally recognized avatar based on your email address. Template Pathing intentions...
  Michael Hogan (Ideate Hosting)
  All
  Oct 29, 2024 @ 06:44am

By default, the current version of WebConnect sets cHTMLPagePath to the path on the development machine for both the wwMaintConfig and wwConfig classes...

cHTMLPagePath = "c:\WebConnectionProjects\MyProject\Web"

Am I to presume that the intention is for my HTML templates be included in the Project build so they are easily referenced using ExpandTemplate without specifying the path, or is it suggested that one or both of those classes be modified for the live application... or perhaps we should define the relative path in code or perhaps an additional property?

I know any of these options are possible, but I am just seeking a 'best practices' recommendation. It's always best to go with the flow to avoid problems with WC updates.

TIA

Gravatar is a globally recognized avatar based on your email address. re: Template Pathing intentions...
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Oct 29, 2024 @ 09:31am

cHtmlPath is no longer used internally by Web Connection except as a fallback to find the Web base path for things like GetApplicationPath() and ResolveUrl() where it's used to resolve ~ in the path. Web Connection internally uses information the Web Server provides (MD_APPL_PATH server variable in IIS) and an internally provided path in the Web Connection .NET Core Web Server.

Apache also doesn't provide a value for this path, and so the old and now deprecated Apache support also relied on that variable.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Template Pathing intentions...
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Oct 29, 2024 @ 09:33am

Gotcha - thanks!

© 1996-2024