SterlingPorter.net

October 31, 2007

My Microsoft Internship Project is Released!

Filed under: Microsoft Exchange — sterling @ 5:18 pm

This happened a few months ago, but I thought I should make note of it on my blog.

The program I wrote during my 3 months on the Exchange Server team Microsoft is called Routing Log Viewer. It was just released as part of SP1 of Exchange 2007.  I was pleasantly surprised that the code I wrote (at least from what I can tell based on the documentation) didn’t need to be modified much after my whirlwind summer.
Here is a link to the documentation on the software:

http://msexchangeteam.com/archive/2007/06/27/445517.aspx

Exchange Server Store exceeded 18 GB limit

Filed under: Microsoft Exchange — sterling @ 5:07 pm

One of my mail servers today crashed at 5:00 AM. It said the following:

Exchange store ‘First Storage Group\Mailbox Store (MERCURY)’: The logical size of this database (the logical size equals the physical size of the .edb file and the .stm file minus the logical free space in each) is 18 GB. This database size has exceeded the size limit of 18 GB.

This database will be dismounted immediately.

When the database was dismounted, all connections to Exchange from our employees running Outlook started failing. The solution was pretty easy though. All that was necessary was to add a DWORD entry to the registry.

  1. Start regedit.exe and browse to the following: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\\Private-GUID note: Your GUID # will be unique to your installation
  2. Add the following DWORD Key: Database Size Limit in GB Make sure it is exactly like the above since it is case sensitive. Then set the decimal value to something greater that 18 (default). You can set it up to 75 if you’re running Exchange 2003 SP2.

Also, beware of your available hard drive space and your backup strategy. Our backup strategy was only able to handle a database increase up to 25 GB, so that’s what I had to set it at until I can make provisions to handle a larger database.

Here is a Microsoft article on this problem

Review of I Am America (And So Can You), by Stephen Colbert

Filed under: Book Reviews — sterling @ 6:52 am

I am fan of Stephen Colbert’s comedy when it’s clean. However, this book had a little too much R-rated language and content for me. Stephen Colbert has a real talent for making his satire funny, but it’s sad when he feels that he has to stoop to the level of crudeness to get a laugh.

That said, here is an excerpt I really liked, and this is an example of good, clean humor that I wish he and other comedians would strive for:

“That’s what’s called the Nuclear Family. It got it’s name because it reached its peak during the early years of the Cold War when American were in immediate danger of nuclear annihilation. Back then, family members knew their roles, and nobody questioned paternal authority. After all, Dad was the one with the keys to the fallout shelter.”
And another–his suggested list of arbitrary rules for kids (to teach them discipline):

  • Wash your hands before talking to strangers
  • If you look at a cat and it sneezes, no dessert for a week
  • Jell-O must never be jiggled

Buy from Amazon.com:

July 25, 2007

FooGear.com – the experiment continued

Filed under: Uncategorized — sterling @ 3:39 pm

Well, VideoIpodAccessories.com has shown that with zero advertising, I can get quite a bit of traffic and actually make some money as an affiliate with Amazon. So, I’ve expanded my operation and made FooGear.com which is basically a collection of sub-domains (e.g. harrypotter.foogear.com) that allow visitors to browse products in a specific space. The original experiment has now become one of scalability. Check it out a foogear.com

January 2, 2007

Custom build numbers run into Y2K7 bug

Filed under: Visual Studio 2005 — sterling @ 8:52 pm

I ran into an interesting problem today. I have a custom build task that executes when building a Team project in Microsoft’s Team Foundation Server. It creates a custom build number that follows the major.minor.build.revision format commonly used for Microsoft assemblies. However, this build task had been writing the build date (YMMDD) for the build part, and it was writing the actual build number (e.g. 221) for the revision. So a complete buld number might be 2.0.61215.203, meaning that the build happened on 12/15/2006 and it was the 203rd time we built that project. Pretty cool, eh?

Well, when I tried to build it this morning (1/2/2007), I got the following error:

Properties\AssemblyInfo.cs(32,12): error CS0647: Error emitting ‘System.Reflection.AssemblyVersionAttribute’ attribute — ‘The version specified ‘2.0.70102.203′ is invalid’

After a little digging and brainstorming with another developer, we rediscovered that each part of the full build number is actually treated as an unsigned 16-bit integer. The max value for such an integer is 65534. So, of course 70102 would cause an error.

In our case, the “minor” part is not important, so we decided to push the year over to get the following: 2.7.0102.203. Once this fix was made, our builds were successful.

Cool bug, eh?

December 30, 2006

USBtoEverything.com – High school students try affiliate marketing

Filed under: Uncategorized — sterling @ 2:30 am

A few months ago, I bought the domain name usbtoeverything.com with the intent to try my hand at affiliate marketing.  However, with my full-time job at Sewell Direct and my side work with Sno Shack, I just haven’t had to time to tackle that project, mainly because of all the time it would require to write copy for all the products and keep tabs on the traffic.

Then, I found out my little brother’s Montessori school in Rexburg, Idaho, was looking for ways to raise money for their annual educational field trips.  I thought USBtoEverything.com might be a good way for them to practice some technical writing skills and learn about affiliate marketing along the way.  So I set up a Word Press blog for them to use to post products to the site. 

Their first step was to sign up with affiliate programs like LinkShare that would give them an easy way to generate product links to sites like TigerDirect.com.  Next, they started adding products.  It’s been a little slow-going so far because the kids have had to get their bearings on what in world things like a USB to IDE adapters are.  But they’re making progess.  Hopefully in a few months they’ll start seeing a little income. 

Just as a side-note, my similar site videoipodaccessories.com has brought in a whopping $5.27 since February 2006.  Let me be clear that all I did on that site was write a little ASP.NET control that pulls down basic product information and pricing from Amazon’s associate API.   I’m doing zero marketing.  Anyway, I just wanted to highlight the differences between usbtoeverything.com and videoipodaccessories.com.  First, the Montessori kids are writing their own copy, so instead of just copying TigerDirect’s product descriptions, they are rewriting it in their own words.  This should help their SEO.  Furthermore, as they add more products, they will be writing comparison pages that will show a list of something like USB to Serial adapters from different vendors.  The list will include pricing and other info like shipping rates/times, etc.  This should provide value to visitors to their site.  Conversely, on videoipodaccessories.com, I am providing no real value above what Amazon already provides because I am only using the data retrieved from Amazon’s API.  Hopefully, these “better” features of USBtoEverything.com will help them make more than $5 over the next year. 

Of course, we might need to look into using Google Adwords to directly market the “long tail” products, but that is a can of worms that isn’t very tempting to open right now.

December 22, 2006

.NET Remoting connection issues over VPN

Filed under: .NET — sterling @ 5:38 am

Lately I’ve been working on a “smart client” application that connects to a company application server. The app server acts as a write-through cache on the way to the back-end database. Multiple smart clients can interface with the app server as well as a few web sites. All communication between the app server and its clients is done using .NET remoting. One of the advantages of the smart client and how is uses .NET remoting is that I can enforce role-based security using the WindowsPrincipal.IsInRole function. I can prevent anyone who is not a member of a designated security group from even running the smart client. Cool, eh?

Unfortunately, a problem arose when users tried to run the smart client to connect to the app server over a VPN. In this situation, the call to IsInRole() failed every time, even though the user had provided his domain credentials when logging into the VPN. I assumed that Windows would simply be able to check a given group (e.g. DOMAIN\Security Group) against all the known identities, i.e. local account and the domain account authenticated when the VPN connection was made. However, this is not the case. Apparently, there is no way to use the credentials that are used to authenticate on the VPN. Simply put, if you call IsInRole() on the client machine, it will use the local account, and unless the local machine is a member of the domain in which exists the said group (or if the domain is trusted by the first domain), then IsInRole() will fail.

Of course, the point here is to provide single-sign-on authentication. In other words, only make the user provide credentials once–when connecting the VPN. After a lot of reading and a support incident with Microsoft, I arrived at a solution.

My first mistake was to try to implement role-based security in the smart client. For many reasons, including security risks, role-based security should be done on the server in a client/server architecture, NOT in the client. Secondly, the domain credentials used to authenticate over the VPN are only used for data going OUT over the VPN. In other words, local applications (including the smart client) are run under the local account, but remoting calls headed to the app server arrive in the context of the authenticated domain account. So, with some proper configuration, the app server can perform role-based security checks on this account context.

The key is how you instantiate the TcpServerChannel object when setting up your .NET remoting calls on the client and server. The following code is an example of how to do it on the SERVER:

// Setup the configuration parameters through a dictionary
IDictionary properties = new Hashtable();
properties.Add(”port”, channelPort); // e.g. 8080
properties.Add(”secure”, true);
properties.Add(”impersonate”, true); // allows us to do role-based security on the server

// Create an instance of a channel
TcpServerChannel serverChannel = new TcpServerChannel(properties, null);
ChannelServices.RegisterChannel(serverChannel, true);

Here is how you do it on the CLIENT:

// Setup the configuration parameters through a dictionary
IDictionary properties = new Hashtable();
properties.Add(”secure”, true);
properties.Add(”connectionTimeout”, 5000);
properties.Add(”tokenImpersonationLevel”, “Impersonation”);

TcpClientChannel clientChannel = new TcpClientChannel(properties, null);
ChannelServices.RegisterChannel(clientChannel, true);

The “impersonation” properties on both the client and the server make it so when a remoting call occurs, the app server executing the method will assume the identity context of the caller (e.g., the domain account being used over the VPN). With this great feature, you can call IsInRole() and perform your role-based security. Problem solved.

Side note: I encountered another problem that was actually caused by this particular fix. The problem had to do with connecting to another server from the app server, specifically Sql Server. I’ll post this scenario and how I fixed it later.

April 27, 2006

SnoShack.com goes live!

Filed under: Sno Shack — sterling @ 5:28 pm

SnoShack.com went live today. The development took a little longer than I had planned because of school and other responsibilities.

Some cool features of the site include the ability for customers to log in and view the status of their orders, plus view reports on which flavors and supplies they buy the most of.

I’m sure there will be bugs, but the new site is much, much better than the old one.

Photos from Iraq not shown in the mainstream media

Filed under: Uncategorized — sterling @ 5:13 pm

I got these pictures from Terry Crawford via my uncle Calvin. With all the negative coverage of the operations in Iraq, I think it’s good to be reminded of the good that is happening in that country. Here are the photos:

Prayer Circle
Iraqi boy giving U.S. solder “five”
U.S. solder holding an Iraqi child
U.S. soldier kissing a letter
U.S. soldier petting a cat

April 24, 2006

Visual Studio 2003 hangs when opening a project

Filed under: Uncategorized — sterling @ 8:10 pm

It appears that an update from Microsoft on 4/15/2006 caused a minor bug in Internet Explorer, but it also caused a major problem in Visual Studio 2003. The bug only exists if the computer has “HP Share to Web” software installed on it or Sunbelt’s “Kerio Personal Firewall” installed on it. The IE bug is simply that urls won’t resolve if they do not have an http:// in front of them. Microsoft has a recently published KB article about this bug and how to fix it:

http://support.microsoft.com/default.aspx/kb/918165?

However, in addition to the bug in IE, Visual Studio 2003 hangs when you try to open a project. I assume that VS.NET is trying to make a web request to some server using either an IP address or domain name without preceding it with http://. I suspected that the two bugs were related, and sure enough, when I applied the fix described in the article above, both the IE bug and the Visual Studio bug were resolved.

I suspect that any software that makes web requests without http:// or even ftp://, gopher://, etc., might experience similar problems as with Visual Studio 2003. However, Visual Studio 2005 did not suffer from this problem.

Thanks to Ask-Leo.com for pointing me to Microsoft’s KB article:

http://ask-leo.com/why_does_ie_now_require_http_in_the_address_bar.html

« Newer PostsOlder Posts »

Powered by WordPress