Larry Steinle

March 30, 2011

Image Fading Effects

Filed under: Web — Larry Steinle @ 9:01 pm
Tags: ,

A commonly requested feature for web pages is to cycle thru a list of images fading each image over the previous image. In today’s post we will use JQuery to provide this capability with the added benefit that once created we can control the list of images to cycle with HTML image tags and no JavaScript changes.

(more…)

Advertisements

March 25, 2011

C# IsNumeric Function

Filed under: RegEx,VS.Net — Larry Steinle @ 2:32 pm
Tags: ,

I have been a Visual Basic programmer for the last ten years. I truly enjoy writing in this language. However, I also write software in C#. One of the things I have noticed that is missing from C# is a simple routine that tells me if a value is a number. Of course I could reference the Microsoft.VisualBasic namespace. Since I don’t want to be ostracized by the C# community I created a C# IsNumeric function using a regular expression instead.

(more…)

March 20, 2011

AD Query: Putting it All Together

Filed under: Active Directory,VS.Net,Web — Larry Steinle @ 11:20 am
Tags: , , , ,

In the previous seven posts we learned how to construct an Active Directory Data Access Layer. In today’s post we will use the AD DAL to create an Active Directory Query tool. AD Query will allow us to select, insert, update and delete objects in Active Directory with a familiar intuitive interface. Best of all, AD Query will demonstrate just how easy it is to work with Active Directory now that we have implemented the DataBase Access Layer.

(more…)

March 19, 2011

AdDataAdapter: Managing Active Directory Data

Filed under: Active Directory,VS.Net — Larry Steinle @ 1:05 pm
Tags: , , ,

The DbDataAdapter defines a standard interface to manage read, write and delete actions against a data source from a single class. The DbDataAdapter uses the DbConnection and DbCommand classes to access and manage the data. In today’s post we will create the AdDataAdapter so that we can more easily manage Active Directory data.

(more…)

March 18, 2011

AdDataReader: Providing Controlled Access to AD Values

Filed under: Active Directory,VS.Net — Larry Steinle @ 8:18 pm
Tags: , , ,

Today we will implement the DbDataReader class which enforces a contract that defines how to make data available to applications. (more…)

March 17, 2011

AdCommand: Running Active Directory Queries

Filed under: Active Directory,VS.Net — Larry Steinle @ 9:20 pm
Tags: , , ,
In our previous posts we learned how to connect to Active Directory and how to parse SQL statements. In today’s post we will cover the classes required to implement the DBCommand interface. The DBCommand interface that will be implemented will use the AdComandTextParser to build the DirectoryEntry and DirectorySearcher objects which will be used by the AdDataReader to read the results from Active Directory.
(more…)

March 14, 2011

Strategies to Reduce the Risk of Code Injection Attacks

Filed under: Security,VS.Net,Web — Larry Steinle @ 12:22 am

In 2007 Symantec reported that 80% of web hacks utilized a variant of the cross-site attack. Hackers use a cross-site attack to run their own code in another website that is trusted by the unsuspecting user. The cross-site attack is a type of code injection attack. In today’s post we will review the various types of code injection attacks and discuss multiple strategies to mitigate the risk of unintentionally becoming the host for the attack or the target of the attack.

(more…)

March 12, 2011

AdCommandTextParser: Parsing SQL Statements

Filed under: Active Directory,RegEx,VS.Net — Larry Steinle @ 11:48 pm
Tags: , , , ,

The most difficult task in the construction of the Active Directory Data Access Layer was parsing the SQL Statements so that the information would be easily accessible to populate the DirectorySearcher object. In today’s post we will review the capabilities of the parser followed by the sql statement parsing code.

(more…)

March 9, 2011

Argument Validation

Filed under: Security,VS.Net — Larry Steinle @ 9:07 pm
Tags: , , ,

I wanted to take a small break from the Active Directory Data Access Layer to discuss a best practice that should be considered when constructing a code library. The first priority when constructing a reusable code base is the class diagram. The structure of the classes and the names of the methods impact how easily a class library can be to implement. Equally important is the careful attention to detail for argument values.

(more…)

March 6, 2011

AdConnection: Enforcing Active Directory Communication Best Practices

Filed under: Active Directory,VS.Net — Larry Steinle @ 10:08 am
Tags: , , ,

On the one hand, to avoid running out of memory requires disposing of your Active Directory objects as soon as you are done with them. On the other hand, if you dispose of all Active Directory objects you will run out of communication ports. In today’s post we will create an Active Directory Connection object aptly named, AdConnection, that will ensure shared connections are used while reducing the risk of running out of memory.

(more…)

Next Page »

Blog at WordPress.com.