# Parse IIS logs in .NET

Parse IIS logs in .NET on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

IISParser

IISParser is a PowerShell module to read IIS logs. It's very fast and easy to use. This module is based on IISLogParser library that does all the heavy lifting.

[View on GitHub](https://github.com/EvotecIT/IISParser) [Visit Website](#) [Releases](https://github.com/EvotecIT/IISParser/releases/tag/IISParser-PowerShellModule.v1.0.2) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/IISParser)

Stars**36**

Forks**6**

Open issues**0**

PowerShell Gallery downloads**224579**

Release**v1.0.2**

Language: C# Updated: 2026-11-23

Curated Examples

Use ParserEngine directly from .NET code.

This pattern is useful when IIS log parsing belongs inside an application, test, or service.

It is adapted from `IISParser.Tests/ParserEngineTests.cs`.

## Example

```csharp
using IISParser;

var logPath = Path.Combine(AppContext.BaseDirectory, "samples", "u_ex230101.log");

using var parser = new ParserEngine(logPath)
{
    MaxFileRecord2Read = 50000
};

foreach (var record in parser.ParseLog())
{
    Console.WriteLine($"{record.Timestamp:o} {record.UriPath} {record.StatusCode}");
}
```

## What this demonstrates

- using the library without PowerShell
- setting a maximum record count for predictable processing
- consuming typed IIS log records

## Source

- [ParserEngineTests.cs](https://github.com/EvotecIT/IISParser/blob/master/IISParser.Tests/ParserEngineTests.cs)

<!-- PowerForge markdown artifact sha256:A1ACAB567776F294DA3349D29228CF6A3344DC06803E9C65E1358A8259D50E78 -->
