Jun182008

How to Check Certificate expirations on IIS with custom script.

Published by mikedopp at 1:59 PM under Web Development | Interesting | Hacks

Recently I ran into a SSL cert issue. I run a small e-commerce site and was doing some testing on it. Got to the buy now feature (when the site switches from non- SSL to SSL or http to https) I received a your SSL cert has expired. What? No I remember I purchased it forever ago but it shouldn’t be up now why did I have no warning?

Well with the help and guidance of the crew @ AwesomeIdeas I found a way to look up my SSL Certificate life.

 

copy & paste script below into a file called "CertExpirationCheck.vbs" and run the script from command line

When in the command prompt use the following parameter:

C:\> cscript certexpirationcheck.vbs [SubjectName]

C:\> cscript certexpirationcheck.vbs mikedopp.com

CertExpirationCheckScript

'**************************************************
'* CertExpirationCheck.vbs
'* Enumerate certificates with day left for expiry 
'**************************************************

Option Explicit
Dim SubjectName
If WScript.Arguments.Count > 0 Then
    SubjectName = LCase(WScript.Arguments(0))
Else
    CommandUsage
End If

Dim Store, Certificates, Certificate
Const CAPICOM_LOCAL_MACHINE_STORE = 1
Const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1        
Const CAPICOM_STORE_OPEN_READ_ONLY = 0

Set Store = CreateObject("CAPICOM.Store")
Store.Open CAPICOM_LOCAL_MACHINE_STORE, "MY" ,CAPICOM_STORE_OPEN_READ_ONLY
Set Certificates = Store.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME, SubjectName, 0)

If Certificates.Count >0 Then
   For Each Certificate in Certificates
    'Certificate.display()    'If you want to see the Cert in UI
    WScript.Echo "*** Subject " & Certificate.SubjectName & " ***"
    WScript.Echo "Issued by " & Certificate.IssuerName 
    WScript.Echo "Valid from " & Certificate.ValidFromDate & " to " & Certificate.ValidToDate 
    WScript.Echo "Days to expiry " & DateDiff("d",now(),Certificate.ValidToDate)
    WScript.Echo 
   Next
 Else
  WScript.Echo "No certificates with SubjectName => '" & SubjectName & "'"
End If

Set Certificates = Nothing
Set Store = Nothing

Sub CommandUsage
  MsgBox "Usage: CertExpirationCheck.vbs  [SubjectName] ", vbInformation,"CertExpirationCheck"
  WScript.Quit(1)
End Sub
 
 



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Jun172008

Increase your timeout on submit in Infopath 2007

Published by mikedopp at 4:39 PM under Web Development | Web Fun | Interesting | .NET Applications

Here is how to change the Timeout in infopath 2007

XDocument.QueryAdapter.Timeout=120;

XDocument.Submit();

XDocument.UI.Alert("Thanks for using the AD Data Collection Form");

 



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: , ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Jun122008

What does a Web Site cost? A break down.

Published by mikedopp at 10:14 PM under Web Development | Web Fun | Interesting | Addictions | .NET Applications

People constantly ask: Will you build me a site as a favor? The answer is no unless your my wife or my mom. Some business’s think that a web developer or designer are gifted and it is just easy to put something on the web. To them I say if you want free go create a site on blogger or on myspace.com.

Still the question remains: How much should a site cost?

Remember a developer can develop and a designer well designs and you will want it (the site) maintained. These costs are not usually included unless you can talk a developer to do so (includes more money).

Like the businesses they represent, web sites are not all created equal and serve various purposes, therefore they can vary greatly in cost as the level of design and functionality increases and becomes more complex to suit your company’s needs.

>$2000 A basic designed web site, acting primarily as an online brochure to merely establish a necessary presence online to answer the questions ‘do you exist?’, ‘are you professional?’ and ‘what do you do?’, can be done for a mere market average of $2000. This web site will not allow you to interact with your audience (social networking, blog), transact business directly through your site (ecommerce), or enable you to manipulate and update the pages and content within your site without hiring a web programmer/designer to do it for you(Content Management System does enable this for more $$$).

But the site will serve to help brand and market your company, showcase your products and services and inspire sales as a lead generating tool.

Unfortunately, the design of your web site will be template at such low costs. This means that your site probably mirrors that of other sites on the web with similar design and structure.

 

$3000-$7000 Custom designed web sites, with all the aesthetic beauty that you can possibly envision, costs a market average of $5000. These sites are not very functional but are extraordinarily pretty and all design elements are created and designed specifically for your site and tailored to your market needs. These sites will still not enable audience interactivity, ecommerce, or content management. The sites cost is all due to the number of hours it takes to create beauty within the pages of your site.

The site will serve the same necessary purposes that a basic designed web site will but will be far more aesthetically pleasing and custom to your businesses desires.

-Not recommended. The reason is you do not want a site that is just pretty. Why pay for pretty without functionality?

$7000- $12,000 Depending on the level of aesthetic design that is requested Content Management System (CMS) web sites will run at a market average of $10,000. These web sites are created with both functionality and design in mind, as you will receive both custom art design and mid level functionality including the ability to manage and update all content, images, and text contained within the pages of your site (infinite number of pages possible). With a CMS capable web site, your site will have endless possibilities as a pluggable, flexible web application capable of adding additional features as you desire.

These web sites are built with the idea that you will have a significant number of changes, additions or updates to be made to your site in the near future. Instead of being charged hourly rates to make such changes, a CMS system enables you to do a majority of the basic additions without prior coding or web designing knowledge.

Social interactivity with your site visitors is possible with a site of this caliber, as a BLOG will be present within your site enabling you to place posts of content that you believe is relevant and desired by your audience. Your audience can choose to respond to your blog posts and each others comments allowing for 2 dimensional interaction between you, your audience, and within your audience.

Some ecommerce and real state listing sites can be created within this price range depending upon level of functionality and design.

Also, sites of this caliber have varying prices with regard to design elements. These sites do have custom design work, but more expensive elements like Flash Art creation will affect pricing.

$12,000- $100,000+< If you are looking for advance functionality including social networking, blogging, ecommerce, or any other web application topped off with the markets leading design elements, you should expect to pay a market average of $25,000! Like I said before, some ecommerce and web applicable sites can be created for less, while most successful ventures are created for much more.

Sites that have fallen in this price range include Facebook.com, Twitter.com and Digg.com to name only a few.

A site within this price range will be built and hand coded from scratch. That means your site is unlike any other and requires the attention and expertise of an experienced web application developer(s) and web site designer(s). A site that falls into this category requires months of market analysis, software research, consulting, database design and implementation, software development and integration, site quality assurance and testing. This is the mother load and it is priced accordingly.

I know what you are thinking, ‘who knew it was so expensive?’ And the only answer I can give is that web design and creation is like any other craft or trade and requires a high level of knowledge and expertise. Furthermore, with the rapid rate that technology and the internet is constantly changing, the gap is beginning to seriously widen between web amateurs and professionals. Can you still get a web site for $500? Sure you can, but it will not display and operate like a professionally designed web site will and it will be as ineffective and unsuccessful as the individual who designed it.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

Jun092008

The Truth about Being a Developer.

Published by mikedopp at 11:55 PM under Web Fun | Web Development | Interesting

developers

Enough said.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Trackback | Post RSSRSS comment feed 1 Responses

Jun092008

Tools I love: NDepend for Visual Studio 2005/2008

Published by mikedopp at 10:39 PM under .NET Applications | Interesting | Web Development

 

TitlePic

I know what your thinking. Oh crap here he goes again with recommending tools and or services. My question is have I ever steered you wrong?

Yes I normally deal in freeware tools. Mostly due to me being cheap and thinking my skills should push me past that latest issue with code. So why recommend an commercial tool? Good question. A friend recommended to me this tool. I had used tools like .net reflector to look into DLL’s to understand the application I am adding. I had heard rumor of NDepend however with all the different “N” products out there I was like another database OR mappers right? Or maybe another subversion type software.

So I downloaded the tool to see what if anything this tool had to offer. So once I downloaded the software and ran it. I was interested to see what it would do.

InstallNDependVS

 

 

 

 

 

 

 

 

 

 

It installed nicely into Visual Studio 2005 as well as Visual 2008. A plugin for an Addin for Reflector.

I wanted to see what it would do with one of my most complicated E-commerce applications (http://www.Buylifetime.com). I was surprised to notice the amount of extra DLL’s I was not in need of to make the application to work.

Simply put this application should be included with all Visual Studio Installs. It is that important. If Performance as well as clean code is important to you or your business you should have this to view all your important applications.

I would like to go over all the great features as well as the benefits however they are too much and too many to list.Purchase your copy today and see how much more rapid your development becomes.

NDepend  includes a list of CQL rules and queries in VisualStudio that will update it in real-time each time the developer compiles. This way, the developer know as soon as he is doing a mistake. Also, the possibilituy to query the codebase real-time can be useful in Visual Studio.

 

 

 



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: , ,

E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses