ASP.NET News from Blogger: Williams .Net Zone   Get the feed of: Williams .Net Zone

Total News: 59

LightSwitch timeouts and SessionState service

In terms of IIS, a LS app is just another web app, so all the same rules apply such as Forms Session cookies.  I had taken care to set session timeouts, but still was having timeouts at random times w...

NETMF Get/Set Real Time Clock (RTC)

Just a short reminder post on how to get and set RTC.  The RTC is powered by VBatt pin and keeps the RTC ticking with the time after you set it once.  After you set it, then just read the … Continue r...

NETMF Servo classes (PWM and Software versions)

Just posting some servo classes.  One for hardware PWM control and one for software PWM using OutputCompare. Never know when you may need. using System; using GHIElectronics.NETMF.FEZ; using GHIElectr...

ReportViewer with nested tables

Sometimes you may need a report that can not be done easily with standard grouping in a table. Say you want to a repeatable data region that is repeated by an outer group, but contains two other table...

Tips to deploy an application (or ClickOnce) using the Griaule Fingerprint SDK 2009

The Griaule fingerprint SDK is good and works well. However sometimes the documentation is lacking. After some trial and error and hair pulling I finally figured out the correct steps. 1) Install the ...

Return total count of query plus paging with Data Services

...And in the same reply. I racked my brain for a few days trying to figure out a way to return the count of a query in the same reply with the results for my client paging control. I started with mak...

Back to CSV - Convert CSV text to Objects; via JSON

As Json is easier to read and write then Xml. It follows that CSV (comma seperated values) is easier to read and write then Json. CSV also has tools such as Excel and others that make it easy to work...

Astoria query Cheat Sheet

Samples Data Model: Query Samples: Below are some samples of using Astoria to query against the model. I tried to hit the most popular that will hit most of the features, but far from complete. Plea...

Linq-a-fi your file system by creating your own DSL

Sample usage: Console.WriteLine("\nGet number of files and total size under a dir.");long totSize = 0;long totFiles = 0;var q = (from f in new LFileInfo(@"c:\temp").Children(true) ...

Fiddler with Ado.Net Data Services

To get Fiddler 2.1.8.2 to work with Visual Studio Development server and using Ado.Net Rest services, I found only 1 thing that actually works: 1) Add a new host to your \etc\hosts file: 127.0.0.1 loc...

CardSpace (InfoCard) replay and thoughts

InfoCard (i.e. CardSpace) has been out for a bit, but does not get much joy yet. I think probably cause a lot people just don't know about it or don't care yet. But the other day I created a OpenID an...

Transaction is not allowed error using ADO.Net Entities.

Doing some ADO.Net Entity queries and updates the other day, I kept getting this exception: "New transaction is not allowed because there are other threads running in the session." foreach ...

ADO.Net Data Services after Silverlight Tools sp1

After installing Silverlight VS Tools SP1 beta, not only did SL designer not work, but it somehow messed up my ADO.Net REST services. Was getting strange exceptions. I uninstalled SL Tools and reinsta...

Turn off feed reading view to debug your ADO.Net

If your trying to expose a new ADO.Net dataservice and work some samples, you may get some strange output in your IE that looks like a feed page and wonder why you can't see the XML as the samples sho...

Silverlight Streaming Service

If you have not looked at in a while, the new SL service allows you to directly upload you .wmv files. So you don't need to use Encoder anymore to encode a SL video into a SL application. This makes i...

Enterprise Framework LINQ Queries failing - MSDN Forums

Good Linq post from Colin Meek below:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2078990&SiteID=1 To give a sense of what is shared and what isnt between LINQ to SQL and LINQ to Entitie...

Make existing project a Volta project - MSDN Forums

Yes, this is possible, allthough you will need to modify the project file by hand. You can do this by right-clicking on the project and selecting'Unload project'. Next you will need to right-click o...

WinForms Tier-Splitting using Volta

I love the Volta idea and concept. The cool part is not the features, but lack of them. It is so easy to create a two tier app it is almost not funny. Here is a video I did on splitting using a Winfo...

Simple Task Scheduler inside your application (C#)

Many times I need a simple task scheduler inside a program to do this or that. You can use any of the system timers to achieve this, but you end up writing the same difficult code over and over. This...

Wow. VS 2008 out early next week

Can't believe it is that time already. This will make for a happy holiday. Subscribers will be able to get it here next week under Top Subscriber downloads: http://msdn2.microsoft.com/subscriptions...

Linq Data Services and the Business Logic Layer

Linq is great. However, about the 2nd or 3rd question after using it is "how to I do a 3-tier or layered model with LINQ?..." Unfortunately, there appears to be no easy answer to this. It a...

Proposed changes to Sql Reports

Sql Reporting (SRS with Report Builder and Report Designer) is really cool. However, the other day I cracked it open to do some reports for an application I am working on and felt that it is already ...

Linq Tip #1 - Composable queries

One of the cooler things about Linq (if it wasn't already cool enough) is that queriesare composable. This comes in real handy when you want to dynamically add "where"statements to a query ...

Linq Tip #2 - Find overlapping date ranges

/* * A deceptively ~simple self-join query to find all date ranges in a table that overlap. * A date range is defined by the range between InTime and OutTime. * The "Seq != Seq" filter is re...

Use Win Form in a VS Team Test library

This may be common knowledge, but I just discovered it. Test projects in VS Team Test are class libraries. Normally you write tests like a console app, with no UI. You just test api results and tes...

Microsoft Silverlight

Microsoft Silverlighthttp://www.microsoft.com/silverlight/tools.aspx Screen clipping taken: 4/18/2007, 10:26 PMVery cool. That says it all....

Wait for async completion using two locks instead of an event.

Sometimes you need to wait (or block) for an async method to complete. This could bebecause your creating a sync method wrapper for your async method or for other reasons.Sometimes you just want a bl...

.NET Framework 3 News and Announcements : .NET Framework 3.0 July CTP

July CTPof.Net 3.0 is here! Link to .NET Framework 3 News and Announcements : .NET Framework 3.0 July CTP...

Convert local time to Timezone.

I think Live Writer will get me bloggin again. Anyway, here is a class that allows you to convert a DateTime to any Timezone. You can convert between local timezones and to/from UTC. It leverages Win...

Bryant Likes's Blog : Clipboard Paste Live Writer Plugin

Brian put together a nice little plugin forLive Writer (WLW) toallow paste asHTML. This is needed if you CopyAsHtml from your Visual Studio to keep the code formating. Code below is Copied from VS usi...

ADO.Net vNext

http://blogs.msdn.com/adonet/archive/2006/07/11/662447.aspx Screencast demoing ADO.NET vNext in action: http://blogs.msdn.com/adonet/archive/2006/07/11/662454.aspx ...

Cron GUI

I am creating a cron scheduler for .Net called NCron (I know there are other implementations, but this is mine with some added features). I amworking on the UI and wonder if thislooks/feels ok, or if ...

Attacking Windows and Web Servers Screencast

Actually a pretty good screencast on attacking Windows that all developers should watch. The screencast rez is no good, but the audio is good. No a MS bash as such as most of this stuff can be done to...

Update UI the easy way using anonymous delegates.

We all know you can't update the UI from another thread. The standard approach is to create a delegate for each UI update method and call that with BeginInvoke. That works, but can get messy when crea...

Parameterized Thread Start - The easy way.

Here is my method to easily call a parameterized method on a new thread or the thread pool.using System;using System.Threading;using System.Collections.Generic;using System.Collections;namespace WJS.T...

Double-Checked Again. The way to do it.

The double-checked singleton pattern gets a lot of press over and over. Many of the implementation are wrong or too complicated. Here is a very fast and simple way to implement a thread safe singleton...

Replace spaces inside quotes in SQL Clr function

Someone on one of the NGs wanted a way to replace spaces inside quotes in a string with another string. But not touch any other space unless it was inside quotes. Here is the sql clr UDF that does thi...

Windows OneCare Virus and system checker

Man I have been waiting for this and out of the blue just saw it on Microsoft.com.  All the other virus checkers seem like viruses themselfs the way they take over your machine and light-up thems...

Custom List: Interesting links

Interesting linksChannel9MVPTools.comHamilton Hotel: Our Hotel in Birmingham. Please visit us.The .Net ShowMSDN TVThe Server SideWeb Services Dev CenterPatterns & Practices: .NETRSA Security Cont...

Custom List: Blog List

Blog Listherveyw's blog: Inside WSEKeith Brown: Security BriefsDon Box's Spoutlet: Indigo manBrad Abrams: FrameworkAaron Skonnard: SO universeBenjaminm's blog: Indigo, web services and extreme program...

WSE MTOM still can not do client side streaming.

 Why true streaming (end-to-end) is still not possible with MTOM on WSE 3.0.  I don't get why this problem is so hard.  DIME was not right, now MTOM on the client side is brain dead sti...

Talking about Using Http.Sys to receive messages with WSE 2.0

 Use HttpListener to receive HTTP and pass to WSE.  Could be used without WSE also to process your own messages manually.  Pretty cool stuff.Using Http.Sys to receive messages with WSE ...

Simple Line Count for your VS Projects and Solutions.

Compile this code as a Console app, put the Exe in your path.  Then when inside one of your Project directories, just type linecount to see all the lines in all *.cs files in your project dir and...

Get Windows Groups from WindowsIdentity

Here is a simple way to enumerate the Windows Groups associated with a WindowsIdentity:        {            Li...

Talking about Chris Smith's completely unique view : Neat nuggets of .NET - The Conditional attribute

 Chris Smith's completely unique view : Neat nuggets of .NET - The Conditional attribute, offered a cool approach to easily compiling different versions of your app (i.e. Trial, Full, 10 user ver...

Use Rijndael (AES or TripleDes) to easily encrypt/decrypt byte[]s of any size.

I see encryption question asked a lot.  So here is a tight little sample using both 3Des and AES (Rijndael):// Use TripleDes Sample:Console.WriteLine("Using 3Des.");TripleDESCryptoServi...

Talking about Linq Resources for C#

 Way too cool.  This is fantastic stuff:Linq Resources...

Talking about Download details: Windows "Monad" Shell Beta 2 $for .NET Framework 2.0 Beta 2$ x86

 MSH Shell (Monad) Beta2 is no longer NDA and can be found here:Download details: Windows "Monad" Shell Beta 2 $for .NET Framework 2.0 Beta 2$ x86...

Simple string/byte[] encryption and decryption using AES in C#

Paste these methods in your Utils class or other and use them as is to encrypt and decrypt your        /// Use AES to encrypt data string. The output string is the e...

View Other bloggers