Host Windows Forms Controls in WPF – Keyvan Nayyeri
Process is simple. First you need to add a HWND to your WPF applications in UI to host Windows Form controls there. Actually you must derive a class from HwndHost base class to be able to do this but thankfully Microsoft has done the main job and has added a default implementation that is suitable for many common needs and it’s WindowsFormsHost.
Secure Your ASP.NET Apps And WCF Services With Windows CardSpace — MSDN Magazine, April 2007
By Michèle Leroux Bustamante
Windows CardSpace and Information Cards
Personal Cards
Managed Cards
Browsers and Identity Selectors
Object and XHTML Parameters
Processing the Security Token
Associating Cards with an Account
Integrating Windows CardSpace with WCF
Conclusion
Using CardSpace without using WCF or Browser
Getting CardSpace Tokens Programmatically
The wrapper allows you to basically pass in the required details (issuer and target URI, the target identity as well as required/optional claims) and get back the encrypted XML token.
This code snippet shows how to use the wrapper to get a token for a self issued card:
IdentitySelector selector = new IdentitySelector(); selector.IssuerUri =
new Uri("http://schemas.xmlsoap.org/ws/2005/05/identity/issuer/self"); selector.TargetUri = new Uri("http://relyingParty"); selector.SetTargetCertificate("RelyingParty", X509FindType.FindBySubjectName, StoreLocation.CurrentUser, StoreName.AddressBook); selector.RequiredClaims.Add(ClaimTypes.GivenName); selector.RequiredClaims.Add(ClaimTypes.Surname); selector.RequiredClaims.Add(ClaimTypes.Email); string tokenString = selector.GetTokenString();
From this point on it is up to you to use this token in whatever way you want.
It is as easy a shipping a string to your relying party.
Download here
Via www.leastprivilege.com – Getting CardSpace Tokens Programmatically
Using Windows CardSpace with WebService and Non-Browser Applications
Vibro.NET : Using Windows CardSpace for securing a WPF smartclient, in WCF & token caching sauce
Securing a Sidebar Gadget with Windows CardSpace and WCF
And his book:
Enterprise Application Architecture with LINQ to SQL – The Code Project – Design and Architecture
Contents
Via Enterprise Application Architecture with LINQ to SQL – The Code Project – Design and Architecture
How to convert a street address to longitude and latitude (geocoding) via web services « Jim 2.0’s Blog
string geocoderUri = string.Format(
“http://rpc.geocoder.us/service/rest?address={0},{1},{2}”,
street, city, state);
XmlDocument geocoderXmlDoc = new XmlDocument();
geocoderXmlDoc.Load(geocoderUri);
XmlNamespaceManager nsMgr =
new XmlNamespaceManager(geocoderXmlDoc.NameTable);
nsMgr.AddNamespace(“geo”,
@”http://www.w3.org/2003/01/geo/wgs84_pos#”);
string sLong = geocoderXmlDoc.DocumentElement.SelectSingleNode(
@”//geo:long”, nsMgr).InnerText;
string sLat = geocoderXmlDoc.DocumentElement.SelectSingleNode(
@”//geo:lat”, nsMgr).InnerText;
double latitude = Double.Parse(sLat);
double longitude = Double.Parse(sLong);
Console.WriteLine(“Lat: “ + latitude + ” Lon: “ + longitude);
Result:
Lat: 41.947372 Lon: -87.655788
Once you have the coordinates, you can perform radius searching. Troy DeMonbreun provides an example of how to calculate the distance between two geographic coordinates using a SQL Server UDF (User Defined Function). The GeoCoder.us blog also discusses how to calculate distances using two geographic coordinates.
Writing custom LINQ provider
In this post, I will show how to create a sample LINQ provider.Creating LINQ provider can be far more complex, but here I will demonstrate the very basic one to start.
This sample is done by using VS2008 Beta 2. I finished of this is post by creating a fictious Person query provider that in turn the gives a glimpse of creating custom LINQ provider for pulling data from source, in a more descriptive and convenient way, rather calling out boring GetBy methods.
Windows Home Server Add-ins | We Got Served
This site has some of the newest and handiest Windows Home Server Add-ins available. One I particularly like is the Program Launcher add-in. Great for getting into Regedit, Command Prompt or just about any other program you need to run from the WHS console. http://www.wegotserved.co.uk/windows-home-server-add-ins/ Share this post…(read more)
Windows Home Server Toolkit v1 – The Nuts and Bolts
As you’ve probably seen from Robert McLaws’ blog post, there’s a new Toolkit for Windows Home Server. There are several components to this. Some run in the WHS Console as an Add-in, and others can be run locally on the client, or the server.
The Console Add-in gives you a new item under Settings, labeled Toolkit. From there you have 4 available tabs. Remote, Storage, Backup and Support.
On the Server side of things………….
The Remote tab gives you access to tools to help with troubleshooting and configuration of the Remote Access web site.
And more screenshots via Windows Home Server Toolkit v1 – The Nuts and Bolts
