Internet Sellout

Demand Unearned Rewards

December 2013

whats my preferred IP anyway

What is my preferred IP anyway?

Not this:

Set-NetIPAddress -IPAddress xxx.xxx.xxx.xxx -SkipAsSource 1

You can do that in Power Shell on all the IP addresses you don't want to be chosen as your preferred IP address for your windows 2012 machine.

This will tell you what is set:

Netsh int ipv4 show ipaddresses level=verbose

I have read that once you start managing this with Power Shell you will lose information if you try and edit with the GUI.

.NET 4.5.1, IE 11, IIS 8 - oh my

This is not going well...

The page size of asp.net had increased when comparing to 2008 R2 IIS 7.5 ASP.NET 4.0

C:\Windows\System32\Inetsrv\Appcmd.exe  set config -section:httpCompression   -[name='gzip'].staticCompressionLevel:9  -[name='gzip'].dynamicCompressionLevel:4

 All of a sudden they got smaller...

This modified the applicationHost.config file.

Moving MSSQL Databases to Different Partition

I just moved from one Rackspace cloud server to another. The main purpose was to get IIS 8 so I could do TLS/SNI. I got a skimpy partition for the system and the preinstalled SQL Server Web Edition databases were taking up precious space so I moved them with help from this article:

http://technet.microsoft.com/en-us/library/ms345408.aspx

SELECT name, physical_name AS CurrentLocation
FROM sys.master_files
WHERE database_id = DB_ID(N'tempdb');
GO


USE master;
GO
ALTER DATABASE tempdb 
MODIFY FILE (NAME = tempdev, FILENAME = 'K:\Data\tempdb\tempdb.mdf');
GO
ALTER DATABASE tempdb 
MODIFY FILE (NAME = templog, FILENAME = 'K:\Data\tempdb\templog.ldf');
GO

SELECT name, physical_name AS CurrentLocation
FROM sys.master_files
WHERE database_id = DB_ID(N'reportserver');
GO


USE master;
GO
ALTER DATABASE ReportServer 
MODIFY FILE (NAME = ReportServer, FILENAME = 'K:\Data\reporting\ReportServer.mdf');
GO
ALTER DATABASE ReportServer 
MODIFY FILE (NAME = ReportServer_log, FILENAME = 'K:\Data\reporting\ReportServer_log.ldf');
GO

SELECT name, physical_name AS CurrentLocation
FROM sys.master_files
WHERE database_id = DB_ID(N'reportserverTempDB');
GO


USE master;
GO
ALTER DATABASE ReportServerTempDB 
MODIFY FILE (NAME = ReportServerTempDB, FILENAME = 'K:\Data\reporting\ReportServerTempDB.mdf');
GO
ALTER DATABASE ReportServerTempDB 
MODIFY FILE (NAME = ReportServerTempDB_log, FILENAME = 'K:\Data\reporting\ReportServerTempDB_log.ldf');
GO

Don't forget to delete the old tempdb after restart SQL Server and move the reportserver databases when the service is stopped after the commands and before turning SQL Server back on.