net qr code open source s .NET 3.0: PROGRAMMING WITH CARDSPACE in VB.NET

Generator QR Code ISO/IEC18004 in VB.NET s .NET 3.0: PROGRAMMING WITH CARDSPACE

CHAPTER 10 s .NET 3.0: PROGRAMMING WITH CARDSPACE
Painting QR Code JIS X 0510 In Visual Basic .NET
Using Barcode encoder for .NET Control to generate, create QR Code image in Visual Studio .NET applications.
www.OnBarcode.com
Recognizing QR Code 2d Barcode In VB.NET
Using Barcode reader for .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
Figure 10-8. The CardSpace card has signed you into the site.
Painting Code 128A In Visual Basic .NET
Using Barcode creation for Visual Studio .NET Control to generate, create Code 128 Code Set A image in .NET framework applications.
www.OnBarcode.com
Paint PDF-417 2d Barcode In VB.NET
Using Barcode printer for .NET Control to generate, create PDF 417 image in VS .NET applications.
www.OnBarcode.com
Creating a Web Site That Uses CardSpace
Painting Barcode In Visual Basic .NET
Using Barcode generator for .NET framework Control to generate, create Barcode image in .NET framework applications.
www.OnBarcode.com
Paint Code 3/9 In VB.NET
Using Barcode printer for .NET framework Control to generate, create ANSI/AIM Code 39 image in VS .NET applications.
www.OnBarcode.com
The previous example demonstrated how a web site can use CardSpace on the client site to request and receive client credentials. In this section, you ll step through what it takes to build this application and run it on IIS. While CardSpace works on IIS 5, 6, and 7, this tutorial demonstrates installing certificates on IIS 7.
UPC - 13 Printer In Visual Basic .NET
Using Barcode creator for VS .NET Control to generate, create EAN-13 image in .NET framework applications.
www.OnBarcode.com
2/5 Industrial Creation In Visual Basic .NET
Using Barcode generator for .NET Control to generate, create 2 of 5 Industrial image in VS .NET applications.
www.OnBarcode.com
Preparing Your Development Environment for CardSpace
QR-Code Encoder In None
Using Barcode creator for Software Control to generate, create QR-Code image in Software applications.
www.OnBarcode.com
Draw QR Code In None
Using Barcode generator for Microsoft Word Control to generate, create Denso QR Bar Code image in Microsoft Word applications.
www.OnBarcode.com
Your development environment will need some configuration before you can use CardSpace effectively. Before you do anything else, make sure that you have the Windows SDK installed. Within the Windows SDK, find the file WCFSamples.zip in the samples directory. In here, you ll find the technology samples folder containing CardSpace samples. Look at the UsingCardSpacewithIE7 sample (note that CardSpace is not supported on earlier versions of Internet Explorer) and open the setup.bat file, using Notepad to inspect it. Each CardSpace sample uses a similar setup, and they all follow the same four steps. Execute the setup.bat file to install the sample. The next sections will describe how it sets up CardSpace on your server.
Denso QR Bar Code Recognizer In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
Decode Code 128 Code Set C In VS .NET
Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
Step 1: Registering CAPICOM.dll
EAN-13 Creation In None
Using Barcode generator for Software Control to generate, create GS1 - 13 image in Software applications.
www.OnBarcode.com
Scan Data Matrix 2d Barcode In Visual Studio .NET
Using Barcode decoder for .NET framework Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
The batch file should register CAPICOM.dll for you. On some systems this fails, so if you are having trouble installing the CardSpace samples, register it manually. You do this by changing to the Bin folder in the Windows SDK directory and issuing the following command from a DOS prompt:
UCC - 12 Maker In None
Using Barcode drawer for Excel Control to generate, create GS1-128 image in Microsoft Excel applications.
www.OnBarcode.com
EAN13 Creator In Objective-C
Using Barcode drawer for iPad Control to generate, create EAN13 image in iPad applications.
www.OnBarcode.com
Regsvr32 /s capicom.dll
Encode QR Code In C#
Using Barcode drawer for Visual Studio .NET Control to generate, create Quick Response Code image in .NET applications.
www.OnBarcode.com
Printing UCC - 12 In Java
Using Barcode generator for Android Control to generate, create UCC-128 image in Android applications.
www.OnBarcode.com
CHAPTER 10 s .NET 3.0: PROGRAMMING WITH CARDSPACE
Paint ECC200 In None
Using Barcode creator for Software Control to generate, create Data Matrix 2d barcode image in Software applications.
www.OnBarcode.com
Generating Barcode In VS .NET
Using Barcode drawer for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
This registers the DLL for you. Using /s does a silent installation, where you don t get the various status updates. CAPICOM.dll is the implementation of the CAPICOM security layer, which allows for easy integration of security, digital signing, and encryption onto web pages. It is part of the Windows SDK, and can be found in the Bin directory. It provides a COM interface to the Microsoft CryptoAPI and exposes a set of its functions allowing for easy incorporation of digital signing and encryption into your programs. It provides support for smart cards, software keys, verification of digitally signed data, certificates, and more. It s well worth a look at its functions, but a deep dive goes beyond the scope of this book. However, the SDK documentation is a great place to start if you are serious about security in your web applications.
Step 2: Installing Certificates
The next function that the batch file performs is installing the certificates that are necessary to allow the site to be authenticated and trusted with HTTPS in the browser. This is performed by the install-certificates.vbs script. The SDK ships with four sample certificates, used by the following URLs:
https://www.contoso.com https://www.fabrikam.com https://www.woodgrovebank.com https://www.adatum.com
When you browse to a site, the certificate has to match the site so if you visit
http://localhost and it is certified by a certificate from https://www.contoso.com, you will
get an error in the browser. This offers you two levels of security. The first is that Internet Explorer will present you with a blocking page letting you know that there is a problem with the certificate (see Figure 10-9). This security measure is in place to prevent a bad site from delivering the certificate from a good site and betraying the user s trust. However, Internet Explorer still gives you the choice to proceed to the site, but lets you know that it isn t recommended. Should you decide to do this, you ll see another visual indicator that there is a problem with the site the address bar is colored red and a certificate error is highlighted (see Figure 10-10).
CHAPTER 10 s .NET 3.0: PROGRAMMING WITH CARDSPACE
Figure 10-9. Internet Explorer presents a blocking page when the certificate is issued for the wrong address.
Figure 10-10. Second level of certificate security
To avoid these problems on your machine, see step 3.
CHAPTER 10 s .NET 3.0: PROGRAMMING WITH CARDSPACE
Step 3: Editing the hosts File
The next step in the setup script is to edit your hosts file. Internet Explorer matches the domain name in the browser address bar to that in your certificate. If they don t match, you get the errors in Figures 10-9 and 10-10. When you are setting up a development environment, you will of course be hosting the applications on localhost, which doesn t match the certificates but Windows provides a methodology to allow you to map IP addresses to domain names (taking a bypass around the DNS): the hosts file. This file, found in Windows\System32\drivers\etc, is just called hosts (no extension). You can open it in Notepad to inspect it. Its structure is very simple: an IP address, followed by at least one space, followed by the domain name, and an optional comment denoted by a #. The default hosts settings will likely look like this:
Copyright © OnBarcode.com . All rights reserved.