ASP.NET WebForms #42
-
|
Hello! Is it possible to implement KissLog in a WebForms ASP.NET application? Probably not, cause i've not seen any specification of how to do this in the docs, but i wanted to confirm that here 🙂 |
Beta Was this translation helpful? Give feedback.
Answered by
catalingavan
Jul 22, 2021
Replies: 1 comment 2 replies
-
|
Hi Victor, Yes, KissLog works on AspNet WebForms as well :) The install instructions are similar to AspNet MVC.
<configuration>
<appSettings>
<add key="KissLog.OrganizationId" value="_replace_with_your_value_" />
<add key="KissLog.ApplicationId" value="_replace_with_your_value_" />
<add key="KissLog.ApiUrl" value="https://api.kisslog.net" />
</appSettings>
</configuration>
namespace WebApplication1
{
public class Global : HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
ConfigureKissLog();
}
private void ConfigureKissLog()
{
RegisterKissLogListeners();
}
private void RegisterKissLogListeners()
{
// register KissLog.net cloud listener
KissLogConfiguration.Listeners.Add(new RequestLogsApiListener(new Application(
ConfigurationManager.AppSettings["KissLog.OrganizationId"],
ConfigurationManager.AppSettings["KissLog.ApplicationId"])
)
{
ApiUrl = ConfigurationManager.AppSettings["KissLog.ApiUrl"]
});
}
// register HttpModule
public static KissLogHttpModule KissLogHttpModule = new KissLogHttpModule();
public override void Init()
{
base.Init();
KissLogHttpModule.Init(this);
}
}
}KissLog.AspNet.Web NuGet package is unlisted and it can only be installed from the Package Manager Console. I will update the Install Instructions and add AspNet WebForms as well. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
catalingavan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Victor,
Yes, KissLog works on AspNet WebForms as well :) The install instructions are similar to AspNet MVC.
web.config