Posts

Showing posts from 2012

General steps and resources for setting up SSL Certificates and PKI infrastructure

Project: Set up a development web server environment which requires SSL and accepts client certificates.  The client certificates may come from a CA that is not immediately contactable, because the development environment is firewalled out of the CA network. Using IIS7.5 on a Windows 7 Ultimate workstation. General steps: 1) Install an SSL certificate for your web server to enable SSL.     a. I had a Certificate Authority server set up in my development environment.            Certificate Authority services come with Windows Server 2003 and above. You just need to enable the feature.      b. I requested a domain certificate from IIS7.5 Server Certificates feature which is located at the web server level of the IIS Managment Console.     c. Then I enabled SSL on IIS 7.5 at the web site level. http://www.iis.net/learn/manage/configuring-security/how-to-set-up-ssl-on-iis 2) Your client workstation must trust the CA.       a) Go to the CA and get a copy of the CAs public

Sync your windows time with an External Time Source

The systems in my development network were always behind by 5 minutes.  I corrected the time on my domain server and my workstation every once in a while, but it would eventually go back to being a few minutes late. I didn't mind much when I didn't have meetings to go to, but every once in a while, I do have meetings. I always found myself scrambling even more because my inaccurate system time. So, I found this article on configuring your windows time service. http://www.windowsnetworking.com/articles_tutorials/configuring-windows-time-service.html The above article is the best article I found regarding syncing windows time. Summarily, it states that the windows time service was set up to ensure your systems have synchronized times. Time can be synched with an internal hardware clock or external source. In a domain environment, time is synched with domain controllers in the domain and subdomains.  In a standalone environment, with Windows 7, you can configure

Running IIS6 in 32 bit mode on a 64bit Server

Running IIS6 on a Windows 2003 64 bit OS in 32 bit Mode   My application development team was using Cold Fusion MX 7 before we made the switch to ASP.NET in 2006.  We had quite a few applications which we had written in Cold Fusion MX 7.  We were moving all our services to virtualized servers, and we were given a virtual server running 64 bit Windows 2003. Cold Fusion MX 7 only works in 32 bit mode, so I had to switch the IIS on the server to 32 bit mode to get Cold Fusion MX7 to work on the server. 1)       IIS6 can run in either 32 bit mode or 64 bit mode. 2)       To change the mode to 32 bit mode run the following command:   cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1 (Set the value to 0 to return to 64 bit mode.)     Source: http://support.microsoft.com/kb/894435 http://codersnotes.blogspot.com/2011/04/aspnet-tab-missing-in-iis-6-on-64-bit.html http://www.iisadmin.co.uk/?p=15    

Add a Edit This Webpart link from within a web part in SharePoint

Add a Edit This Webpart link from within a web part in SharePoint by adding the following javascript to your web part output: javascript:MSOTlPn_ShowToolPane2Wrapper('Edit',this,'" + this .ID + "'); Here's a sample of how you would do this in the CreateChildControls method: protected override void CreateChildControls() { Controls.Clear(); base .CreateChildControls(); StringBuilder sbOut = new StringBuilder (); Literal ltlOutput = new Literal(); if (SiteURL == null || SiteURL == "" ) { sbOut.Append( "Please <a href=\"javascript:MSOTlPn_ShowToolPane2Wrapper('Edit',this,'" + this .ID + "');\">modify this web part</a> and set the web site where the list data is or will be stored." ); } ltlOutput.Text += s

Clear user terminal service sessions via command prompt

Ever try to remote desktop or terminal service into a server and get the maximum number of connections has been reached error?   You could use the GUI interface tsadmin.msc or more recently the Remote Desktop Services Manager to disconnect sessions on the server.  However, if you don't have the GUI tools, you can just use the command prompt. To display the sessions on your server: qwinsta /server:[Your Server IP or name]  SESSIONNAME       USERNAME            ID  STATE   TYPE        DEVICE  console                                 0  Conn    wdcon  rdp-tcp                             65536  Listen  rdpwd                    User1                 2  Disc    rdpwd To disconnect a sesssion: rwinsta [ID] /server:[Your Server IP or Name] Source: http://www.mydigitallife.info/how-to-remotely-terminate-and-disconnect-remote-desktop-terminal-services-connections-or-sessions/

Programmatically add a recurring event to a MOSS 2007 (SharePoint) Calendar

The following function was designed to add an event to a calendar.  Note that I had a custom Category choice field in my calendar, so the line where you set the Category field is commented out so the function will work with a standard MOSS 2007 calendar.   /// <summary>         /// Adds a holiday event to the holiday calendar         ///         /// NOTE: if you are adding a recurring event, then the date portion of the start and end date define the duration of the recurrence.         /// The time portion is the Start and End Time of the event are the start and end times of the event on a single day.         /// </summary>         /// <param name="web"></param>         /// <param name="strListName"></param>         /// <param name="StartDate"></param>         /// <param name="EndDate"></param>         /// <param name="bAllDayEvent"></