Category Archives: .NET

Inland Empire .NET User’s Group Meeting September 24 @ 6:30pm

I’m actually going to try to make this one.  Normally meetings are on Tuesday evenings and I’m busy being the "Soccer Coach” on Tuesday evenings… Looking forward to seeing you there!

Next User Group Meeting

When: Monday, Sep 24, 2012
Where: New Horizons (new location)
Time: 6:30 to 9:30 pm

Special Meeting Date !

"The Business of Software”

We all know how to write great software, but once all the code is written, the unit tests are done, and everything is deployed, now what do you do to make some money? This is an interesting issue for all of us, so come listen to Mindscape co-founder John-Daniel Trask present on the Business of Software.  JD is making a special trip from Wellington, New Zealand to present to several user groups in Southern California, and will be making a special stop in the Inland Empire to talk to us. Please note, this is a special meeting and will be on Monday September 24th.

.NET Framework 4.0 Gacutil.exe (Global Assembly Cache Tool)

Latest gacutil is part of Microsoft Windows SDK for Windows 7 and .NET Framework 4. Remember you can’t use previews version of gacutil (1.1 or 2.0/3.5) to register dll built in framework 4.0.
If you don’t want to install whole SDK you need to copy below files to server, only. Of course you need to install SDK on local machine to be able copy below files to server.
1. Files location: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools
List of files required to gacutil work properly:

  • gacutil.exe
  • gacutil.exe.config
  • 1033\gacutlrc.dll (can be placed in the same dir as gacutil.exe on the server)

Another interesting thing about assembly in 4.0 framework is location of your assembly. Location changed from C:\Windows\assembly\ to C:\Windows\Microsoft.NET\assembly\GAC_MSIL

Remember to unregister assembly you need to use commend:
gacutil /u assemblyname (you can’t use assemplyname.dll)

Additional information:
Understanding The CLR Binder
gacutil MSDN

SharePoint 2007–Enabling .NET 3.5

So you want to use the .NET 3.5 framework in a MOSS site?  Let Visual Studio do the work for you…

  • Start Visual Studio 2008 and create a new ASP.NET Web Application Project, targeting the .NET Framework 2.0
  • Copy the web.config of your SharePoint 2007 site, into the Web Application project in Visual Studio.
  • Open the Project Properties in Visual Studio
  • Select .NET Framework 3.5 in the Target Framework dropdown
  • Now copy the web.config from the Visual Studio Project back to SharePoint.

Gotta love it.

Internet Explorer 7.0 and the Native XMLHTTPRequest Object

If clients turn off ActiveX support on their browser, bad things can happen if you don’t program for it.

The following code:

var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 

would break.  There is now a native XMLHTTPRequest object, similar to what the non-IE browsers do.

var xmlHttp = new XMLHttpRequest();
No ActiveX object is needed.  Here is the code that needs to be added to check the support of the native XMLHTTPRequest object

if (window.XMLHttpRequest)
{
   var xmlHttp = new XMLHttpRequest();
}
else
{
    if (window.ActiveXObject)
    {
        var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
}