Blog of Web Developer Garry Pilkington

(ASP.Net, C#, AngularJs, JavaScript, HTML5 & UWP)

Unless using third party tools, management of IIS Express is pretty limited. For example it is not possible to log to a SQL Server database for later analysis. You can however import the current log files into SQL Server and here I will show you how I go about it. Firstly you need to create the table in SQL Server, however I am going to initially use a temporary table:-These are all the fields that the current version of IIS Express 8.0 uses. However before you import, you need to strip out all comment fields such as those beginning with # symbols. To do this download the Microsoft PrepLog tool; it is an old tool, but still useful for this purpose. Then run the tool on a log file using PrepTool on the command line:-Then finally, do a bulk insert to get it all into SQL ServerNow create a table to import the data to, the only difference here is the addition of an id column. I want an id column because I will be querying it from Entity Framework and for that you need a primary key.Then use a SELECT query to get the data into the final table:-Happy coding.