<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Paolo's Notes</title><subtitle type="html">BA by day, sleepy coder by night...</subtitle><id>http://weblogs.asp.net/pmarcucci/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/pmarcucci/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2003-10-26T14:48:00Z</updated><entry><title>Voice 2.2 test</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/04/24/119368.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/04/24/119368.aspx</id><published>2004-04-24T11:40:00Z</published><updated>2004-04-24T11:40:00Z</updated><content type="html">Third test from Voice 2.2&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=119368" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author></entry><entry><title>Free bug tracking offer</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/31/65468.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/31/65468.aspx</id><published>2004-01-31T08:59:00Z</published><updated>2004-01-31T08:59:00Z</updated><content type="html">&lt;P&gt;This is making the rounds...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.axosoft.com/"&gt;Axosoft&lt;/A&gt; is offering bloggers a free 3-user version of their .NET &amp;amp; SQL based OnTime &lt;A href="http://www.axosoft.com/"&gt;defect tracking software&lt;/A&gt; (&lt;A href="http://www.axosoft.com/ontime.htm"&gt;bug tracking software&lt;/A&gt;).&amp;nbsp; For more information, visit &lt;A href="http://www.axosoft.com/Free3UserOffer.htm"&gt;http://www.axosoft.com/Free3UserOffer.htm&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=65468" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry><entry><title>The fun is back</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/28/63990.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/28/63990.aspx</id><published>2004-01-29T00:49:00Z</published><updated>2004-01-29T00:49:00Z</updated><content type="html">&lt;P&gt;Well, I'm going on developing infrastructure code for NFFTI (yeah, I know. I'll post more gruesome details later) and I realized a simple fact:&lt;/P&gt;
&lt;P&gt;I'm having fun.&lt;/P&gt;
&lt;P&gt;It has been years since I had real fun coding, since Turbo Pascal 5.5 or the early Visual Basic 6 days. Java had never been "fun", just a tool I had to use for my job. And nobody in his clear mind would call PL/SQL a fun language or development environment...&lt;/P&gt;
&lt;P&gt;But C# and Visual Studio and (most important) the incredible community around them is making the task of sitting down and pounding code a non-dreaded occupation anymore. I have some people to thank for this so, in perfect Academy Awards style, here they are in no particular order:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.testdriven.net/"&gt;Jamie Cansdale&lt;/A&gt;, &lt;A href="http://www.peterprovost.org/weblog/"&gt;Peter Provost&lt;/A&gt;, &lt;A href="http://www.bristowe.com/blog/"&gt;John Bristowe&lt;/A&gt;, &lt;A href="http://weblogs.asp.net/ericjsmith/"&gt;Eric J. Smith&lt;/A&gt;, &lt;A href="http://www.netcrucible.com/blog/"&gt;Joshua Allen&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/jasmo/"&gt;Jason Moore&lt;/A&gt;, Dominic Pease, Kurt Mackey, Paul Hill, Peter Dampier and all the other people I don't know personally but are doing an great job of pushing forward with the community.&lt;/P&gt;
&lt;P&gt;Oh, and thanks to &lt;A href="http://scoble.weblogs.com/"&gt;Robert Scoble&lt;/A&gt; to bring most of these people at PDC03. That was mondo fun :)&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;[Now Playing: - Promised You A Miracle - Simple Minds]&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=63990" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>WS POLICY SI TEH WIN!!111</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/22/61504.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/22/61504.aspx</id><published>2004-01-22T13:40:00Z</published><updated>2004-01-22T13:40:00Z</updated><content type="html">&lt;DIV&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;In the &lt;A title=http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61249.aspx#FeedBack href="/pmarcucci/archive/2004/01/21/61249.aspx#FeedBack"&gt;comments&lt;/A&gt; on my previous post, &lt;A title=http://bristowe.com/blog/ href="http://bristowe.com/blog/"&gt;John Bristowe&lt;/A&gt; gently offered his help to guide me across the Dead^H^H^H^H WSE 2.0 Marshes... &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;Fool! He didn't know what was expecting him! But in the end, he provided me with invaluable knowledge, tips and simply buckets of code big enough to drive into my thick skull a faint glimmer of comprehension about this whole new way to deal with web services.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;So, what was my initial take, based on a cursory reading of the few web pages I was able to find? A procedural based, hardcoded approach to the authentication/signature/authorization/encryption problem. Plenty of code (to be tested) and lots of possible failure points. Plus, it wasn't really working anyways...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;So John introduced me to the marvels of Policies. A declarative approach, how novel! Basically this removed all the ugly plumbing code from my web methods and put all the business knowledge about, say, authorization into a series of XML files that can be edited at runtime.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;So, what about some samples? Sure thing! After having enabled WSE 2.0 on both Nfftiws (the web service) and Test Harness (the, duh, test harness), I modified Test Harness' app.config file thusly (sorry, I always wanted to use this word...):&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#808080 size=2&gt;&lt;SPAN class=543123406-22012004&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR&gt;&amp;lt;configuration&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;configSections&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;section name="microsoft.web.services" type="Microsoft.Web.Services.Configuration.WebServicesConfiguration, Microsoft.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/configSections&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;microsoft.web.services&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;policy&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;send&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cache name="policyCache.xml" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/send&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/policy&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/microsoft.web.services&amp;gt;&lt;BR&gt;&amp;lt;/configuration&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;The section "microsoft.web.services" enables WSE 2.0 for this project and the element named the same way defines a send policy to be defined in the policyCache.xml file. That, by the way, is filled by these characters:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;&lt;FONT color=#808080&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR&gt;&amp;lt;policyDocument xmlns="&lt;/FONT&gt;&lt;A title=http://schemas.microsoft.com/wse/2003/06/Policy href="http://schemas.microsoft.com/wse/2003/06/Policy"&gt;&lt;FONT title=http://schemas.microsoft.com/wse/2003/06/Policy color=#808080&gt;http://schemas.microsoft.com/wse/2003/06/Policy&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;mappings xmlns:wse="&lt;/FONT&gt;&lt;A title=http://schemas.microsoft.com/wse/2003/06/Policy href="http://schemas.microsoft.com/wse/2003/06/Policy"&gt;&lt;FONT title=http://schemas.microsoft.com/wse/2003/06/Policy color=#808080&gt;http://schemas.microsoft.com/wse/2003/06/Policy&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mapDefault policy="#policy-b298142f-0c50-446b-8938-079b27891512" /&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/mappings&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;policies xmlns:wsu="&lt;/FONT&gt;&lt;A title=http://schemas.xmlsoap.org/ws/2002/07/utility href="http://schemas.xmlsoap.org/ws/2002/07/utility"&gt;&lt;FONT title=http://schemas.xmlsoap.org/ws/2002/07/utility color=#808080&gt;http://schemas.xmlsoap.org/ws/2002/07/utility&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsp:Policy wsu:Id="policy-b298142f-0c50-446b-8938-079b27891512" xmlns:wsp="&lt;/FONT&gt;&lt;A title=http://schemas.xmlsoap.org/ws/2002/12/policy href="http://schemas.xmlsoap.org/ws/2002/12/policy"&gt;&lt;FONT title=http://schemas.xmlsoap.org/ws/2002/12/policy color=#808080&gt;http://schemas.xmlsoap.org/ws/2002/12/policy&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsse:Integrity wsp:Usage="wsp:Required" xmlns:wsse="&lt;/FONT&gt;&lt;A title=http://schemas.xmlsoap.org/ws/2002/12/secext href="http://schemas.xmlsoap.org/ws/2002/12/secext"&gt;&lt;FONT title=http://schemas.xmlsoap.org/ws/2002/12/secext color=#808080&gt;http://schemas.xmlsoap.org/ws/2002/12/secext&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsse:TokenInfo&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SecurityToken xmlns="&lt;/FONT&gt;&lt;A title=http://schemas.xmlsoap.org/ws/2002/12/secext href="http://schemas.xmlsoap.org/ws/2002/12/secext"&gt;&lt;FONT title=http://schemas.xmlsoap.org/ws/2002/12/secext color=#808080&gt;http://schemas.xmlsoap.org/ws/2002/12/secext&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsse:TokenType&amp;gt;wsse:UsernameToken&amp;lt;/wsse:TokenType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/SecurityToken&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/wsse:TokenInfo&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsse:MessageParts Dialect="&lt;/FONT&gt;&lt;A title='http://schemas.xmlsoap.org/2002/12/wsse#part"&gt;wsp:Body()&lt;/wsse:MessageParts' href='http://schemas.xmlsoap.org/2002/12/wsse#part"&gt;wsp:Body()&lt;/wsse:MessageParts'&gt;&lt;FONT title='http://schemas.xmlsoap.org/2002/12/wsse#part"&gt;wsp:Body()&lt;/wsse:MessageParts' color=#808080&gt;http://schemas.xmlsoap.org/2002/12/wsse#part"&amp;gt;wsp:Body()&amp;lt;/wsse:MessageParts&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/wsse:Integrity&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/wsp:Policy&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/policies&amp;gt;&lt;BR&gt;&amp;lt;/policyDocument&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;Pretty ugly, eh? Luckily this file was generated automatically by the same property dialog where you enable WSE 2.0, by going to the Policy tab and clicking on the Create/Edit... button in the Sending Side Policy Cache group. When the Wse Security Policy Editor dialog pops up, click on Add Policy, select "default" as the Service Location, select the Require Signature checkbox, enter UserNameToken as the token Type, leave all the other fields untouched and click Ok. The file policyCache will be created and dropped &lt;STRONG&gt;in the wrong place&lt;/STRONG&gt;. You will have to manually copy it from the project top folder to bin/debug for the purpose of development. We'll see in later posts how to deal with deployment.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;Ok, what have we achieved? Now we have a client application that knows how to speak WSE and will make sure to authenticate its method calls to the target web service. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;Now we have to configure the web service... Again, enable WSE 2.0 for this project. Then modify web.config like this:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;just after &amp;lt;configuration&amp;gt;, before &amp;lt;system.web&amp;gt;, add:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#808080 size=2&gt;&lt;SPAN class=543123406-22012004&gt;&amp;nbsp; &amp;lt;configSections&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;section name="microsoft.web.services" type="Microsoft.Web.Services.Configuration.WebServicesConfiguration, Microsoft.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/configSections&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;&lt;SPAN class=543123406-22012004&gt;Just before &amp;lt;/system.web&amp;gt; add:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#808080 size=2&gt;&lt;SPAN class=543123406-22012004&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;webServices&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soapExtensionTypes&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add type="Microsoft.Web.Services.WebServicesExtension, Microsoft.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="1" group="0" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soapExtensionTypes&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/webServices&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;&lt;SPAN class=543123406-22012004&gt;Finally, after &amp;lt;/system.web&amp;gt;, add:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN class=543123406-22012004&gt;&lt;FONT color=#808080&gt;&amp;nbsp; &amp;lt;microsoft.web.services&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;security&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;securityTokenManager type="Nfftiws.SecurityPassword, Nfftiws" xmlns:wsse="&lt;/FONT&gt;&lt;A title=http://schemas.xmlsoap.org/ws/2002/12/secext href="http://schemas.xmlsoap.org/ws/2002/12/secext"&gt;&lt;FONT title=http://schemas.xmlsoap.org/ws/2002/12/secext color=#808080&gt;http://schemas.xmlsoap.org/ws/2002/12/secext&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#808080&gt;" qname="wsse:UsernameToken" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/security&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;policy&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;receive&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cache name="&lt;EM&gt;path to the project folder&lt;/EM&gt;\NFFTIWS\bin\inboundPolicy.xml" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/receive&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/policy&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/microsoft.web.services&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;&lt;SPAN class=543123406-22012004&gt;While the first two pieces of XML are basically boilerplate (I already feel the wrath of the More Competent Developers(tm) out there), the last fragment defines the method that implements the authentication (Nfftiws.SecurityPassword) and points to the file defining the&amp;nbsp;authorization policy that will be applied on the incoming messages. But that's all for web.config, in the next post we'll see what's in inboundPolicy.xml.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;&lt;SPAN class=543123406-22012004&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=61504" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>WS-I thinghies</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61249.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61249.aspx</id><published>2004-01-22T01:28:00Z</published><updated>2004-01-22T01:28:00Z</updated><content type="html">&lt;P&gt;So we have Nfftiws (the web service that deals with Users). We can&amp;nbsp;call the GetUser method by passing email and password and get all the user's info and...&lt;/P&gt;
&lt;P&gt;Now wait a second. &lt;EM&gt;Passing email and password&lt;/EM&gt; to a web service? Using SOAP? On the public internet?&lt;/P&gt;
&lt;P&gt;You have to be quite brave to do that...&lt;/P&gt;
&lt;P&gt;So, what can we do to avoid snooping, spoofing and general bad things happen to our web service? Luckily there's an industry-wide effort going on to attack these issues called WS-I. There are cross platform protocols for security, authentication, encryption, etc... Microsoft's implementation of these set of protocols is provided by WSE 2.0 (now in technical preview stage).&lt;/P&gt;
&lt;P&gt;Once you download and install it, you have a new entry in the pop up menu that comes out when you right click on a project, where you can enable WSE and set a lot of other options.&lt;/P&gt;
&lt;P&gt;There is a big downside. The documentation is... uhm... how can I say this in a nice way... lacking? :)&lt;/P&gt;
&lt;P&gt;So I had to dig deep into Google and finally got a series of pages that, while none of them was complete, gave me a general idea on how to use WSE for my project...&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=61249" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>Hashtables and Web Services and .NET. What's up with that?</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61232.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61232.aspx</id><published>2004-01-22T00:55:00Z</published><updated>2004-01-22T00:55:00Z</updated><content type="html">&lt;p&gt;The UserSet class was supposed to be implemented like this:&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;public class UserSet&lt;br /&gt; {&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; public NFFTI.User user;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; public NFFTI.GroupCollection groupCollection;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; public&amp;nbsp;Hashtable propertyCollection;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt; &lt;font color="#0000ff"&gt;....&lt;br /&gt; }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;propertyCollection being (quite obviously) a Hashtable member that the Web Service could access by using the name of the property (ex: string fakeID = us.propertyCollection["Fake ID"];). That makes sense, right? Except that Hashtable does not implement IXmlSerializable, thus rendering it useless as a member of a class that's supposed to be returned by a web service method call.&lt;/p&gt; &lt;p&gt;Uhm...&lt;/p&gt; &lt;p&gt;After a bit of discussion with my partners in crime, Dominic Pease and Jamie Cansdale, we found a sample SerializableHashtable class on Usenet that implements both Hastable and IXmlSerializable. That looked perfect and it worked, except for the fact that the unserialized member would come out as a DataSet, and not an Hashtable. I'm sure that it would be possible for a better developer than me to modify SerializableHashtable to output a proper type, but in the end I decided to modify the Reference.cs generated file in the Test Harness project by adding&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;using UserSet as NFFTI.UserSet;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;at the beginning and commenting out the UserSet proxy class in this file. Contrary to popular (and my) belief, it worked fine and now I can access properties by name. The main drawback of this fix is that I have to reference the Business Object project from the Test Harness in order to know about the UserSet class. I'll gladly accept suggestions on how to avoid having to rely on this kludge :)&lt;/p&gt;&lt;div&gt;&lt;p&gt;[Now Playing: Depeche Mode - Wild Boys]&lt;/p&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=61232" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>NFFTI architecture and experiments</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61208.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/21/61208.aspx</id><published>2004-01-22T00:24:00Z</published><updated>2004-01-22T00:24:00Z</updated><content type="html">&lt;P&gt;The NFFTI administration engine is composed by a set of web services that will be accessed by a web interface and a rich client application. To start experimenting with the overall architecture, I generated a series of Data Access classes (using &lt;A href="http://www.ericjsmith.net/codesmith/"&gt;CodeSmith &lt;/A&gt;with my OleDbDALC templates, not yet released) for some tables, namely Users, Groups, UserGroups (cross reference), PropertyTypes and UserProperties (another cross reference table). Once these were generated, I put them in a &lt;STRONG&gt;Data Access Layer&lt;/STRONG&gt; project along with a Global class that will deal with the connection strings.&lt;/P&gt;
&lt;P&gt;After verifying that all these classes were working fine, I created a &lt;STRONG&gt;Business Objects&lt;/STRONG&gt; project where I dropped a UserSet class. This class will manage in a single entity user data, properties and the groups to which the user belongs.&lt;/P&gt;
&lt;P&gt;These two projects are simply class libraries. To interface them to the outside world I had to create &lt;EM&gt;another&lt;/EM&gt; project (&lt;STRONG&gt;Nfftiws&lt;/STRONG&gt;). This is a ASP.NET Web Service project that, for the moment, implements a UserManager class that deals with login, logout and retrieving information about a user.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Test Harness&lt;/STRONG&gt; is a Winforms project that will let me test Nfftiws' implementation.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=61208" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>And just to finish the day...</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/16/59276.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/16/59276.aspx</id><published>2004-01-16T11:34:00Z</published><updated>2004-01-16T11:34:00Z</updated><content type="html">The mandatory (temporary) logo: 
&lt;P&gt;&lt;IMG src="http://www.paolomarcucci.com/projects/nffti/logo.gif"&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;[Now Playing: Jamiroquai - Emergency On Planet Earth]&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=59276" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>NFFTI</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/16/59275.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/16/59275.aspx</id><published>2004-01-16T11:08:00Z</published><updated>2004-01-16T11:08:00Z</updated><content type="html">&lt;p&gt;By the way, the engine upon which the two websites will be built is going to be called NFFTI. Yes, it's an acronym. No, you are not allowed to know what it means, yet :)&lt;/p&gt;&lt;div&gt;&lt;p&gt;[Now Playing: Duran Duran - Hungry Like a Wolf]&lt;/p&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=59275" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>New year, new impossible project</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/15/59271.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/15/59271.aspx</id><published>2004-01-16T04:53:00Z</published><updated>2004-01-16T04:53:00Z</updated><content type="html">&lt;P&gt;As usual, new year resolutions include -in some way or another- the nebulous objective of making more money. With the objective firm in my mind, I had to start thinking about a way to achieve it. I wouldn't mind getting rid of a chunk of my house mortgage and that requires some serious work to be done. &lt;/P&gt;
&lt;P&gt;After a couple of seconds of consideration, I selected a couple of web projects I had completed three or four years ago and that were in dire need of some technological updates. I contacted the client about it and he sounded quite happy with my proposal, but nothing is yet decided, so I'm in the enviable position to start thinking about the solution without having too much pressure. &lt;/P&gt;
&lt;P&gt;Neat, eh? &lt;/P&gt;
&lt;P&gt;Anyways, the websites are marketing/community tools for a company that deals with the entertainment industry. They have to be able to post articles, stories and news, control the submission workflow, provide downloadables and discussion forums, event calendars, RSS feeds. They have to be able to move the sites easily between hosting companies (so, not too many dependencies on the underlying platforms, albeit I'm putting my foot down at mandating .NET). &lt;/P&gt;
&lt;P&gt;In the following posts I'm going to detail my design process and hope someone will chime in with helpful suggestions. See ya.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=59271" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term="NFFTI" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/NFFTI/default.aspx" /></entry><entry><title>XP SP2 woes</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2004/01/14/58628.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2004/01/14/58628.aspx</id><published>2004-01-14T17:19:00Z</published><updated>2004-01-14T17:19:00Z</updated><content type="html">&lt;P&gt;Finally got my PDC03 DVD set! I put the first DVD in my laptop, let it do its Autorun magic and the list of session tracks gets displayed in IE. Select a track, select a session, click on Start Session and...&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.paolomarcucci.com/images/screenshots/activex-xpsp2.png"&gt;&lt;/P&gt;
&lt;P&gt;Unh?&lt;/P&gt;
&lt;P&gt;&amp;#8220;Unknown Zone&amp;#8221;? How do I set my security settings for the Unknown Zone?&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=58628" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry><entry><title>RSS in Longhorn</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2003/11/15/37789.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2003/11/15/37789.aspx</id><published>2003-11-15T19:32:00Z</published><updated>2003-11-15T19:32:00Z</updated><content type="html">&lt;P&gt;&lt;A href="http://blogs.law.harvard.edu/tech/2003/11/15#a389"&gt;Dave Winer asks&lt;/A&gt; what do we know about an RSS aggregator in Longhorn. Scoble (in the comments for that posts) replies &amp;#8220;rotates through your RSS feeds and displays them like a sign in Times Square displays the news&amp;#8220;. &lt;/P&gt;
&lt;P&gt;From what I saw, this is a sample &amp;#8220;tile&amp;#8221; for the system sidebar. It is not included in the build released to the developers, but it was demoed quite often during the conference. We have to keep in mind that, at this stage, Longhorn is still in a technical preview phase, where most of the facilities we're expecting from a modern OS, like an intuitive editor for the feed and preferences, are not implemented yet. I think the list of feeds is an OPML file, maintained by hand in a specific location :)&lt;/P&gt;
&lt;P&gt;This is a picture I took during the first keynote, and it shows a couple of headlines from the MSDN RSS 2.0&amp;nbsp;feed.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.paolomarcucci.com/images/pdc03/rssinlh.jpg"&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=37789" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry><entry><title>VS.NET Tips &amp; Tricks notes</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33705.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33705.aspx</id><published>2003-10-27T04:03:00Z</published><updated>2003-10-27T04:03:00Z</updated><content type="html">&lt;P&gt;This is a BoF session where attendees and presenters (from Canada, yay) share neat little things (some known, some obscure) about working in VS.NET.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Creating a class that implements an interface, pressing Tab after the interface name will create stubs for the methods of the interface 
&lt;LI&gt;Ctrl+] jumps to the next end block. 
&lt;LI&gt;Ctrl+Shift+] selects the block. 
&lt;LI&gt;Ctrl+Shift+I enters incremental search. 
&lt;LI&gt;Ctrl+Space (sometimes Ctrl+J, depending on the language) enters IntelliSense. 
&lt;LI&gt;In command window you can create aliases (&lt;STRONG&gt;alias&lt;/STRONG&gt; command) to access all menu entries 
&lt;LI&gt;In command window, &lt;STRONG&gt;immed&lt;/STRONG&gt; enters immediate mode. 
&lt;LI&gt;Change &lt;STRONG&gt;Dockable&lt;/STRONG&gt; from the context menu of the Output window to put it into the source panes. 
&lt;LI&gt;Select &lt;STRONG&gt;New Horizontal/Vertical Tab&lt;/STRONG&gt; to split the source window to view two or more files at once. 
&lt;LI&gt;Ctrl+Tab navigates through open source windows (Ctrl+Shift+Tab navigates backwards) 
&lt;LI&gt;Clicking Mark All in the Find dialog will create a bookmark for each entry found. 
&lt;LI&gt;Alt+Drag selects arbitrary blocks of text. 
&lt;LI&gt;Entering a TODO comment (&lt;STRONG&gt;// TODO: do something&lt;/STRONG&gt;) will insert the comment in the task list. You can customize the list of tags that will go in the task list from the Options dialog. 
&lt;LI&gt;Alt+Shift+Enter toggles the full screen code window. 
&lt;LI&gt;Toggling &lt;STRONG&gt;Search Hidden Text&lt;/STRONG&gt; in the Find dialog will search into the collapsed regions. 
&lt;LI&gt;In C#, from the Class View, right click on a class and select Add &amp;gt; Property to get a wizard to automatically build a property structure. 
&lt;LI&gt;When removing a file from a solution, remember to take it out also from the source code manager (Visual SourceSafe or CVS) to avoid having it compiled and built nightly. 
&lt;LI&gt;Don't use MDI :) 
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfpredefinedcommandlinealiases.asp"&gt;Lots of built-in aliases&lt;/A&gt; for the Command Window. 
&lt;LI&gt;In Solution Explorer, right click the solution, select Properties and toggle &lt;STRONG&gt;Multiple Startup Projects&lt;/STRONG&gt; to start both the client and the server (if you have them) applications. 
&lt;LI&gt;Shift-F7 or Ctrl+PgUp/Ctrl+PgDn toggles between views on your file (Design, Source, HTML, Data, etc...)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Email contact addresses for the presenters are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Barry Gervin - &lt;A href="mailto:barry@objectsharp.com"&gt;barry@objectsharp.com&lt;/A&gt; 
&lt;LI&gt;Dennis Lee - &lt;A href="mailto:dennis@objectsharp.com"&gt;dennis@objectsharp.com&lt;/A&gt;
&lt;LI&gt;Dave Lloyd - &lt;A href="mailto:dave@objectsharp.com"&gt;dave@objectsharp.com&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Very cool session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=33705" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry><entry><title>.NET Rocks</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33684.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33684.aspx</id><published>2003-10-27T01:17:00Z</published><updated>2003-10-27T01:17:00Z</updated><content type="html">&lt;P&gt;I'm in the .NET Rocks panel/session/thinghie. No beer, unfortunately. Lots of interesting hosts, from Scott Hanselmann to &amp;#8220;the blogger himself&amp;#8221; Robert Scoble.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=33684" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry><entry><title>Karate Kid 2</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33636.aspx" /><id>http://weblogs.asp.net/pmarcucci/archive/2003/10/26/33636.aspx</id><published>2003-10-26T21:48:00Z</published><updated>2003-10-26T21:48:00Z</updated><content type="html">&lt;P&gt;Going out to the conference centre, I ended up in an elevator with Mr. Miagi. Again. No, I didn't get a picture with him, even if my goal for the day was to have a picture taken with someone famous. I guess Pat&amp;nbsp;Morita qualifies as famous, and given that he's staying at the same hotel as me, I will maybe have a chance tomorrow.&lt;/P&gt;
&lt;P&gt;He's not a movie star, but I accidentally met Peter Provost. Again, no pictures. I have to do better with my wife's camera, or she'll not let me use it ever again.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=33636" width="1" height="1"&gt;</content><author><name>Pmarcucci</name><uri>http://weblogs.asp.net/members/Pmarcucci.aspx</uri></author><category term=".NET Development" scheme="http://weblogs.asp.net/pmarcucci/archive/tags/.NET+Development/default.aspx" /></entry></feed>