![]() | Register and configure component on startup application |
In your web application startup you must register and configure ASDSoft.WebSigner component.
Configure component
For configuration component you can create instance of StartupSettings and set a properties.
Register component
For registration component you can call static method InitializeStatic(StartupSettings) with configuration parameter.
protected void Application_Start(object sender, EventArgs e) { WebSigner.Server.AspNet.Startup.InitializeStatic( new WebSigner.Server.AspNet.StartupSettings("[My app friendly name]", new MySigner()) { CachePersistor = null, CertificateAuthenticationProvider = null, AuthenticationPersistor = null, GlobalConfigurationCallback = null, HelpCssUrl = null, LogoBitmap = null }); }
public void ConfigureServices(IServiceCollection services) { services .AddMvc() .AddAsdWebSigner<MySigner>(); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseStaticFiles(); app.UseRouting(); app.UseAsdWebSigner(new StartupSettings("[My app friendly name]", null) { CachePersistor = null, CertificateAuthenticationProvider = null, AuthenticationPersistor = null, HelpCssUrl = null }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }