Friday, February 24, 2012

BLOB to File Server Caching with ASHX

I am doing an interesting User Story this sprint. The app is a Silverlight app.
The files are uploaded to the file server and/or database.

What I want to do is build a caching system.
This is easy using asynchronous ASHX. The idea is to save the file to the DB as a BLOB. There will be an index - a primary key (pk) on the table. So with this index and a Url like the following we cache out to the User in Silverlight:
http:///cachier.ashx?pk=9

With this and making the ASHX asynchronous - ASHX is a Generic (HTTP) Handler, with a shorter lifecycle than a "page" - it should return immediately, so if numerous requests are queued up they will cache-back to the User, Silverlight Client, immediately and all of them will stream out much faster than if it were one at a time. The ASHX gets an async request, makes an async call to the DB to get the row referenced by the primary key (pk=9 in the above example) and returns to the client, thus releasing the client to make other requests. When the DB returns from the async DB request with the row referenced, the ASHX will check the file-cache and stream out directly from the file, but if not, the BLOB will be streamed out in moderately sized chunks to the client, and to the file system so future requests can be handled faster.

The files will build up, so one additional piece is semi-required:
a "sweeper" to clean up the older, less referenced cache files on a regular basis.

If I can, I will post some of my code here to illustrate.

Thanks,
Dan

Wednesday, June 23, 2010

Federated Search at Nashville SharePoint Users Group last night

I visited the Nashville SharePoint Users Group last night to talk about Setting up Federated Search. Unfortunately I was informed I could not use anything or say anything about my former employer... so I just decided to on a wing and a prayer to tell a story 'bout a Federated Search implementations from an anonymous aspect, without any props.

I talked about Search & Shared Service Provider (SSP) in the Central Admin web-kiosk.
But I couldn't show the clicks thanks to former employer X.
I talked about the local location - for indexing SharePoint itself normally - and the OpenSearch location - where you specify the url to perform the search and the XSLT for instance.

I told about how to put together the search pages, the search result pages, how to edit the webparts on the search results page to show more results. Once everything is setup and QA'ed, the idea for easy deployment is to use the export and import functionality for the webparts and locations.

So you get something working in staging and put it into production fast, exactly and safely by importing into production various settings files that you just exported from staging. This way you avoid debugging typos. Normally you can't know 100% everything. You ultimately have to edit something, either in an exported settings file or once it's imported.

Well, it went well with lots of questions and participation from the audience.

Dan

Saturday, April 17, 2010

Good Day Sunshine, fun last week

I'm fired up today, working sitting on my poarch in the dim semi-cloudiness - good for seeing a laptop screen. I've got tons of Silverlight to code today, yardwork-as-usual, and tada! I've got a new laptop from my new job to do some remote-desktop'ing with, YEAH!
I'm such a geek. But I love to fish as well and I'll do that later by the glory of our beautiful 100% all-natural Universe, I'll hit the trail ney'on sunset, assuming 20% chance of rain means none, and take one or both sons with me, and we _will_ catch that bigun'... the _infamous_ big river-bass, a badass bass who lurks and hides behind twiggs thinking we can't comprehend his location.

We will haul in that bigun' and and and.. well, we'll shoot him. Yep, we'll take a snapshot with the phone and let em' go back to the waterways to live, prosper and fight another day. I'll post a few pix from last fishing trip later on.

But back to biz - bizspark, websitespark, dreamspark - on Thursday I presented to the Web Developers Users Group for the Nashville .Net Users Group on Power Programming. It went great (and we talked about BizSpark at one point)! The group was so excellent and interactive... I couldn't ask for a better group of dedicated-to-improvement developers. Nashville in general ROCKS for .Net developers; some really great folks here - true brainiacs! many many of them. It's great working here because of that; the people in this small "big-town"really make it comfortable and I like the learning as well. I usually work with some super bright ones here, as well as Huntsville Alabama (good ol' Rocket City USA!).

But this meeting was nice - met a few new friends too! one was the new sponsor FireFlyLogic.com, a network partner for the BizSpark program. I'll post about my experience with that, as well as the contents of the Power Programming presentation as I find time this week.

Thanks for having me speak Nashville, Very Respectably,
Dan Wygant

Wednesday, April 14, 2010

Speaking Th 4/15/10 6pm on Power Programming with Visual Studio .NET and Silverlight

This is the April meeting of the Web Dev UG here in Nashville.
We start with pizzza at 6pm and I'll start talking to you at 6:30. It will run until 8pm.

Here is the meeting specifics: http://tinyurl.com/nashdotnet041510

The meeting is in Nashville up by the airport across I40 in Century City.
Here are directions:
http://tinyurl.com/pwrprgrmn


Start Date/Time:
Thursday, April 15, 2010 6:00 PM
End Date/Time:
Thursday, April 15, 2010 8:00 PM

Description:
Power Programming with Visual Studio .NET and Silverlight

Friday, May 29, 2009

jQuery at Nashville Web Developers meeting

It was nice to see all the people at this meeting from http://www.nashdotnet.org/ out there to see Elijah Manor do an intro to JQuery talk.

Elijah started out showing a number of great examples online, and followed up with a number of clear code examples. Elijah posted a blog entry with google-docs spreadsheet with links to all the cool stuff he showed. The blog entries are below...

the slides:
http://webdevdotnet.blogspot.com/2009/05/jquery-introduction-talk.html
the linkages:
http://webdevdotnet.blogspot.com/2009/05/jquery-resource-collection.html

The linkages are in a spreadsheet with invisible tabs at the bottom representing the worksheets are below...
Main:
Tutorials
Pluggins
Tools
Cheat Sheets

Fantastically fanatically freeform jammin' open community == jQuery

I predict good things ... must try jQuery, outside of the MVC framework, using page (web) methods...
I will post when I have.

Roger Wilco, over & out,
Dan

PS - I gotta a ticket to DevLink for a doorprize: http://www.devlink.net/
Also, recruiter Joe gave me his doorprize for being nice and telling him VP Gaines is off the bench, in case you're interested in hiring Gaines... who runs this VUG as a SIG for the Nashville DNUG. Anyhow it was a book on SharePoint and since I'm into it at work now one of my not-to-distant future posts will be SharePoint "Development".

Saturday, May 9, 2009

More about VUGs and Cloudism

Well I did my presentation about Virtual Users Groups (VUGs) and Cloudism (what we use the Internet for). I talked about how the VUG capability represents where the Internet evolved. I mean that instant communication provides a nice platform for live-over-the-Internet technical presentations...

That the VUG represents the epitome of what the Internet provides, as does Cloud Computing, yet VUGs use the tools of the Cloud to provide communication with its members. Like for FaceBook, LinkedIn, MeetUp, SecondLife, ReactorGrid, VUGs they are using these sites to host themselves inside the context of a Cloud-based tool for social networking - PERFECTION!

Perfect medium for technical information transferal - a social networking tool based in the Cloud.

Also using email, usually provided by the site as part of social networking, these VUGs will notify the many hundreds if not thousands of members - actually stressing out the social networks abilities!

And finally, using LiveMeeting or any of a number of other live-over-the-Internet presentation tools.... The Ultimate usage of the tools of the Cloud for technical discussion and information sharing.

Dan

Friday, April 3, 2009

Auburn U.Net meeting! Wow!!

Hands Down! This was the nicest venue for a UG I've seen yet...

They have an awesome "James-Bond" setup! The screen was at least 30 feet across!! insanely cool!!! I'll spread that word and speakers will go just to take a deep breath when they see the projector lower out of a hidden tile in the in ceiling, and the GINORMOUS screen drop down from a hidden slit by the wall in the ceiling... it was truly a great room.

The presentation was awesome too. Great audience, especially for a nasty stormy evening... and late pizza... but it all worked out well ultimately. I got to do two other mini-presentations while waiting to start, one indoors on new stuff such as Silverlight 1, 2, and 3 and WPF - the XAML difference, Expression Blend, and http://DreamSpark.com ... another on using "The Cloud" with "social networking" to collaborate and also using Agile and Telecommute in the mix. I explained how to connect on http://LinkedIn.com and run a collaboration that way. Well, I missed the minipoint of using http://Office.Live.com for time but mentioned to simply got sign up at http://Dev.Live.com and look at all the subdomains like http://Silverlight.Live.com and http://Maps.Live.com and others. But I think they are waaay motivated.

I hope they take my advice and pick 2 pals to LinkedIn with and start collaborating via the Internet... in an Agile way. They still have a long way to go, so getting started now is essential.

I'll try to post a link later to the presentation.

Dan

Thursday, April 2, 2009

Be Happy: new NUG @Auburn U. 5:30 4/2/9==1st meeting

Yes, @HirenAdesara on twitter has asked me to present my Power Programming in VS.NET 2008 tonight @ 5:30 Shelby Center of Engineering, auditorium is in the first floor of the left wing of the building.

361 W Magnolia Ave
Auburn, AL 36849

Wednesday, March 11, 2009

#msdnsrf twitter for GlenGordon:jQuery, BrianHitney:Azure

The Southern Fried Roadshow hits Huntsville! Glen had to start out talking about jQuery 'cause the demo gods snafu'd Brian's laptop.

Glen on ASP.NET + jQuery:
other libs: dojo, scriptactulous, prototype, also AjaxTK & Yahoo! UI Library

AJAH vs AJAX
AJAX stands for Asynchronous JavaScript And XML. So I came up with the term AJAH, which stands for Asynchronous JavaScript And HTML (http://jimmyzimmerman.com/blog/2006/08/ajax-vs-ajah.html)
http://jquery.com/ by John Resig

Selectors:
$("firstName") -> elt w/ID="firstName"
$(":text") -> all textbox elts
$(".required") -> all elts with .required property
more: http://docs.jquery.com/Selectors

Search ScottGu's blog for getting jQuery intellisence working
or get hotfix to do it for you. Here's a good url:
http://west-wind.com/Weblog/posts/536756.aspx

Interesting:
function pageLoad()
{
$(":text") .focus(hilight).blur(lolight);
}
function hilight()
{
$(this).css("background-color","red");
}

function lolight()
{
$(this).css("background-color","");
}

Animation:
.slideDown('slow' or 'normal' or 'fast')

pageLoad
$("#linkage).click(slider)

... Glen is too fast - gotta watch ... talking about sorting using plugin for jQuery.
jLink later on...
You can easily write your own.
....
Nikhil's Web Devepment Helper:
http://projects.nikhilk.net/WebDevHelper/

Use it to see the JSON object graph for Photo object in PhotoService WCF demo.

niiice Lightbox jQuery pluggin:
http://www.huddletogether.com/projects/lightbox/

Brian's turn!
Azure isn't ready for prime time so I'm not gunna say nutn'

Back from lunch, Power Debuggery:
Advance breakpoint-ology 101 is first topic...
+ in stack window can click method-name and hit F9 or right-mouse add breakpoint.
+ add/remove (toggle F9) in three different parts of top of for loop.
+ Ctrl+D+N = new breakpoint, Type in name, and it'll match ALL names that match (no wildcards)
+ Hitcount, and other cases are on right-mouse on click on breakpoint icon or in breakpoint window.
+ likewise, Condition... like in a for look, i==3

[Conditional("DEBUG")] only on void return types, so use
#if DEBUG
public bool CheckEt(string whoDo)
{
if (string.IsNullOrEmpty(whoDo))
{
return false;
}
return true;
}
#endif

Can call CheckEt("me") as a condition as well.

threading/debugging, break-all, open thread window, double-click thread to set context to a specific thread, try "Filter" set break in specific thread.

"When Hit"! Awesome... print trace. this is the last of em' in the right-mouse popup menu
----
"Watch window is even more powerful" said Brain, DE & Rock-n-Rolla debugger!
can call method... but 20 sec timeout, and it doesn't honor breakpoints
but in Immediate Window... yep! And no 20 sec timeout.

Thanks for the presentation #MSDNSFR! Gotta go listen to INETA

Tuesday, March 10, 2009

Keith Elder's WCF presentation @ VSdotNetUG.org

A test client for WCF inside the first few minutes!
WCF Test Client is a WCF Service Host ... nice to run with F5 instantly. (but we know that we want to create a real service host ourselves later, or just use IIS)

WCF Service Host is useful for testers... they script against it.

Great tool:
+ double-click on the GetData (vanilla out of the box), new tab with the "Invoke" button.
+ double-click on the GetDataUsingDataContract (vanilla out of the box), new tab with the "Invoke" button.
+ Invoke, and it shows results
+ Invoke, and you have two tabs: Formatted and XML so you can see the raw data (like if you had issues)
------

ASMX not really usable in WinForms. WCF is.
ASMX is not as performant either... nor is security as simple.

------

AJAX == JSON -> attribute
Twitter == REST api -> attribute

Request, no reply ex: MSMQ ... IsOneWay ex: OperationClient(IsOneWay) on the interface
Request, Reply (normal)
Duplex (Dual) ex: massively online gaming - XBox Live
(ex: http://www.evernote.com/)

------

MessageHeader if you need absolute control over ordering for interoperability.

------

Multiple Binding

... new cmd: Edit WCF Configuration, right-mouse on Web.Config or in Tools menu.
Empty Endpoints

Read Dan Rigsby's blog on this...
http://www.danrigsby.com/blog/

... Too too much to keep up the blogging on while watching.
You'll have to see Keith's presentation to understand how much.

The best parts
+ use of the WcfTestClient
+ WAS - Windows (process) Activation Service
+ timing shows that net.tcp beats http by about 33%, and net.msmq beats tcp by even more.

more later...

Monday, March 9, 2009

Agile Infusion of SCRUM with Bob Schatz

I'm enjoying listening to Scrum-Bob aka Bob Schatz at the inaugural meeting of the
North Alabama Agile special interest group
http://tinyurl.com/agilehsv1
tonight @ Intergraph (7pm 3/9/9)

Here's Bob's site: http://www.agileinfusion.com/

Title: Agile & PMBOK

9 Knowledge Areas:
Prj/Scope/Time/Cost/Quality Mgmt + Human Resources
+ Communications
+ Risk Management + Procurement

Vs. 5 Phases
Initiation + Planning
+ Execution
+ Monitoring & Controlling
+ Closing

PMBOK is stale and has really no upward mobility aspect for change or adaptation to new ways of working.
Agile however is not a majic bullet and nothing can "guarantee success on a project". Bob's good words. I agree.

Unless the pigs and chickens play well, you can't get from point A -> B period.

High change environments like coding dotNet for example implies need for iterative changes to follow the needs of the environment. That's why Agile helps avoid conflicts, you're adapting instead of fighting an uphill battle. Instead of turning on a dime in an Agile way, you may find yourself with scope creep where you can't react to customer feedback early.

Agile implies being an "Experimentalist" where "problems are addressed immediately though rapid experimentation".

Bob: "I never saw it as a battle"
the goal being high-quality s/w with value. Stop fighting over which, just use what you're successful at.

Wednesday, February 18, 2009

I've got my Sql Server 2005 back for AclEditor.com, reconnected, and BAM! my PrezOfTheEarth data was still there!! Happy I don't have to redo that!!!

So I've added a subdomain on AclEditor.com for my old PrezOfTheEarth.com code - just to illustrate how to use AJAX, GridView, DetailsView, and many other common controls. The cool part of this is how easily (if you know how) you can do a few great things:
1) AJAXification of these controls is very standard and simple using the UpdatePanel AJAX control, and enhanceable too for a few nice tricks like the ProgressTemplate in an UpdateProgress AJAX control.
2) Using XSD for an ObjectDataSource on the page you can automajically bind, filter, sort, page and other nifty tricks.
3) Using templates, bind and eval, you can modify the representation to your taste; you don't have to accept raw data from the binding if you know how to use templates.

One other interesting trick with an infrequent side effect is using a master page to hold two "forms"... one for the "form" we care about, but another form for postback required for the google adsence HTML snippet. Sometimes however, the side effect pops up a message.

But the main point was to show how using AJAX and ASP.NET you can develop simple and codeless database-centric pages. Here the URL in the subdomain:

http://prezoftheearth.acleditor.com/

Next steps:
1) Redo this in Silverlight 2.0 to do automajic binding and a better job than AJAX.
2) Add database for the online Silverlight 2.0 version of AclEditor.com to support blobbing for file download.
3) Add code for the Silverlight 2.0 version of AclEditor.com for Save after edit.

Sunday, February 15, 2009

Silverlight 2104 Could not download


I'm trying to get my Silverlight app working on my server. I got this error: Code: 2104, Category: InitializeError, Message: Could not download the Silverlight application. Check web server settings.

First things first... using the HTML page was useful getting an error, but since it's not showing errMsg in the "errorLocation" div as I expected, I simply added
alert(errMsg);

before returning from function onSilverlightError in the header script of the generated ...TestPage.html

I saw the answer first on:
essentially adding Silverlight support to IIS - mime types .XAP and .XAML plus "Enable Content Expiration" to 1 min plus "Execute Permissions" to Script only.
I went to my ServerSea.com control panel and added mime types for .XAP and .XAML and now my Silverlight 2 replication process for AclEditor is in process and working. I've still got to complete the save part of it... download is a challenge for Silverlight but doable in a number of ways. The site is: http://www.acleditor.com/AclEditorSilverlight.aspx
Now it's time to get my entire site up and ready for prime time.
I've got interviews all this week as I finished my Sivlerlight 2 contract Friday with Optimal Interiors - CAD in the Cloud over the Internet for instant room layout, using Silverlight for no-postback client-side intelligence. Too cool ....
Anyhow I've got to get my sites all running optimally here in the next few days.
But acleditor.com is _ALMOST_ 1/2 way ready.

Saturday, February 14, 2009

Live, Jumping into

There is so much to do so little time. In my time off, since I'm between contracts as of yesterday, I'm diving into the Live framework...
Forum:
http://social.msdn.microsoft.com/Forums/en-US/liveframework/threads

main site:
http://dev.live.com/

I've got a simple example:
http://www.acleditor.com/MAPLIVE.ASPX

Fun stuff.

Dan

Friday, February 6, 2009

Blue Gradient in XAML

I'll show a custom color gradient in XAML.
Note that it's slightly different declaration and usage in Silverlight 2.0 and in WPF (or Windows Presentation Foundation) 3.5 SP1.

Here is the XAML in Silverlight (Page.xaml):
< UserControl.Resources>
< LinearGradientBrush x:Key="LightBlue4Background" EndPoint="0.5,1" StartPoint="0.5,0">
< GradientStop Color="#FF6C83D8" Offset="0"/>
< GradientStop Color="#FFEDEFF6" Offset="0.25"/>
< GradientStop Color="#FFA4AED6" Offset="0.75"/>
< GradientStop Color="#FF0B3EFF" Offset="1"/>
< /LinearGradientBrush>
< /UserControl.Resources>

Here's how to use it in Silverlight 2.0:
< Canvas x:Name="uxcLayoutRoot" Background="{StaticResource LightBlue4Background}">
< TextBox x:Name="uxtDid" Background="{StaticResource LightBlue4Background}"/>
< /Canvas>

Here is the XAML in WPF 3.5 SP1 (MyAppName.xaml):
< Window.Resources>
< LinearGradientBrush x:Key="LightBlue4Background" EndPoint="0.5,1" StartPoint="0.5,0">
< GradientStop Color="#FF6C83D8" Offset="0"/>
< GradientStop Color="#FFEDEFF6" Offset="0.25"/>
< GradientStop Color="#FFA4AED6" Offset="0.75"/>
< GradientStop Color="#FF0B3EFF" Offset="1"/>
< /LinearGradientBrush>
< /Window.Resources>

Here's how to use it in WPF 3.5 SP1:
< Canvas x:Name="uxcLayoutRoot" Background="{DynamicResource LightBlue4Background}">
< TextBox x:Name="uxtDid" Background="{DynamicResource LightBlue4Background}"/>
< /Canvas>

I notice the difference in StaticResource vs DynamicResource.
Checking back, it doesn't seem to make a difference in WPF.

Dan

Thursday, February 5, 2009

event like property plus safely CallEventHandlers

I'm showing how to define events similarly to how as you define properties... a best practice.
I'm showing how to call these event handlers in a safe way to handle exceptions... another best practice.

I've defined two events, one for save and and one for complete using the "event" keyword instead of the "property". The type is of EventHandler which has "add" and "remove" operators += and -=.

Each event has an "add" and "remove" like a property has "get" and "set".
Each event is different in another way to, using += and -= to add/remove a callback to the respective EventHandler.

Here are the events:
private event EventHandler m_Complete;
///
/// Event occurs on complete.
///

public event EventHandler Complete
{
add
{
m_Complete += value;
}
remove
{
m_Complete -= value;
}
}

private event EventHandler m_Save;
///
/// Event occurs on save.
///

public event EventHandler Save
{
add
{
m_Save += value;
}
remove
{
m_Save -= value;
}
}

The code to call the event handler has to first check to assure there IS an event handler (not null). In the for loop iterating over the individual handlers registered in the respective event "add"... the code has to catch exceptions that any of the individual handlers throws so the remaining handlers will get called.

Here is the "safe" code:

///
/// Calls the event handlers.
///

/// The save or complete event handler.
private void CallEventHandlers(EventHandler saveOrComplete)
{
// assure event exists
if (saveOrComplete != null)
{
// loop event handlers and call em'
foreach (EventHandler eh in saveOrComplete.GetInvocationList())
{
try
{
// try to call the event handler
eh(this, EventArgs.Empty);
}
catch (Exception ex)
{
string s = ex.Message;
}
}
}
}

Friday, January 30, 2009

Huntsville's Agile Users Group

Here we are at Indigo Joe's talking Agile. We're planning a future meeting - possibly May - sponsored by Project Management Institute (PMI) http://northalabamapmi.org

We may have a lunch meeting mid Feb if it seems like a good idea based on Yahoo discussion.

We have chosen to ask Bob Schatz to present at a night meeting March 9th since he's already in town talking to NASA/SAIC. Details coming soon:
http://northalabamapmi.org/LIG_Meetings.htm
http://PigsAndChickens.com
http://huntug.org http://vsdotnetug.org

Here are the companies who attended:
PMI
Intergraph
NASA
SAIC
Bentley
DigitalFusion
DRS-TEM

Action Items:
- Jim May Luminary meeting
- Jim re: DRS-TEM Auditorium
- John contact Bob about 3/9
- John contact Scrum Aliance to see about a May meeting.
- John Yahoo Group for : North Alabama Agile
- Hans contact VesionOne and Rally
- Hans re: Intergraph Auditorium
- Alan re: SAIC Auditorium
- Alan ask PMI to provide section for our Newsletter
- Alan arrange for registration to provide website linkage
- Alan maintain a charter
- Alan arrange for approval of charter by PMI

March 9th meeting likely

Need to decide on NPO status
Need to choose website
Need to add membership to website
Need Flyer
Need PMI Agile Discussion Group

March 16-18
Scrum Aliance gathering in Orlando
http://www.scrumalliance.org/events/19--orlando-scrum-gathering

Thursday, January 29, 2009

Event logging Extension Method

This was my best URL for eventing:
http://aspalliance.com/987_Event_Logging_in_a_NET_Web_Service.all

I took it to another level and added a LINQ'like Extension Method for strings:

public static class StringToEvent
{
public static void WriteEventLog(this string logEntry, EventLogEntryType entryType)
{
// use EventLog to call WriteEntry
using (EventLog eLog = new EventLog("Application", "greenriver", "MyApp"))
{
// write to (Application) event log
eLog.WriteEntry(logEntry, entryType, 1000);
}
}
}

NOTE: you must have the following registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp

Wednesday, January 28, 2009

WCF WPF and not IIS - net.tcp

I found that we could convert our XAML into an image (png was my choice) in WPF. I wrote a WPF library, but could not call it in ASP.NET because IIS complained about the threading when the code added any Visual (subclassed) element (image, lines, other controls like canvas, etc) to the drawing pad's Canvas. WPF can't be called directly in ASPX server-side code-behind, or from an ASMX Webservice, or from an http WCF Webservice.

So the ultimate solution was to write a net.tcp WCF to WPF Webservice; not hosted in an http (IIS7 hosted) Windows Service, again, because of the threading issue.

Instead, I wrote a simple console application (exe) as the host for the WCF to WPF libraries.
To get net.tcp in the app.config instead of http, I declared net.tcp like this in the configuration section (found details here http://www.codeproject.com/KB/WCF/WCFMultipleHosting.aspx):

< system.serviceModel>
< services>
< service name="a.ImageMaker" behaviorConfiguration="a.ImageMakerBehavior">
< host>
< baseAddresses>
< add baseAddress="net.tcp://127.0.0.1:1111"/>< /baseAddresses>
< /host>
...

Now this runs on startup, and is a ServiceHost for ImageMaker.
ImageMaker is the WCF interface that is called from anywhere and then calls the WPF library.
The WPF library is a limited port of a Silverlight control to WPF, with only the limited bit of code required for initial "fitted" display.

The ported-to-WPF control (XAML code with C# initialization) never displays, so it would not render to its XAML Canvas resulting in blank images every time. The trick to getting WPF to render was to call Measure and Arrange before generating the image:
DrawingCanvas.Measure(size);
DrawingCanvas.Arrange(new Rect(size));

Here's a neat client side PNG generation lib for Silverlight, but since you can't get pixels, it doesn't help for taking a printable snapshot of the display:
http://blogs.msdn.com/jstegman/archive/2008/04/21/dynamic-image-generation-in-silverlight.aspx

Collaborate with me at LinkedIn.com/danwygant twitter.com/danwygant
Dan Wygant, Sr. Software Consultant - Silverlight 2 ASP.NET 3.5 SP1 LINQ WCF WPF MVP
04'-08' Windows Customer Experience Founder HUNTUG.org VSdotNetUG.org
HowToVS.NET INETA Mentor for Al/Ms/La

Monday, January 26, 2009

ACL Editor for icacls.exe files : ClickOnce

I wrote a WPF version of my ClickOnce app for icacls.exe files.
The idea is that it will preserve the signature on the file, while notepad will not. So with notepad the file can't be read by icacls.exe anymore. With our, no problem.

Plus we intend to improve it over time and through the ClickOnce functionality all users will get updated when they run it. I think I'll update the AclEditor today... maybe add some hover tooltip. Send me email if you try it and let me know what would make it worthy to buy it.

The URL is here: http://acleditor.com

Try it and enjoy.
BTW, I've ported this to Silverlight 2 and may push that up there as well.
I'm trying to create a presentation on this port to Silverlight 2 and also the port from my http://dan.wygant.org/s2/ Silverlight 2 XAP file hosted on Unix to WPF.

I need some ideas on how to differentiate WPF and Silverlight versions if you would like to share.
I've got many many ideas and collaborations in progress. If you know me you know why... more about why later... but then again you should consider connecting with me on http://LinkedIn.com/danwygant or http://Twitter.com/danwygant so we can collaborate using "The Cloud".

I'll try to do a LiveMeeting for my http://HowToVS.NET AdHoc Q&A SIG (or VUG - Virtual that is) sometime soon.

Dan