SAIF.Services.Web architecture¶
SAIF.Services.Web is a minimal utility class library consisting of a single hand-written class, RemotePost, that performs a server-side HTTP POST redirect (auto-submitting HTML form) from an ASP.NET web application to a target URL. It is not a BOF business object library, contains no IBusinessCriteria or data access, and enforces no business rules.
Responsibilities¶
- Accumulate name/value pairs (
AddInput) to be rendered as hidden form fields. - Emit a minimal auto-submitting HTML
<form>(Post) that POSTs the accumulated fields to a configured targetURL, then terminate the current ASP.NET response. - Provide a browser-redirect-via-auto-submitting-form bridge for forwarding a user with POST-body parameters to another application/site (e.g., a payment gateway or another SAIF web application) where a plain HTTP redirect (GET-only) would not carry the required data.
Component boundaries¶
RemotePost: the library's sole substantive type. Implicit baseSystem.Object; not a BOF business object (noclsBusinessBase/clsBusinessCollectionBaseinheritance, noIBusinessCriteria).- VB "My Project" scaffolding (
Application.Designer.vb/.myapp,Resources.Designer.vb/.resx,Settings.Designer.vb/.settings): auto-generated, no custom logic, no defined settings or resources.
Interaction model¶
RemotePost.Post()operates directly against the ASP.NET pipeline viaHttpContext.Current: it clears the current response (Response.Clear()), writes an HTML document containing a hidden<form>(name defaults to"form1", overridable viaFormName) with one hidden<input>per name/value pair added viaAddInput, and a<body onload="document.<FormName>.submit()">handler that auto-submits the form on page load in the browser, then callsResponse.End().- Because it depends on
HttpContext.Current,RemotePostcan only be used from within an active ASP.NET web request context — it is not usable from a console/service host without one. - Despite the project declaring an extensive NuGet dependency graph (
SAIF.BOF.Framework,SAIF.Web.API.Clients,Oracle.ManagedDataAccess,RestSharp,Newtonsoft.Json), none of these are referenced byRemotePost.vb— the declared dependency footprint significantly exceeds the library's actual code surface.*
The following diagram shows the high-level interaction between a calling web application and RemotePost.
flowchart TD
A[Calling ASP.NET page/handler] -->|AddInput name,value| B[RemotePost]
B -->|Post| C[HttpContext.Current.Response]
C -->|auto-submitting HTML form| D[Browser]
D -->|HTTP POST| E[Target URL<br>e.g. payment gateway]
The following diagram shows the primary request/response sequence for a remote POST redirect.
sequenceDiagram
participant Caller
participant RemotePost
participant Response as HttpContext.Current.Response
participant Browser
participant Target as Target URL
Caller->>RemotePost: New RemotePost(); AddInput(name, value) (repeated)
Caller->>RemotePost: URL = targetUrl
Caller->>RemotePost: Post()
RemotePost->>Response: Clear()
RemotePost->>Response: Write(auto-submit HTML form)
RemotePost->>Response: End()
Response-->>Browser: HTML with hidden form
Browser->>Target: HTTP POST (form fields)
Design constraints¶
RemotePost.Post()writes caller-suppliedName/Valuepairs directly into HTML<input>attribute values viaString.Formatwith no HTML-encoding — a potential output-encoding/HTML-injection concern for callers that pass untrusted values.*- The library targets
.NET Framework 4.6.2and is packaged/consumed exclusively as a NuGet package (SAIF.BOF.Services.Web), not via local project references. Web.config/App.configregister only the OracleDbProviderFactoriesprovider factory; no application-specific<appSettings>are read by this library's code.- No cached inherited framework context is required or referenced for this library —
RemotePostdoes not inherit any SAIF framework base class.
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Services\SAIF.Services.Web\RemotePost.vbServices\SAIF.Services.Web\SAIF.BOF.Services.Web.vbprojServices\SAIF.Services.Web\Web.configServices\SAIF.Services.Web\App.config