Home | Blog | Screencasts | Projects
# Wednesday, February 25, 2009

I’ve started working on a new project for work, it’s going to be a fairly large build job. Recently we started looking at various ORM’s, for a number of reasons we settled on the Telerik OpenAccess product. The Visual Studio integration is pretty nice and it has all the features that you would expect from a commercial ORM, the one complaint that I have is the limited LINQ support.

In any case I ran into a problem with some prototype code, I had setup a post build script to run that would copy the assembly to a SharePoint bin directory, but I would always get the following error message when I tried to execute any ORM related code:

 

“Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction. This may be caused by a missing app.config file (use app.config as embedded resource then) or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too) or by a wrong enhancement setting; please check your configuration”

 

It turns out that the Telerik tool uses a tool called VEnhance which will inject IL into your assembly, this IL is responsible for tracking changes in your persisted entities. What was happening was the build event would run before the VEnhance tool, so it was copying the assembly without the ‘enhancements’. An easy way to tell is to compare the assembly size, obviously the ‘enhanced’ version will be larger.

Wednesday, February 25, 2009 8:50:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
ORM | Tip
# Wednesday, February 18, 2009

I was looking for a new smaller (i.e. lighter) laptop for out of work use, I settled on a Dell Mini 9 after reading a number of good recommendations. My only gripe so far is the keyboard, I’m still miss hitting keys and the keyboard layout still causes me to look at the keyboard more than I would like, but I can see that I will get used to it, it’s not unusable like the Asus eeepc.

 

I thought a new machine would be the perfect time to give Windows 7 a good try, so far it’s been great.

I really like the new taskbar of Windows 7, but one thing I found after a few days of using the keyboard shortcut of ‘windows key’ + m, was the ‘show desktop’ button at the far right of the taskbar, it’s a little button that when clicked will show the desktop. It seemed fairly hidden (at least for me).

 

image

Wednesday, February 18, 2009 9:26:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Tip | Windows 7
# Thursday, February 05, 2009

I’ve been a big fan of JQuery for a long time now, as I find myself using the ASP.NET MVC framework more and more, I find that I’ll tend to look towards a JQuery plugin as my first port of call if I need some client side functionality. However I’ve worked with a number of people who really like the ASP.NET AJAX control toolkit, usually these people don’t have much exposure to the vast richness of the JQuery landscape. So I thought it might be useful to point out some JQuery equivalents to the ASP.NET Ajax control toolkit:

 

ASP.NET Control Toolkit Accordian

JQuery:

image

http://jquery.bassistance.de/accordion/demo/

 


ASP.NET Control Toolkit Always Visible

JQuery:

This control shows a section of text that is always visible.

image

http://www.west-wind.com/WebLog/posts/388213.aspx

Alternatively the following code will provide the same effect as the ASP.NET control:

 

   1: $(window).scroll(function() {        
   2:         $('#jqueryScroll').animate({ top: $(window).scrollTop() + "px" }, { queue: false, duration: 350 });
   3: });

 


 

ASP.NET Control Toolkit Autocomplete

JQuery:

When you have typed more content than the specified minimum word length, a popup will show words or phrases starting with that value, the JQuery version can be easily bound to an ASP.NET MVC view that returns JSON data.

image

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

 


 

ASP.NET Control Toolkit Calendar

Standard calendar functionality

JQuery:

image

http://dev.jquery.com/view/trunk/ui/demos/functional/#ui.datepicker

 


 

ASP.NET Control Toolkit Cascading Dropdown

Surprisingly I couldn’t find a prebuilt JQuery plugin, the following links do show how simple it is to create using JQuery:

JQuery: http://devlicio.us/blogs/mike_nichols/archive/2008/05/25/jquery-cascade-cascading-values-from-forms.aspx

Other notable method (http://weblogs.asp.net/stephenwalther/archive/2008/09/06/asp-net-mvc-tip-41-creating-cascading-dropdown-lists-with-ajax.aspx)

 


 

ASP.NET Control Toolkit Collapsible Panel

JQuery:

image

http://roshanbh.com.np/2008/03/expandable-collapsible-toggle-pane-jquery.html or http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/

 


 

ASP.NET Control Toolkit Confirm Button

Very similar in functionally to the modal dialog plugin and the thickbox plugin.

JQuery:

image

http://www.ericmmartin.com/projects/simplemodal/

 


 

ASP.NET Control Toolkit Drag Panel

The standard JQuery UI library has the Dialog feature which is on par with the ASP.NET control toolkit.

JQuery:

image

http://docs.jquery.com/UI/Dialog

 


 

ASP.NET Control Toolkit DropDown

Simple menu drop down navigation

JQuery:

image

http://ayozone.org/2008/02/06/drop-down-menu-with-jquery/

 


   

 

ASP.NET Control Toolkit Drop Shadow

Create drop shadows around page elements, no images needed.

JQuery:

image

http://plugins.jquery.com/project/DropShadow

 


 

ASP.NET Control Toolkit Filtered Textbox

This plugin will restrict the input of a textbox, it may be used to allow only numeric input.

JQuery:

http://www.texotela.co.uk/code/jquery/numeric/

 


 

ASP.NET Control Toolkit List Search

The implementation of the JQuery control is a little bit different to the ASP.NET Ajax control, but it may still be useful.

JQuery:

image

http://rikrikrik.com/jquery/quicksearch/#examples  or  http://ejohn.org/blog/jquery-livesearch/

 


 

ASP.NET Control Toolkit Masked Edit

Another control that prevents certain input from being entered, this control allows for a mask to be displayed to help the user.

JQuery:

image

http://digitalbush.com/projects/masked-input-plugin/

 


 

ASP.NET Control Toolkit Modal Popup

A plugin that helps create modal experiences.

JQuery:

image

http://famspam.com/facebox or http://www.ericmmartin.com/simplemodal/ or  http://jquery.com/demo/thickbox/

 


 

ASP.NET Control Toolkit Slider

Create a winforms like slider.

JQuery:

image

http://docs.jquery.com/UI/Slider

 


 

ASP.NET Control Toolkit Mutually Exclusive CheckBox

Not so much a plugin, but sample code to show the concept.

JQuery: http://blog.schuager.com/2008/09/mutually-exclusive-checkboxes-with.html

 

 


 

ASP.NET Control Toolkit Numeric up / down

A textbox control that has buttons to increment or decrement the number, much like the numeric spin button in winforms.

JQuery:

image

http://plugins.jquery.com/project/spin-button

 


 

ASP.NET Control Toolkit Password strength

A control that will help users pick a strong password.

JQuery:

image

http://plugins.jquery.com/project/pstrength or http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/

 


 

ASP.NET Control Toolkit Rating

The star rating control is flexible enough to work on down level browsers.

JQuery:

image

http://www.fyneworks.com/jquery/star-rating/#

 

 


 

ASP.NET Control Toolkit Resizable Control

Turns any DOM element into a resizable control, the user can expand the element by dragging the corner to make the control the desired size.

JQuery:

image

http://docs.jquery.com/UI/Resizables

 


 

ASP.NET Control Toolkit Rounded Corners

Use JQuery to create rounded corners without using images (if your browser doesn’t have an extension to create them).

JQuery:

image

http://plugins.jquery.com/project/corners

 


 

ASP.NET Control Toolkit Slide Show

A number of Slide Show and image carousel plugins are around, I’ve picked a couple below:

JQuery:

image

http://malsup.com/jquery/cycle/  or http://www.gmarwaha.com/jquery/jcarousellite/

 


 

ASP.NET Control Toolkit Tabs

JQuery:

The JQuery tab plugin is very powerful, it allows you to keep tight control over the page HTML

image

http://docs.jquery.com/UI/Tabs

 


 

ASP.NET Control Toolkit Textbox Watermark

A watermark control is simply a textbox with either an image or text inside that disappears when the user clicks inside the textbox.

JQuery:

image

http://plugins.jquery.com/project/jWatermark

 


 

ASP.NET Control Toolkit Validator Callout

JQuery:

An apples for apples equivalent can be found below

image 

http://www.carnovsky.net/samples/jquery_callout_plugin.htm 

Or a more complete and extensible validation plugin (which rivals the ASP.NET validation framework) :

image

http://jquery.bassistance.de/validate/demo/

Thursday, February 05, 2009 6:47:47 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback

# Wednesday, February 04, 2009

I came across an interesting problem today, the MySite link was incorrect, it was working the previous day.

The first step I took was to look at the SSP, which showed that the correct My Site location was entered.

The second step was to look at the Alternative Access Mappings, again they looked OK.

By now I suspected that the ISA server was doing something funny, we had asked the network guys to publish a new rule, so I had a look at the rule settings and found the culprit:

 

linktranslation

Notice the ‘Apply link translation to this rule’ checkbox, the ISA server was looking at the HTML returned by MOSS and changing the MySite entry, it’s actually a pretty cool feature of ISA that is handy if you are accessing your web application from the internet (to your intranet). But in my case it wasn’t needed and incorrectly setup.

I thought it was an interesting problem, by logically stepping through each potential cause and eliminating it, the root cause was discovered pretty quickly.

Wednesday, February 04, 2009 4:13:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
ISA | MOSS | Sharepoint
# Tuesday, February 03, 2009

A new whitepaper has been published on MSDN:

Analyzing SharePoint Usage

 

This whitepaper covers in detail the process of using LogParser to deeply analyse the logs produced by SharePoint.

Some of the topics covered include:

 

  • Using LogParser
  • Counting users
  • User type distribution
  • Requests (RPS) distribution over time
  • Distinct users over time
  • User agent distribution
  • Slow pages
  • Offlice web service usage

 

A lot of this information applies to any web application, not just SharePoint sites.

Tuesday, February 03, 2009 12:33:19 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Sharepoint | WhitePaper

I came across a weird problem with IE and the way it automatically passes credentials to an intranet site. Basically we had an intranet site in the form of http://<intranet name>.<domian name>, e.g. http://intranet.httpcode.com.

Now if users set their homepage directly to this, they would be prompted to authenticate on the first page load, however if you first browsed to another site first (didn’t matter what it was, it could be google.com), then the intranet URL, IE would not prompt you to authenticate, it would work as expected. It’s as if IE didn’t know that the intranet site was in the Intranet zone on the first load.

I found this KB article, I’ve highlighted the interesting bit below:

http://support.microsoft.com/kb/258063

  • Internet Explorer must consider the requested URL to be on the intranet (local). If the computer name portion of the requested URL contains periods (such as http://www.microsoft.com and http://10.0.0.1), Internet Explorer assumes that the requested address exists on the Internet and does not pass any credentials automatically. Addresses without periods (such as http://webserver) are considered to be on the intranet (local); Internet Explorer passes credentials automatically

We ended up just creating the intranet site without a period, i.e. http://intranet this seems to work, in that IE on the first load passes the credentials on properly.

I’m not really sure what to say about this problem (if it is really a problem), I couldn’t find any relevant references on the web about it. Any ideas?

Tuesday, February 03, 2009 12:33:07 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Tip
# Sunday, February 01, 2009

Recently I had to write a SQL Server Reporting Services Report that used a web service for the data source, the web service returned a horrible .NET DataSet object which I had no control over.

To use a web service from Reporting Services, the first step is to create a new Data Source of type: XML:

 

image

Then enter the URL to the web service in the connection string section.

The next step is to create a new DataSet for the report.

In the Query Designer enter the following:

 

<Query>
   <Method Name="<web service method name>" Namespace="<webservice namespace url>”>
   </Method>
   <ElementPath IgnoreNamespaces="True">
<web service method name>Response/<web service method name>Result/diffgram/NewDataSet/Table1   (replace Table1 with the dataset name if used)

    </ElementPath>

</Query>

 

If you need to pass parameters to the web service, this can be done by adding something like:

 

<Parameters>
       <Parameter Name="<parameter name>">
           <DefaultValue></DefaultValue>
       </Parameter>
   </Parameters>

But be sure that the case of the parameter name is exactly the same as the parameter in the report that you wish to pass in.

Sunday, February 01, 2009 9:05:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
code | Reporting Services | SQL 2008 | SQL Server
Statistics
Total Posts: 191
This Year: 4
This Month: 0
This Week: 0
Comments: 41