Saturday, December 19, 2015
TMS Dining Nook Assembly Instructions
Thursday, October 15, 2015
Windows 10 – BSOD on resuming from hibernate
After upgrading my machine to Windows 10, I found that after I hibernated by computer, it would always BSOD on resuming with the error: SYSTEM_SERVICE_EXCEPTION (cng.sys). After a whole bit of troubleshooting and nothing working, I found an old post regarding a similar failure on Windows 7. It suggested turning off Hyper-V (via Windows Features).
Turning it off on my Windows 10 machine, seemed to make the BSOD issue go away.
Monday, September 28, 2015
Importing Windows Event Log into SQL Server
LogParser is your friend: http://www.microsoft.com/en-us/download/details.aspx?id=24659
Here is a sample command to import the data into SQL Server:
LogParser -i:EVT "SELECT * into prodEvents FROM c:\temp\prod.evtx" -o:SQL -server:sqlServerName -driver:"SQL Server" -database:testDb -createtable:ON -cleartable:ON -transactionRowCount:-1 -maxstrfieldlen:8000
note: use -username:test -password:test to specify username and password if you need to.
note: I cant seem to find a way around the 8000 character limit in LogParser. So it always truncates at 8000 characters :(
The table definition is:
CREATE TABLE [dbo].[prodEvents](
[EventLog] [varchar](8000) NULL,
[RecordNumber] [int] NULL,
[TimeGenerated] [datetime] NULL,
[TimeWritten] [datetime] NULL,
[EventID] [int] NULL,
[EventType] [int] NULL,
[EventTypeName] [varchar](8000) NULL,
[EventCategory] [int] NULL,
[EventCategoryName] [varchar](8000) NULL,
[SourceName] [varchar](8000) NULL,
[Strings] [varchar](8000) NULL,
[ComputerName] [varchar](8000) NULL,
[SID] [varchar](8000) NULL,
[Message] [varchar](8000) NULL,
[Data] [varchar](8000) NULL
) ON [PRIMARY]
Keep in mind that you can run many SQL like queries directly against the EVT file locally on your machine without importing the data into a table.
Other useful queries:
logparser.exe -i:evt "select * from c:\temp\prod.evtx where timegenerated > '2015-09-01 00:00:00'"
More info:
Useful commands and tips: (for ASP.net, but useful even for Event Logs) https://support.microsoft.com/en-us/kb/910447
Monday, March 30, 2015
Visual Studio rebuilds all projects instead of just the projects referenced by the current project
One of our Visual Studio solutions all of sudden started building all projects in the solution, even when I was trying to build one single project.
I found that Visual Studio allows you to set a flag in the registry that allows you to see more information regarding why it thinks a project is out of date and is trying to build it. The setting is called: U2DCheckVerbosity, which I believe stands for “Up to Date Check” verbosity level. By setting it to a value of 1, you get information in the output window that specifies why VS believes a project is not up to date and is causing it to build.
You can either create the new key manually, or copy the following text into notepad and save it as a REG file and run it.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\General] |
Once thats done, if you look in the output window, you will see messages like:
Project ‘xxxxxx’ is not up to date. Project item ‘some_file_path\log4net.config' has 'Copy to Output Directory' attribute set to 'Copy always'.
I had not realized that “Copy Always” would cause a project to consider itself dirty and had gone through and set it on some config files I had recently added. So it turned out, it was I that was at fault. Fixed the config issue and everything is good now.