简体   繁体   中英

Log IIS http requests into database

I have IIS server used to integrate with external entities, and I need to log the request body into db. I don't want to use IIS out of the box logging as it it will log in file and i need to save it in db in specific schema.

you can use Serilog and use your particular database sink

 app.UseSerilogRequestLogging();

ODBC logging format is a record of a fixed set of data properties in a database that complies with Open Database Connectivity (ODBC), such as Microsoft Access or Microsoft SQL Server?. Some of the items logged include the user's IP address, user name, request date and time (recorded as local time), HTTP status code, bytes received, bytes sent, action carried out (for example, a download carried out by a GET command), and the target (for example, the file that was downloaded). With ODBC logging, you must both specify the database to be logged to, and set up the database to receive the data. Maybe this blog will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM