Tuesday, July 3, 2007

Alot of Searching, a Little Intuition

I have been laboring over the past few weeks trying to get a progress bar control to be static. The problem originates from the fast that I am using Microsoft Visual Studio 2005 to code my project and I, like most mortals, am unable to resist the lure of Drag-N-Drop design. Once you drag a tool from the toolbox onto the form, the Designer writes all of the code behind to configure and add that control. For most uses, the properties pane is enough to modify the object to do what you need. What if you need the object to be static, however?

Here is a little background on my project. I have developed an application that will allow me to upload large files to my web host in small chunks. I decided to place a majority of the work inside a class that inherited from a background worker so that my application wouldn't freeze up on me. My next choice was to implement a progress bar to let me know how far into the upload my file was. Since the background worker class was not a part of my form, it could not directly access my progress bar and needed a function. Also, since my background worker class did not contain a form object, I had to make the function and progress bar static.

The result is that I would go into the designer generated code and modify the progress bar to be static. Everything would work fine until I did anything to the form. This would cause the designer to rewrite its code, and overwrite mine. More can be read about this issue here. I did a ton of searching on the net to find a way to force the designer to make the variable static. I was pondering the issue a little while ago and the answer dawned on me. I went into the designer code and located the declaration of the variable:


private System.Windows.Forms.ProgressBar progressBar1;

I cut it out of there and pasted it into the top of my partial Form1 class, only this time, making it static. From there, I merely needed to go back into the designer code and remove the this. tag from all of the definitions of progressBar1. Problem solved! From then on, the designer rewrote the progressBar code to be static.

Now I am going to write a bunch of random words in hope that anybody who is searching for this answer like I was will find it:

changing designer generated code
making VS2005 objects static
Designer winforms static
forcing designer generated objects to be static

Friday, June 29, 2007

In the time it takes...

...to write this blog, I could have gotten more work on my Help Desk application done. I am currently attempting to program an application using ASP .NET and C# that will allow our clients to post help requests. I know that they are many 3rd party solutions to the "Help Desk" initiative, but whats the fun in that? The problem is that I find that I am getting distracted by every little thing that goes on. Even worse is that these distractions are causing me to re-write code thats already been done and to stray away from my establish programming standards.

So I would like the system to function as follows:

1.1 Main page -> index.aspx
1.2 Side panel navigation
1.3 Capability to log in
2.1 Page to request support ->support.aspx
3.1 Page for user to view all submitted tickets -> view.aspx?user=client
3.2 Page for agent to view all submitted tickets -> view.aspx?user=agent
4.1 Page for agent/client to view individual ticket -> ticket.aspx?ID=ticketNumber
4.2 Depending on login used, a button to respond will be present
5.1 Page for agent to submit a response and update ticket -> solution.aspx?ID=ticketNumber

After the initial shell is working, I would like to add the following functionality:

1.1 Submitting a ticket will send an email to all current agents
1.2 Adding a solution to a ticket will email the client
2.1 view.aspx will be ordered by date by default, by selecting column headers, reorder
3.1 Generation of a knowledge base
4.1 Generation of a FAQ for clients


So this is primarily what I hope to achieve. I want to write it myself because i am always looking for things to add to my resume. Who knows, maybe I will make it easily configurable and then give it to other individuals to deploy.

First things first though. I have to motivate myself.

Wednesday, June 27, 2007

Upgrading to Exchange Server 2007

So this past week we have decided to update out Exchange Mail Server from the old 2003 to the new 2007. So far the software has been pretty neat. Vast improvements have been made to the outlook web access. In the 2003 version, web access looked just like what it sounds like. It was a web page acting as your outlook mailbox. In 2007, however, the web access is fantastic. It acts entirely like your desktop outlook application does; with all the trimmings.

Setup / Upgrade for 2007 is pretty easy as well. Microsoft has done well to document the steps taken to smoothly transition. I did notice however, and thus the reason for this post, that a pretty major item was either documented incorrectly or bugged. The notes state that upon setting up the mail server, a Send Connector should automatically be created. In the case of out server, this was not the case and it went unnoticed. The resulting issue was that outbound email was not actually reaching its destination. Worse yet is that no failure notification was returned to the original sender. This resulted in an entire office thinking that their email was going out, and after a few angry phone calls we discovered differently.

Ok, so how do you know if this problem applies to you? If you know that outbound emails (emails going out of your network or domain) are not reaching their destination open the Exchange Management Console. From there, navigate to the toolbox and open the Queue Viewer. There should be a section called "Unreachable" filled to the brim with emails being held. When looking in the queue at all the emails, take a gander at the last error recieved. If it says something along the lines of "A matching connector cannot be found to route the external recipient" then this applies to you.

I am going to assume that either you have no Send Connector or a misconfigured send connector. In the management console, navigate to Organization Configuration -> Hub Transport. Then click the Send Connectors tab. If there is nothing there, right click and create a new one. Call it whatever you want and make sure the type is Internet. For the Address Spaces section, type "*" (w/o quotes). OK, now lets make sure your Send Connector is configured correctly. I found that the easiest method was to open the Exchange Management Shell. At the command prompt, type:


get-sendconnector "nameOfConnector"

Once the select is returned, check the AddressSpaces field. If the AddressSpaces is "*", then you should be good to go. If not, type:

set-sendconnector "nameOfConnector" -AddressSpaces: "*"

That should do it for ya! Now go out there and spam mass emails about puppies!

Tuesday, June 26, 2007

It was bound to happen eventually!

Hello,

Enjoy my blog!

Mike