Eric Pearson

  Home  |   Contact  |   Syndication    |   Login
  11 Posts | 0 Stories | 5 Comments | 31 Trackbacks

News

Article Categories

Archives

Post Categories

Friday, November 25, 2005 #

Man, this sure was a doozy.  My company's product exposes web services via a Cassini-like web server, the types are exposed to the runtime similar to the way remoting objects can be registered.

This was all fine and dandy, but on Windows Server 2003, asp.net libraries do not work if IIS is not installed.  We were about to lose a large business opportunity because this particular government entity required that IIS NOT be installed due to security policies. 

Turns out the ASP.Net component under add/remove programs, which requires the IIS component, uninstalls ASP.Net if not selected.  This can be reversed by running aspnet_regiis.exe -ir efrom the WINDIR\Microsoft.net\framework\v1.1.4322 directory.  This installs asp.net on the system, regardless of whether IIS is installed. 

Although the framework is built to be able to run asp.net outside of IIS, apparantly the creators of Windows Server 2003's component section didn't really care.  Plus, the aspnet_regiis executable is pretty confusing since it does much more than simply register script handlers in IIS.  But, problem solved.


I finally tried out SQL Server 2005 today.  I used the express edition, figure I'll get enough of the full featured versions at work and wanted to check out the express experience. 

It was MUCH easier to get up and running with a simple test.  The only roadblock was enabling the CLR, but after a few minutes I finally found the “Surface Area Configuration” tool. 

I started out with a simple user defined function.  Create a C# database project, click “Add User-Defined Function”, write the function body and click Deploy.  I was then able to use the function directly in my queries.

[Microsoft.SqlServer.Server.SqlFunction]
public static SqlString StringReverse(SqlString input)
{
   if
(input.IsNull)
      return SqlString
.Null;
   char
[] chars = input.Value.ToCharArray();
   Array
.Reverse(chars);
   return new SqlString(new String
(chars));
}

So I was pretty surprised to see how quickly I could get this running.. I figured there would be several more hoops to run through. 

Next I think I'll try to determine how difficult deploying these assemblies via an installer will be.