Storing XML in Cookies and "dangerous Request.Cookies value" in ASP.Net

by demtron on Saturday, February 28, 2009 05:32 PM

By design, when attempting to store XML data in a cookie, the .Net Framework will raise the a HttpRequestValidationException because request validation is enabled according to Microsoft.  This is a good security mechanism to help avoid script submissions via HTTP.  Rather than turning off validation, one way to eliminate problem is to use HttpUtility.UrlEncode and HttpUtility.UrlDecode to replace suspicious characters with acceptable characters.  For example, to store an XML string to a cookie, one could use the following code:

HttpContext.Current.Response.Cookies.Set(New HttpCookie("Books", HttpUtility.UrlEncode(XMLstring)))

Converting .Net DataTable to an XML String

by demtron on Saturday, February 28, 2009 05:19 PM

Here is a snippet of code that will convert a VB.Net DataTable into a string of XML.

Dim SB As New StringBuilder
Dim SW As New IO.StringWriter(SB)
Items.WriteXml(SW, Data.XmlWriteMode.WriteSchema)

This code writes the contents and schema of the DataTable in to a StringBuilder by way of a StringWriter object.

Milwaukee SEO: Choosing Keywords for Traffic

by demtron on Tuesday, February 10, 2009 09:41 AM

When forming SEO strategies for a Web site, appropriate keyword choice is critical for bringing in targeted traffic.  Choose the right words, and all the rest of your efforts will be rewarded.


SEO Keyword Choice: An Example

A prospective client approached me for advice on this Web site on which he sold a dip for potato chips.  He told me that his site ranked well but his traffic and sales were poor.  He indicated that he was optimizing his site for the phrase “chip dip”.  It was clear that he did a number of the right things on the site with title tags, linking and good natural text.  I suspected that the problem was with the phrase he chose for his SEO efforts.

On Google, a search for this phrase yielded 297K results and for the two words alone yielded 518K.  Not bad.  One keyword traffic tool indicated that the phrase had 40.5K searches in Google in the previous month.  Still not bad.  What was missing?

Then, it hit me.  Taking a look at the PPC ads for that phrase, there just weren’t that many.   And, there were only three of them.  One might expect this from a really narrow niche or localized search term.  Each one led to a search results page at Target, Amazon, and eBay - not exactly high quality ads.  I began to explore alternatives.

Better Keywords for SEO

Using a few different keyword research tools led to few promising alternatives.  The word Appetizer had some strong traffic as well as PPC interest, but that was it.  The competition for Appetizer was extremely strong, and I felt that his site would get lost in the shuffle even further on his small budget.

I explored several variations such as party appetizers, easy appetizers, and best appetizers.  All of these terms offered more traffic and more PPC interest than chip dip.
I suggested that he create multiple pages that were targeted for different related phrases.  Because his whole site was concentrated on one phrase for SEO and it was a poor selection, his site was casting a small net out to a small audience that would likely never find the site.  By targeting multiple related phrases across the site and tying them together with good internal linking, he would definitely raise his chances of attracting targeted traffic.

Did he follow this advice?  It has been about a month since we last spoke, and I don’t see any change to his site yet.  Hopefully, he didn’t abandon his SEO efforts.


Free, Easy Project Management Templates for Excel

by demtron on Tuesday, February 10, 2009 09:15 AM
One project in which I’m involved requires a small amount of project management for a team of 3 resources plus an outsourced software development group.  The project lead is the owner of the company and needed a high-level project plan with a simple interface for maintaining items in the work breakdown structure.  Sounds like we could use MS Project, right?

The owner uses a Mac, for which MS Project is not available, and has no experience with PM software to boot.  MS Project would probably be overkill, but the project is of sufficient scope and duration that a basic project management tool is needed.  In the interest of keeping things moving forward and finding a low- or no-cost PM tool, I began hunting for simple templates.  Why reinvent the wheel if someone else has already created something that works OK?

In general, all the templates I found offered at least one, but not all of the following:

  • Simple task dependency tracking (start-to-finish)
  • Gantt chart generation from a WBS
  • Rollups
  • Color coding of task status
  • Budgeting
  • Tracking by the hour

In the interest of meeting the tight time deadline, I decided that we needed one that could create a simple Gantt chart (no dependencies needed) and handle start/finish dates, percent completion and resource assignments.  I found a great set of them at .  I picked the Gantt chart with auto-bars version.

Here's an example of what the Gantt chart looks like with some tasks filled in:

We’ll see how this works.

Powered by BlogEngine.NET
Theme by Mads Kristensen · Adapted by Demtron

Bookmark and Share


<<  July 2024  >>

View posts in large calendar
Log in

Milwaukee SEO Company

Milwaukee Access Programmer/Developer

Milwaukee Website Designer and Developer

Marketing / SEO

Blog Directory
blogarama - the blog directory
Milwaukee area SEO, SEM, ASP.Net