05 April, 2009 14:38
Time Machine fails with Error mounting volume
Posted by mimo under [ General , Development ][ (0) Comment ] | [ (0) Trackbacks ]
I use a Macbook pro for doing all my software development. Since switching over to Mac, I can't imagine using any other computer to develop with. The combination of the OSX operating system with the power of the Macbook Pro makes for an unbeatable development platform.
I have also eliminated all windows machines from our house now as well. I have a linux server for my websites, an Imac for our 'TV', which also acts as our primary media server for music, photos and family media, and an old 17" Powerbook G4 that my wife uses. I have the three Mac machines backing up to a 1 terabyte Timecapsule.
The Timecapsule is a great innovation on Apple's part, and has already saved my life on a few occasions. Not only does it handle all my media etc. but with the new version of VMWare fusion, I am able to have automatic backups of my local development and document files that I use on the Windows side.
Time Capsule was easy to setup, and had run without an issue until a few weeks ago, when I started getting errors during backups on my Macbook Pro.
These were 'Backup failed - Error mounting volume', or 'Network error during backup'. After digging around a bit through various log files etc. I found that the likely culprit had nothing to do with the network, but was the fact that my hard drive had bad files and directories on it.
Resolving this issue involved booting up from the OSX CD and running the Disc Utiltiy Repair function on the Macbook Pro hard drive. Since doing this, Timecapsule is up and running again without a problem.
It would be nice if Time Capsule/Time Machine could produce a more informative message, or offer to take some kind of corrective action in the event of a failure like this instead of the misleading cryptic message it had generated. Thus this blog post so hopefully the next person who hits the problem will be able to fix it without having to dig through log files...
14 May, 2007 07:52
SQL server Full Text Search
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
We had to move the SQL server database to a new location. In doing so, the full text catalogs failed. It would seem that a simple 'rebuild' would fix the problem: this proved not to be the case however.
For some reason I kept getting the error: ""The Microsoft Search service cannot be administered under the present user account." - no matter which account etc. I tried. Restating the services did not help.
Fortunately, after some searching I found this blog, which had this information on it...
The steps were as follows:
- Search for the file named "ftsetup.exe" on the SQL server
and note it's location. I found mine under "C:Program FilesMicrosoft
SQL ServerMSSQLBinn".
- Open a command prompt to the path found in step 1.
- Execute this command: "ftsetup.exe sqlserver 0 1 0 0 0 4 ". I have no idea what this is supposed to do.
-
The instructions said to note the result from this command. I don't
know why. It didn't seem to matter. Mine returned this message:
"FulltextSetup returned error code: 0x0".
- At this point I diverged slightly from the instructions. I did a search for the file "sqlfth75.dll " and noted it's location.
- Open a command prompt to the path found in step 5.
- Run this command: "regsvr32 sqlfth75.dll "
- Restart the Microsoft Search and MSSQLSERVER services.
This seemed to solve the issue....
02 April, 2007 18:36
SQL statement for enumerating items
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
Needed a SQL statment for enumerating items in a list:
SELECT COUNT(*) AS NumberItems, Prev.CustID, Prev.ContactID
FROM dbo.Customer_BillTo AS Prev INNER JOIN
dbo.Customer_BillTo ON Prev.CustID < dbo.Customer_BillTo.CustID
GROUP BY Prev.CustID, Prev.ContactID
ORDER BY numberItems
09 February, 2007 16:07
Regex for LSD Location Township Range
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
Needed to makeup a regex for matching Alberta Location Township Range formatted codes. It appears this will work:
[0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9]W*
23 May, 2006 17:44
Another day another waste of time trying to solve
Posted by mimo under [ Development , Opinions , Sharepoint ][ (0) Comment ] | [ (0) Trackbacks ]
Things that should not be broken- I am sorry but it is frustrating when Microsoft releases fixes for things that cause other problems. In this case, SQL Reporting Services 2000.
I had it running on a machine, and was in the process of switching it over to another production server.
I could not get the report services to work on the new machine. Tried installing it several different ways figuring it was some kind of domain related permissions issue.
After some searching around on the best Microsoft tech support system in existiance - Google, I discovered that in fact SP1 on windows 2003 breaks Report Services. Lovely.
Fortunately, some guy spent several hours on the phone with Microsoft and was nice enough to post the results of his call on his blog, which saved me having to for the third time in as many weeks, calling up Microsoft...
Anyway - the resolution is to add a DWORD entry called DisableLoopbackCheck to HKLMSystemCurrentControlSetControlLsa. Setting this key to a value of 1 fixes the problem. It has to do with a loop back security check that Microsoft introduced in SP1. This server is well protected behind a firewall, so will have limited vulnerability to the sort of attack the 'fix' is designed to protect against...
Its things like this that are very frustrating. It took several hours to track that issue down, and what value did I get from that time? Nothing other than getting the product basically working the way it was supposed to...
(More)21 March, 2006 16:02
Google Earth: How to use KML and Google Earth API to build a searchable database
Posted by mimo under [ C# .net development , Development , Google Earth ][ (0) Comment ] | [ (0) Trackbacks ]
I have been working on building a Google Earth search engine interface. I have successfully got it to the point where I can get two way communication going.
The idea is to have a page inside the Google Earth browser that displays search criteria for a database of items that have spatial locations displayed in the Google Earth client.
Executing a search will display the Placemarks of the items that match the search criteria.
I will be posting a set of articles on this subject coming up, and posting the source code for all of it to SourceForge. This will include a .net KML class library, as well as a sample Google Earth based data search web page.
(More)21 March, 2006 09:19
Windows Workflow FX
Posted by mimo under [ XML Resources , Ideas , C# .net development , Development , Workflow ][ (0) Comment ] | [ (0) Trackbacks ]
I have been hearing a lot about this both from Microsoft and from developers/companies I know in town.
Its a Don Box creation, and looks absolutely excellent. I was planning to build up a workflow engine of my own, as I require one for a number of things that I am working on, and have tried Biztalk a few times, only to find that its too complicated and fiddly for most workflow related tasks. I will have a look at the new version of Biztalk that is coming out shortly, but I think this Windows Workflow looks a great deal more applicable for most of the cases I am working on.
(More)16 December, 2005 16:35
Serializing items with IDictionary interface
Posted by mimo under [ XML Resources , C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
Thanks to Greg Pringle for this one:
.Net does not support serializing anything with an IDictionary interface. I have run into a number of places where I would like to serialize/deserialize collections with that interface. Greg tracked down a way of doing this using an undocumented interface..
Details are here:
http://msdn.microsoft.com/msdnmag/issues/03/06/XMLFiles/
Answer is under “Q: I've noticed that XmlSerializer won't serialize objects that implement IDictionary by default. Is there any way around this?”
Update: Found an addtional possible alternative: Xtream serializer object found HERE
01 November, 2005 14:43
Great SQL server date time formatting function:
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
Found a great date time formatting function for SQL server on this website:
http://www.aspfaq.com/show.asp?id=2460
Works very well..
(More)18 October, 2005 10:57
Infopath date calculations
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
Date calculations in infopath taken from: http://blogs.msdn.com/infopath/
(stored it here for searchability)
(More)26 September, 2005 07:54
Good site...
Posted by mimo under [ News , Design Patterns , C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
Was looking around the google code competition. Interesting - but primarily algorithm centric contest.
I would need to do some serious study to get my algorithms back up to par again before getting involved something like that. Even so - algorithms are something that is on my list of continuous improvement study items. From that contest link, I found the Top Coders site, which has a great set of tutorials and resources on algorithms:
http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=alg_index
(More)18 September, 2005 15:34
Microsoft and new content meme mining technology
Posted by mimo under [ News , XML Resources , C# .net development , Development , Memes ][ (0) Comment ] | [ (0) Trackbacks ]
24 August, 2005 08:14
Solution to multiple configuration management for enterprise library
Posted by mimo under [ Design Patterns , C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
At some point I will be getting into multiple configuration deployments for the code... So: in order to do that, it is convienient to have multiple configs for different environments.
This blog has a post and a plug-in for doing this...
23 August, 2005 12:35
Software factories and code generation
Posted by mimo under [ Ideas , Design Patterns , C# .net development , Development , Systems Architechure ][ (0) Comment ] | [ (0) Trackbacks ]
Investigating this forms processing engine I am working on has lead me to software factories. I have been reading the Software Factories book - its good.
Here are some additional resources I have found while investigating this.
(More)18 August, 2005 15:27
More regex
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
Regex for matching something in brackets but exclude brackets: (word)
(?<=()(.*)(?=))
Regex for getting time:
bd{2}:d{2}:d{2}
Regex for getting two letter words:
(?<=(?:s|G|A))w{2}(?=(?:s|Z|.|?|!))
Regex for seperating a number from leading zeros and a dash:
[123456789](d+)(?=-.+)
Some good regex tools:
http://www.codeproject.com/dotnet/RegexTutorial.asp
and the REgex coach is quite good as well.
16 June, 2005 14:57
Finding duplicate record IDs in SQL server
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
I have a case where I need to identify duplicate IDs in SQL server table. This query works well:
SELECT TimeCardDetailID
FROM Time_Card_Hours
GROUP BY TimeCardDetailID
HAVING (COUNT(*) > 1)
07 June, 2005 16:32
OLAP Cubes, reporting services
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
After some thought, I have pursued MS OLAP cubes via analysis services coupled with reporting services as a way to plow through the mass of accunting data that exists in this accounting database.
(More)18 April, 2005 14:59
Deploying and managing winforms apps using Updater block
Posted by mimo under [ Design Patterns , C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
I am just working on setting up my in the latest m$ marketing speak, Smart Client application with the Enterprise Library updater block.
I am going to see if I can get it working off a linux server just for fun as well.
Method to be posted here as I figure it out.
(More)13 April, 2005 14:23
Nant building
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
As my current project is becoming more complex, I am now investigating Nant to automate builds of the project.
I would like to have it do a daily build, run unit tests, then put the build (if successful etc) into the correct locations with version # etc.
(More)13 April, 2005 14:23
Nant building
Posted by mimo under [ C# .net development , Development ][ (0) Comment ] | [ (0) Trackbacks ]
As my current project is becoming more complex, I am now investigating Nant to automate builds of the project.
I would like to have it do a daily build, run unit tests, then put the build (if successful etc) into the correct locations with version # etc.
(More)08 April, 2005 09:14
Bug tracking systems
Posted by mimo under [ Development , PHP ][ (0) Comment ] | [ (0) Trackbacks ]
This looks promising: open source bug tracking system called Mantis:
http://www.mantisbt.org/download.php
Has lots of great looking features for collecting bug reports and managing their assignment, reporting etc.
(More)09 February, 2005 19:00
Setting up a certificate server:
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
For development purposes, it was necessary to install a local certificate server to make sure all the SSL stuff works without having to buy a 3rd party certificate. SO: The process basically involved:
(More)11 November, 2004 20:09
Got my first successful Nunit test suit working. It is awesome. I am finding testing much more formalized using this sort of tool. Very nice. Its proven to be invaluable in the borehole field data capture engine I have wired up and deployed. This engine has to work connected/disconnected, and be able to detect state etc. so it requires a different level of testing that is not easy to do by hand. The system also has to maintain a centrally controlled numbering system, so in order to do that there are a set of objects that having an automated test cell to check when mods are made is very handy, reasuring and key to the project's success. If I make a mistake that caused the numbering sequence to lose count, it could be very nasty, since the guys in the field are actively generating numbers that they use to direct the drillers to drill holes for. From that time forward, the holes are named according to that number. Losing a hole is anywhere from a 5-10,000 issue...
This project is a m$ project - so I am using a bunch of new gizmos. The central site is sharepoint, the form is Infopath. I am eventually going to be wiring into Biztalk server as well for data translation. I am using web services in the middle bit for tying together the form, sharepoint and the database, and have a domain layer set up using the Active Record pattern for mapping into the database. Some refactoring needs to be done since I am detecting a few 'smells' where code duplication is creeping in. Part of the challenge of this project has been the fact that there is a pile oflegacy data that must be integrated into the new database, and several legacy applications that need access to the data in a live sense. And naturally there was a 3 week timeline, and a budget constraint on top of all that.. So I had to make some coding concessions that have resulted in some duplicate code 'smells'.
I still don't like that terminology although its descriptive - but the engineering side of me cringes every time I have to say that to a non-programming collegue - I will be taking the OOPSLA crowed up on their offer to submit essays on the subject of coding - and that will be one of the things I highlite is the predeliction for programmers to use juvenile terms for serious things. It may be time for the industry to grow up a bit and come up with suitable professional names for things...Sorry - save that for the upcoming rant...
05 August, 2004 17:06
Securing apache 2 webserver using SSL
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
http://www.sitepoint.com/article/securing-apache-2-server-ssl
Securing an Apache 2 Web server can be an intimidating prospect for those new to secure sockets layer (SSL) certificates. However, this need not be the case. SSL secures Web server to Web browser connections. Read on to better understand SSL certificates, learn how to set them up on Apache and launch your SSL-enabled site.
In today's Web hosting environments, many Webmasters host on servers with ready-made SSL setups and no installation requirements, or with setups on which a control panel handles the heavy configuration work. Whatever the case, it's important to understand just what your SSL options are, and to know how to manage the process manually.
Caveat to Apache 1.x Users
While this tutorial specifically addresses Apache 2, not that much is different between this and the 1.x versions of Apache. Prior to version 2, SSL support was not built into Apache due to export and encryption regulatory demands. However, both apache-ssl and mod_ssl are available for 1.x versions of Apache. Much of the openssl and httpd.conf content in this tutorial covers both versions.
Certification Authorities and Trusted Roots
Before we dig into SSL certificate types and how to buy and install a certificate, let's complete a brief review of how SSL certificates are created and managed.
According to representatives from SSL Review the Trusted CAs that control their own trusted root certificates are permanent players in the SSL market and offer the highest level of business stability to enterprises and small to medium-sized businesses.
SSL Review is a Website that's dedicated to demystifying SSL certificates and, while owned by GeoTrust, a major SSL provider, the site is fairly unbiased. It includes an excellent SSL comparison chart featured previously in Open Sourcery.
What Type of Certificate Should I Choose?
There are numerous vendors offering a variety of SSL certificates. Certificates can range considerably in price -- from as much as US$1495 to free -- depending upon the way you plan to use the certificate, and the services and support the vendor offers. Let's take a look at a few of the options.
Certificates start at a minimum of 40-bit encryption. These certificates are useful for securing extranets, intranets and Websites through which ecommerce is not being transacted. They also include 128-bit encryption, the de facto standard for two-way encrypted transactions between users and a Web server.
Securing Data in a Non-commercial Environment
If you are seeking to secure data by providing an encrypted connection through which users can be authenticated, modify records, or view personal data, then a low-end certificate may work.
Certificates in this category should cost under US$50 annually and include availability from Trusted CAs ipsCA and FreeSSL.com. As these certificates do not carry a known brand, fraud control or human support, they are suitable for non- or light commerce environments, though they do provide bonus 128-bit encryption. According to FreeSSL.com, a light commerce environment is one with no more than 50 transactions weekly, and an average transaction value of US$50.
Wildcard Certificates - Securing Multiple Domains with one Certificate
There may be cases in which multiple sub-domains under one domain need to be secured. For example, securing www.domain.com, orders.domain.com and service.domain.com under one certificate is possible with a wildcard SSL certificate.
Since you can secure an unlimited number of host names, wildcard certificates are generally more expensive than normal certificates, but they become very cost effective for those who need to secure several domains. Certificates in this category can range from US$299 up to US$800 and are available from FreeSSL.com, ipsCA, GeoTrust and others.
Securing for eCommerce
If you're securing a site for commerce-related activity, many issues arise, including browser compatibility, fraud prevention, and the deployment of the highest levels of security within your economic and technical capabilities.
Each Trusted CA has developed its own features, benefits and platforms to support its bid for your SSL business; however, some provide more comprehensive solutions than others.
When looking for an ecommerce SSL, consider the following questions:
- Does the Trusted CA offer your users a method by which they can authenticate or validate your SSL certificate through their Web browser?
- Is there warranty protection if your certificate is stolen, corrupted, impersonated, or you experience loss of use?
- What kinds of perks are added in if extra dollars are invested in the certificate -- such as extended renewal and payment services for processing transactions?
The price of an ecommerce certificate can range from US$199 to US$1495 annually. They're available from all major Trusted CA providers, including GeoTrust, Thawte and VeriSign.
Testing SSL via Self-Signed Certificates/
Your Apache Web server is already prepared to provide a self-signed SSL certificate. These certificates are handy for testing and are, of course, free. In most cases, they will generate alert messages for your users as they are not generated from Trusted CA root certificates and do not offer any third-party proof to validate your site's identity. Thus, these certificates are best for internal use or during development and testing.
Getting Started with SSL on Apache
There are a few key ingredients you will need to use with Apache to secure your Web server: OpenSSL, mod_ssl, and root access to the server.
OpenSSL is a command line toolkit for using secure sockets layer encryption on a server and can be acquired from openssl.org. This tool works with Apache module mod_ssl in carrying out SSL-related tasks. You will need root privileges to install OpenSSL to its traditional destination of /usr/local/ssl/install/openssl.
You must also ensure that mod_ssl is available on your server. There are other alternatives to mod_ssl; one is apache-ssl, from which the mod_ssl code was forked. However, mod_ssl's adoption has been dramatic -- nearly 20% of Apache servers were running it at the beginning of 2002.
To see which modules are active in Apache, issue the following command in a Terminal as root user on your server.
/usr/sbin/httpd -l
If you have a recent Linux distribution installed, it is likely Apache's modules are compiled as dynamic loadable modules, in which case you'll need to edit your httpd.conf file and check that the following line is uncommented.
LoadModule ssl_module modules/libmodssl.so
Restarting Apache will load the module into action. In my case, having used an RPM-based install of Red Hat and Apache, this is achieved with the apachectl command, typically found in /usr/sbin/apachectl. You can restart Apache by typing the following:
/usr/sbin/apachectl restart
There are several helpful features of apachectl, including stop, start, restart, status and check config. See the man pages via man apachectl.
Note that in recent Apache distributions, the httpd.conf file contains an section that is intended to contain the definitions for all your SSL Websites. By placing these definitions within the section, you can ensure that the sites will not be made available unless SSL support is successfully loaded on the server. This prevents any problems arising in which SSL could expose your secure sites.
Create a Local Key Pair
If you have not already done so, your first step should be to create a local private/public key from which you can generate certificate requests. These can then be used for self-signed certificates, or when purchasing a certificate from a CA.
OpenSSL allows us to use the command line to generate keys. You have the option of using strong encryption and a passphrase to secure your private key, as shown below.
openssl genrsa -des3 -out domainname.com.key 1024
Typing the above on the command line will create a private key using TripleDES encryption, 1024 being the number of bits generated in the key. There are options for lower encryption levels and making the passphrase not required, however, these are not recommended for those with servers that are accessible via the Internet.
Note that if OpenSSL is not in your path, you may need to enter the full path to the binary for this purpose; by default, it's /usr/local/ssl/install/openssl/bin/openssl. The key will be created in the directory you're in.
Finally, you should modify the permissions to restrict access to the new key by issuing chmod 400 domainname.com.key on the command line. This ensures that only the root user has access to this file, and still requires the passphrase you may have used to create the key in order to open.
Creating a Self-Signed Certificate
This is a very easy step, but again, remember that self-signed certificates should only be used for internal systems or in development and testing.
Generate your own certificate by going back to the command line and entering the following:
openssl req -new -key domainname.com.key -x509 -out sslname.crt
This command creates a self-signed SSL certificate, which can then be placed in the proper directory. Due modifications can then be made in httpd.conf (we'll cover these in just a moment).
Generating a Certificate Signing Request
To purchase an SSL certificate from a CA, you need first to generate what is called a CSR, or Certificate Signing Request. This is submitted to the CA of your choice, and is used to create the official SSL certificate that will be returned to you, and with which you may secure your Web server.
The CSR request is straightforward; it's effected on the command line with OpenSSL as follows:
/usr/local/ssl/install/bin/openssl req -new -key domainname.com.key -out domainname.com.csr
This command creates the .csr file that is sent or uploaded to a CA during the process of ordering an SSL certificate.
Receiving and Installing Your SSL Certificate
Generally, CAs provide detailed instructions for the installation of their SSL certificates; however, I'll cover some broad points here.
The CA from which you order a certificate will email you either the certificate, or a link at which you can download it. Follow the instructions provided precisely -- especially with regards to opening a certificate in a text editor. Do not use a word processor or rich text editor, as the certificate code can become corrupted. You should also take care to ensure that no leading or trailing spaces follow the beginning and end of the certificate code -- see the example code below:
-----BEGIN CERTIFICATE-----
MIIC8DCCAlmgAwIBAgIBEDANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTkwNTI1
MDMwMDAwWhcNMDIwNjEwMDMwMDAwWjBTMQswCQYDVQQGEwJVUzEbMBkGA1UEChMS
RXF1aWZheCBTZWN1cmUgSW5jMScwJQYDVQQDEx5FcXVpZmF4IFNlY3VyZSBFLUJ1
c2luZXNzIENBLTIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYna8GjS9mG
q4Cb8L0VwDBMZ+ztPI05urQb8F0t1Dp4I3gOFUs2WZJJv9Y1zCFwQbQbfJuBuXmZ
QKIZJOw3jwPbfcvoTyqQhM0Yyb1YzgM2ghuv8Zz/+LYrjBo2yrmf86zvMhDVOD7z
dhDzyTxCh5F6+K6Mcmmar+ncFMmIum2bAgMBAAGjYjBgMBIGA1UdEwEB/wQIMAYB
Af8CAQAwSgYDVR0lBEMwQQYIKwYBBQUHAwEGCCsGAQUFBwMDBgorBgEEAYI3CgMD
BglghkgBhvhCBAEGCCsGAQUFBwMIBgorBgEEAYI3CgMCMA0GCSqGSIb3DQEBBAUA
A4GBALIfbC0RQ9g4Zxf/Y8IA2jWm8Tt+jvFWPt5wT3n5k0orRAvbmTROVPHGSLw7
oMNeapH1eRG5yn+erwqYazcoFXJ6AsIC5WUjAnClsSrHBCAnEn6rDU080F38xIQ3
j1FBvwMOxAq/JR5eZZcBHlSpJad88Twfd7E+0fQcqgk+nnjH
-----END CERTIFICATE-----
Using RPM-based install defaults, my private key and the valid SSL certificates returned from a CA go into /etc/httpd/conf/ssl.key/ and /etc/httpd/conf/ssl.crt/ respectively. Your self-signed certificates should also reside in the latter directory in place of, or in addition to, formal SSL certificates issued by a CA.
This will differ depending upon how your version of Apache was installed. VeriSign offers on its site a sweeping installation guide index that covers numerous Web servers, including Apache. The Apache mod_ssl tutorial is based largely on the information available on the modssl.org Website.
Configuring Apache to enable SSL for the domain(s) you're securing occurs in the httpd.conf file. To begin, make a backup of the file. Then, open it in your favorite text editor.
You can add the virtual host domain you're securing into the section noted above. A minimal example entry straight from a default httpd.conf file is listed below for your reference. You should modify items such as paths and IP addresses to fit your own environment. The SSL port is 443 unless you're specifically adjusting the port to another port number (the SSL config appears in bold below):
DocumentRoot /home/sites/domainname.com/html
ServerName www.domainname.com
ServerAlias domainname.com
ServerAdmin admin@domainname.com
ErrorLog /home/sites/domainname.com/logs/error_log
TransferLog / home/sites/domainname.com/logs/access_log
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/domainname.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/domainname.com.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
Note that, if you perform a hard start of your server, your passphrase will be required for you to access the OpenSSL private key you created earlier. It is not prompted during reboots.
Now, you must restart Apache using the apachectl command, to ensure that all your modifications are enabled. You should then be able to access your site securely by going to https://domainname.com/.
Wrapping Up, Additional Features and Tools
As you can see, while some research, planning and effort is required to get SSL up and running, it is not an insurmountable task. In the coming weeks, I'll be blogging in Open Sourcery on SSL-related topics such as configuring Web log files to log SSL activity on the secure portion of your site, and a few interesting tools with SSL applicability. Stay tuned!
15 July, 2004 11:26
Dan Bricklin on the life of software
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
http://www.bricklin.com/200yearsoftware.htm
13 July, 2004 14:41
Componentized linux distribution - new debian progeny
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
This looks very interesting for building appliance distributions...
platform.progeny.com is the home of Progeny's componentized Linux platform. Progeny Componentized Linux is a new way of constructing Linux distributions, built bottom-up as a set of interchangeable parts that closely track their counterpart "upstream" open-source projects, rather than top-down as a monolithic, difficult-to-change whole. The core of the platform is an implementation of the Linux Standard Base (LSB), the cross-distribution Linux standard. Above the LSB core component are a collection of components, pulled from various open-source projects and Linux distributions, to complete the feature set and create a truly unified, "cross-pollinated" Linux platform.
29 June, 2004 13:44
Web services journal article on free open source .net ide
Posted by mimo under [ Development ][ (0) Comment ] | [ (0) Trackbacks ]
www.sys-con.com/webservices
by  Kyle Gabhart
You've heard the hype about .NET. You've read a couple of vague articles about dynamic discovery and invocation, service-oriented architecture, and how SOAP and a handful of other XML standards are forever changing the software industry. These ideas have intrigued you and you're interested in learning more - or at the very least, you recognize the importance of being able to add these acronyms to your resumé. In either case, you want to explore the world of .NET, but are unable or unwilling to fork over a thousand bucks for Microsoft's Visual Studio .NET product. This article is for you.
The Eclipse Project
Visual Studio .NET is not the only option for exploring .NET in a commercial-quality integrated development environment (IDE); it's just the most expensive one. On November 5, 2001, IBM released the Eclipse project (with an estimated value of $40 million worth of software) to the open-source community. The project is now maintained by the Eclipse organization (www.eclipse.org). This open-source software provides a core, extensible infrastructure for building software development environments. It also provides a basic user interface and an open API that supports the extension of the product through its plug-in mechanism. Eclipse provides a framework for producing customized software development environments that can either be used internally by an organization or repackaged and sold commercially. In fact, the Eclipse framework is the foundation for IBM's new suite of WebSphere Workbench tools.
What does all of this have to do with .NET development? When you combine Eclipse (an open-source IDE) with Microsoft's .NET SDK (a free download) and the C# plug-in for Eclipse provided by Improve Technologies (also open-source), you have a comprehensive .NET application development platform that costs no money, and uses less than 400MB of hard disk space!
This article will walk you through the process of setting up a free C# .NET development environment on a Windows 2000 machine (the recommended platform) and deploying a simple C# application. This combination of tools will also work on Windows 95/98, XP, and NT 4.0 (the .NET SDK currently limits you to a Windows OS).
Environment Setup
Before starting, check Table 1 to be sure your system has the appropriate resources for this configuration.
Although the minimum and recommended values listed in Table 1 are accurate, you'll be much happier if you have more horsepower available. I'm running this configuration on a P4 1.6GHZ Dell Inspiron with 512MB and plenty of free hard drive space.
Assuming your system has the appropriate resources, you will need to download two components:
1.  The Eclipse 2.0 IDE (www.eclipse.org/downloads/index.php):Windows OS.
2.  The .NET Framework SDK ( http://msdn.microsoft.com/netframework/ downloads/howtoget.asp): Be sure to get the SDK, not just the runtime framework. You can download the SDK as a single 130MB file (setup.exe), or ten 13MB files and a batch file (setup.bat).
Once you've downloaded Eclipse and the .NET SDK, you can install the software. To install Eclipse, simply extract the Zip file in the parent directory where you would like to store Eclipse (it will create a new directory called "Eclipse"). To install the .NET SDK, run the setup file and follow the prompts to install and register the appropriate components. (You may be prompted to first install Data Access Components 2.7 and Microsoft Internet Information Services, but these components are only needed for ASP.NET development.)
Eclipse Primer
The Eclipse IDE (shown in Figure 1) is divided into two basic levels: the Workspace and the Workbench:
- Workspace: Files, packages, projects, source control connections
- Workbench: Editors, views, and perspectives
This division isn't readily apparent, and isn't labeled within the IDE, but it is an important distinction to understand when working with Eclipse or an Eclipse-based tool.
The Workspace is very team-centric, focusing on projects and file resources as well as providing integrated source-control capabilities for these resources, such as CVS or Rational's ClearCase. The Workspace is also somewhat transient in that it reflects the current state of the local projects, source, and compiled files that are in active memory. The Workspace also consists of currently active Workbench elements (explained below). When you close Eclipse, it saves the current state of the local Workspace, allowing developers to restart Eclipse and pick up right where they left off.
The Workbench consists of the visual artifacts that sit atop the Workspace resources and provide distinct views and role-based perspectives of the underlying projects and resources. The user interface paradigm is based on editors, views, and perspectives:
Installing the C# Plugin
To install the Improve Technologies C# Plug-in, we will use the built-in update feature, the Eclipse update manager. To do so, you will need Internet connectivity, and to follow these steps:
1)Â Â Open Eclipse by running eclipse.exe in the base of the eclipse directory.
2)Â Â Open the Update Manager perspective (Help -> Software Updates -> Update Manager).
3)Â Â In the "Feature Updates" view (bottom left), right-click in the view window and select: New -> Site Bookmark...
4)Â Â Fill the Name field with "Improve's Eclipse Plugin Site", and the URL with "www.improve technologies.com/alpha/updates/site.xml". This XML file describes the plug-ins available for download from Improve Technologies, and will allow you access to those plug-ins now, and in the future.
5)Â Â A new bookmark, "Improve's Eclipse Plug-in Site," has been added. Expand it untill you find the newest Improve C# plugin feature ("C Sharp Feature x.x.x"). If you select the feature, its description will be displayed in the "Preview" view. You can read the license agreement by clicking the link.
6)Â Â In order to install the feature, click the "Install" button in the "Preview" view: click "Next" for each page; and then "Finish". On the last page ("Feature Verification"), click on the "Install" button. Eclipse will automatically install the feature, and you will be asked whether you want Eclipse to reboot or not. Say yes.
7)Â Â Once Eclipse has rebooted, you can check that the feature has been installed: expand the item "Current Configuration" (in the "Install Configuration" view), and you will find the feature in the list of the installed features. If you expand "Configuration History", you will see all the previous configurations. You can save a specific configuration so you can restore it later: right-click on a configuration and click "save".
8)Â Â The last step is to configure the new Eclipse C# perspective to use the .NET C# compiler that was installed with the .NET SDK earlier. To configure the C# compiler, navigate to the Eclipse Workbench preferences (Window -> Preferences) and select the C# Preferences item. This preferences window should now look similar to Figure 3. To specify the C# compiler (csc.exe), click the "Browse" button and navigate to the Microsoft .NET/Framework directory. On Windows 2000, that directory is C:WINNTMicrosoft.NETFrameworkv1.0.3705csc.exe. (The name of the directory under the Framework directory may vary depending upon what version of the .NET SDK you have installed.)
Sample C# .NET Application
Now we'll walk through the creation of an Eclipse project containing a single C# program. We'll verify our success by executing the completed program, and finally, we'll touch on a few of the available application development tools (keyword content assistance, task view usage, and file-level compiler arguments) that come with Eclipse and the C# plug-in.
To begin, we'll open a new project. As with any good tool, there are several ways to do this. You can click the "New Wizard" button directly (leftmost button below the menu bar), select the New Wizard drop-down (the drop-down arrow on right-hand side of New Wizard button), or use the menu bar (FileNewProject). The New Project window should now be open. Select "Simple" on the left and "Project" on the right. Click the "Next" button, assign a unique name for the project, and then click the "Finish" button.
Next, use the File menu or the New Wizard to create a new C# file. If you use the New Wizard drop-down or File menu, select the "Other" option (this is the equivalent of clicking the New Wizard button directly). Whichever path you take, the New window will provide two categories: C# and Simple. Select the "C#" category on the left and "C# File" on the right. Click the "Next" button and provide a name for the C# file. We'll use "CSharpTest.cs" for this example ("new_file. cs" is provided by default). Also, be sure that the correct project name is provided in the Container field. Finally, click the "Finish" button.
Now it's time to actually write the program. Enter the code displayed in Listing 1. When run, this code constructs a simple object with a single instance field of type DateTime containing a value corresponding to the current system time and date. The program output consists of a brief text greeting followed by the current time and date.
To save the file, click the disk icon at the top, use the menu system (FileSave), or hit Ctrl-S. When you save, Eclipse will also attempt to automatically compile the program (unless you turn this option off in the C# Preferences window). If there are any compilation problems, they will be displayed in the task view below the C# editor. Once you have resolved those issues, you are ready to execute the application. To do this, simply double-click on the CSharpTest.exe file that appears under the project you created. The result should be two lines of text. The first line displays a simple greeting and the second displays the time and date. To end the program, simply hit the return key.
Finally, there are a couple of features in Eclipse that you may find useful:
Conclusion
Web services are hot! (That's why you bought this magazine.) The .NET platform offers some intriguing possibilities for the development of XML Web services, and it's a good idea to explore it now and become familiar with the basic constructs. Unfortunately, the price tag on Visual Studio .NET is high, and setting up Visual Studio is a pain in the neck. The Eclipse Workbench, together with Microsoft's .NET SDK and Improve Technologies' C# Plugin, provides a powerful combination of tools that allows you to experiment with C# .NET application development, using a full-powered IDE - without paying a penny. Enjoy!
Author Bio
Kyle Gabhart is a senior mentor for LearningPatterns, a dynamic knowledge company providing world-class mentoring, training, and consulting to clients all over the world. Kyle is a popular national speaker, and a prolific writer, with more than a dozen technical articles and books to his name. You can find Kyle on the Web at www.gabhart.com.
Listing 1:
using System;
namespace CSharpTestNamespace {
class CSharpTest {
private DateTime currentDate;
CSharpTest() {
currentDate = DateTime.Now;Â
}//end CSharpTest()
public static void Main() {
CSharpTest cst = new CSharpTest();
Console.WriteLine( "Hello there." );
Console.WriteLine( "Today is " + cst.currentDate );
Console.Read();
}//end Main()
}//end class CSharpTest
}//end namespace CSharpTestNamespace




