Wednesday, February 10, 2016

Download Windows Server 2012 R2 Evaluation

I recently had to download an evaluation version of Windows Server 2012 R2 and soon ended up in an infinite loop attempting to download the ISO image from Microsoft TechNet here: https://msdn.microsoft.com/en-us/windowsserver2012r2


Fortunately, I ended up at this link which ACTUALLY allowed me to download the evaluation ISO image of Windows Server 2012 R2: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2

Where is the Global Assembly Cache?

I recently had to install some assemblies into the Global Assembly Cache so I needed to figure out where to put my assemblies in the GAC!

Interestingly enough, there are 2 locations for the Global Assembly Cache:

In the case of .NET Framework 4.0 and 4.5, there are x86 and x64 subfolders.  In addition, when installing assemblies into the GAC, you need to use the appropriate version of gacutil.exe as noted here: http://samirvaidya.blogspot.com/2016/02/where-is-gacutilexe.html

Where is gacutil.exe?

If you are looking for gacutil.exe, you may have noticed that it no longer ships natively with the .NET Framework and instead ships separately with the Microsoft Windows SDK.

Depending on what OS you are running will determine what version of the Microsoft Windows SDK you will want to install, but for this example, I will use the Microsoft Windows SDK for Windows 7 and .NET Framework 4: https://www.microsoft.com/en-us/download/details.aspx?id=8279

One of the confusing things about this version of the Microsoft Windows SDK is that it ships with 2 versions of gacutil:

  • gacutil.exe for .NET Framework v. 3.5
  • gacutil.exe for .NET Framework v. 4.0
If you use the default location for gacutil.exe, you will be using the .NET Framework v. 3.5 version:

  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\gacutil.exe
  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\gacutil.exe 

However, the location of gacutil.exe for .NET Framework v. 4.0 is located here:

  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\gacutil.exe
  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x64\gacutil.exe
Therefore, if you are targeting .NET Assemblies for .NET 3.5 and .NET 2.0, then you will want to use the older version of gacutil.exe, but if you are targeting .NET Assemblies for .NET 4.0 and .NET 4.5, then you will instead want to use the newer version of gacutil.exe to target these assemblies.

If you accidentally use an older version of gacutil.exe against a newer .NET assembly (ex. gacutil.exe for .NET 3.5 against a .NET 4.0/4.5 assembly), you will encounter the following error message:

"Failure adding assembly to the cache:  This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

If you are interested in the other Windows SDKs, you can check them out here:

Connecting to an Oracle database using Oracle Client

If you have to connect to an Oracle database, you will need to know how to configure the Oracle Client in order to connect to the Oracle databases.

The process consists of 2 parts:

  1. Configuring an Oracle Listener
  2. Configuring 1 or more Net Service Names 

First up, I will demonstrate how to configure the Oracle Listener:








Once you have the Oracle Listener up and running, you then have to configure your Local Net Service Name (for your tnsnames.ora file):

















While configure the Local Net Service Name and testing the connection, you may have to change the login credentials by using the "Change Login" dialog.

Once you have done that, you still need to configure the Data Sources in the ODBC Data Sources section (odbcad32):








 When configuring your ODBC Data Source, you will need to use the TNS Service Name (Local Net Service Name) that you configured earlier.

Finally, you can use an Oracle connection string such as one of the following to connect to your Oracle database instance! (The name of your Data Source is the name of your ODBC DSN): http://www.connectionstrings.com/oracle/


Friday, February 5, 2016

SharePoint 2016 Release Candidate released!

SharePoint Server 2016 Release Candidate has been released!  Unfortunately, unlike earlier releases, it is not a complete installation release but rather a patch on top of SharePoint Server 2016 Beta 2.

Therefore, you will first need to download and successfully install SharePoint Server 2016 Beta 2 and then apply the Release Candidate Patch on top of the Beta 2 installation.

You can read more about the SharePoint 2016 Release Candidate in the links below:

https://blogs.office.com/2016/01/20/sharepoint-server-2016-and-project-server-2016-release-candidate-available/

https://technet.microsoft.com/en-us/library/mt346121(v=office.16).aspx

http://www.computerworld.com/article/3027969/web-apps/how-to-install-microsoft-sharepoint-server-2016-rc.html

Finally, you can download SharePoint Server 2016 Release Candidate (Patch) from here: https://www.microsoft.com/en-us/download/details.aspx?id=50737

Monday, February 1, 2016

Profiling your .NET Applications with Visual Studio 2015

It seems that with every new release of Visual Studio, Microsoft changes how you perform various operations.  In the case of Visual Studio 2015, Visual Studio 2015 is not the exception.

In particular, performing profiling in Visual Studio 2015 has changed from how you used to perform profiling in Visual Studio 2013.

In Visual Studio 2015, Profiling capabilities are now found beneath the Debug menu:





Once you have that in place, you have to set up your Profiling settings via Performance Explorer:


You then go into the Property Pages for the Performance Session in order to turn on Instrumentation:


You can read more details about how to exactly instrument and profile your application here: https://msdn.microsoft.com/en-us/library/dd264993.aspx