<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
    <title>Ignus Bezuidenhout</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/ignusblog/Atom.aspx" />
    <subtitle type="html">blog</subtitle>
    <id>http://geekswithblogs.net/ignusblog/Default.aspx</id>
    <author>
        <name>Ignus Bezuidenhout</name>
        <uri>http://geekswithblogs.net/ignusblog/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2007-03-13T12:31:00Z</updated>
    <entry>
        <title>MOSS 2007</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/ignusblog/archive/2007/03/13/108657.aspx" />
        <id>http://geekswithblogs.net/ignusblog/archive/2007/03/13/108657.aspx</id>
        <published>2007-03-13T12:31:00-05:00:00</published>
        <updated>2007-03-13T12:31:00Z</updated>
        <content type="html">&lt;P&gt;It has been a while but nothing excited has really happened to write about until a few weeks ago.&amp;nbsp; I started playing around with MOSS 2007 (Microsoft Office Sharepoint Server 2007).&amp;nbsp; To read more about it:&amp;nbsp; &lt;A href="http://office.microsoft.com/en-us/sharepointserver/default.aspx"&gt;http://office.microsoft.com/en-us/sharepointserver/default.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I am currenlty looking at the Business Data Catalog (BDC) in MOSS.&amp;nbsp; Martin Kearn give an excellent overview here:&amp;nbsp; &lt;A href="http://blogs.msdn.com/martinkearn/archive/2006/10/05/What-is-the-Business-Data-Catalouge_3F00_.aspx"&gt;http://blogs.msdn.com/martinkearn/archive/2006/10/05/What-is-the-Business-Data-Catalouge_3F00_.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There is also a pretty good information on MSDN: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms563661.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms563661.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Other parts of MOSS that has peaked my interest is InfoPath and Excel Services.&amp;nbsp; Both technologies that will make life a lot simpler for all of us in the future.&lt;/P&gt;&lt;img src="http://geekswithblogs.net/ignusblog/aggbug/108657.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/ignusblog/comments/108657.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/ignusblog/comments/commentRss/108657.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/ignusblog/services/trackbacks/108657.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Web Service Call Error: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/ignusblog/archive/2006/08/09/87514.aspx" />
        <id>http://geekswithblogs.net/ignusblog/archive/2006/08/09/87514.aspx</id>
        <published>2006-08-09T11:52:00-05:00:00</published>
        <updated>2006-08-09T11:52:00Z</updated>
        <content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;We call our web services through TAM.&amp;nbsp; Of course this is never done in development so when we started testing one of our applications the other day we got the following error: &amp;#8220;The underlying connection was closed: A connection that was expected to be kept alive was closed by the server&amp;#8221;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This happened on subsequent calls to services through the TAM from our&amp;nbsp;.Net application and did not seem to happen from the Java side.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The first call will work fine but the second or third call will fail with the above mentioned error message.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;We at first used the approach as described by Microsoft (&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599&lt;/A&gt;) and did a proxy class for every one of our service calls in which we then set the Keepalive property to False.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here is the code:&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;MyServiceProxy&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt; : &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;MyService&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;protected override System.Net.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;WebRequest&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt; GetWebRequest(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;Uri&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt; uri)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;System.Net.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;HttpWebRequest&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt; webRequest =&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;(System.Net.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: teal"&gt;HttpWebRequest&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;)base.GetWebRequest(uri);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;webRequest.KeepAlive = false;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;return webRequest;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;This solved the issue but we got a little concerned about performance since we will force the connection close after every call.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We also are very close to UAT on our application and did not want to make significant code changes to all our service calls.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;After some digging around we found a timeout setting for keeping connections alive on the TAM server.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This setting was set to 5 seconds on the server.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The corresponding setting inside the .Net framework (&lt;SPAN style="mso-no-proof: yes"&gt;MaxServicePointIdleTime setting in ServicePointManager static class&lt;/SPAN&gt;) was set to 100 seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue"&gt;This change is done on a global level and we have decided to do that at session start in our web application.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-no-proof: yes"&gt;This setting is in milliseconds so we now have that set to 30000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;We have not seen the error again and we need to do load testing now but all indications are that this will be a good solution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://geekswithblogs.net/ignusblog/aggbug/87514.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/ignusblog/comments/87514.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/ignusblog/comments/commentRss/87514.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/ignusblog/services/trackbacks/87514.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/ignusblog/archive/2006/07/20/85798.aspx" />
        <id>http://geekswithblogs.net/ignusblog/archive/2006/07/20/85798.aspx</id>
        <published>2006-07-20T07:38:00-05:00:00</published>
        <updated>2006-07-20T07:44:00Z</updated>
        <content type="html">&lt;P&gt;A day or so ago I started getting the message &lt;FONT color=#0000ff&gt;&amp;#8220;If you have references in markup, they will not be renamed&amp;#8221;&lt;/FONT&gt;&amp;nbsp;in my ASP 2.0 project whenever I change a control name on my page.&amp;nbsp; 
&lt;P&gt;At first I thought it was because I just added a master page to all my pages and that is causing some issues.&amp;nbsp; I decided to live with it for now since most of my development is done and I am just cleaning up stuff.&amp;nbsp; But as expected the users now want a few more &amp;#8220;fields&amp;#8220; on the page.&amp;nbsp; Then it really got on my nerves.&amp;nbsp; 
&lt;P&gt;I started looking around and found a entry by Rick Strahl (&lt;A href="http://west-wind.com/weblog/posts/3192.aspx"&gt;http://west-wind.com/weblog/posts/3192.aspx&lt;/A&gt;) that pointed me to the Visual Studio bug list where this has been reported and two workarounds are posted there: &lt;A href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101992"&gt;http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101992&lt;/A&gt; 
&lt;P&gt;A quick summary of the workarounds (both worked for me):&lt;/P&gt;
&lt;P&gt;The quick fix is to make VS re-build the web site cache:&lt;BR&gt;a) shut down all instances of VS&lt;BR&gt;b) remove cache from command prompt&amp;gt; rd /s /q "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache"&lt;BR&gt;c) re-open your web site and the cache will be re-created &lt;/P&gt;
&lt;P&gt;An alternative method to fix the one web site without deleteing the entire cache is the following:&lt;BR&gt;a) shut down all instances of VS&lt;BR&gt;b) open "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\websites.xml"&lt;BR&gt;c) locate the entry for your web site and get its CacheFolder name. Usually the name of the web.&lt;BR&gt;d) Ensure a sub-directory of that name exists under "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\"&lt;/P&gt;
&lt;P&gt;Enjoy.&lt;/P&gt;
&lt;P&gt;PS:&amp;nbsp;&amp;nbsp; I also found the shortcut key for switching between markup and design view.&amp;nbsp; It is CTRL-Page Up&amp;nbsp;or CTRL-Page Down.&lt;/P&gt;&lt;img src="http://geekswithblogs.net/ignusblog/aggbug/85798.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/ignusblog/comments/85798.aspx</wfw:comment>
        <slash:comments>8</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/ignusblog/comments/commentRss/85798.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/ignusblog/services/trackbacks/85798.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Using a password protected certificate with HTTPWebRequest</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/ignusblog/archive/2006/07/12/84889.aspx" />
        <id>http://geekswithblogs.net/ignusblog/archive/2006/07/12/84889.aspx</id>
        <published>2006-07-12T15:43:00-05:00:00</published>
        <updated>2006-07-13T06:02:00Z</updated>
        <content type="html">&lt;P style="MARGIN: 0in 0in 0pt"&gt;Yesterday I got the task to do a &amp;#8220;quick&amp;#8221; POC to test a call to a service (without SOAP) using a client certificate.&amp;nbsp; First of all please do not ask why we want to do it without SOAP.&amp;nbsp; That is a very loooong story.&lt;/P&gt;
&lt;P&gt;After some initial poking around I found a few good links:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&amp;#183;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; mso-fareast-font-family: Symbol"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;A href="http://blogs.msdn.com/adarshk/archive/2004/09/01/224214.aspx"&gt;http://blogs.msdn.com/adarshk/archive/2004/09/01/224214.aspx&lt;/A&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in"&gt;&lt;SPAN style="COLOR: green; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;o&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: green; mso-fareast-font-family: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;This is adarsh blog and I liked it because it is short and sweet and it put me on the right track.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Only ugly part is that this example was for .Net 2.0 beta so the X509CertificateEx class has been renamed to X509Certificate2.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is still in the &lt;SPAN style="mso-no-proof: yes"&gt;System.Security.Cryptography.X509Certificates namespace.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&amp;#183;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; mso-fareast-font-family: Symbol"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; mso-no-proof: yes"&gt;&lt;A href="http://support.microsoft.com/kb/895971/en-us"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;http://support.microsoft.com/kb/895971/en-us&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 1in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;o&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; mso-fareast-font-family: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green; mso-no-proof: yes"&gt;This article is for .Net 1.0 and 1.1 but have some good tips if you want to see the installed certificates on your machine.&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="mso-no-proof: yes"&gt;I ended up with a pretty clean solution but are having a weird problem when I run it on the server.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I get the following error sometimes and &lt;/SPAN&gt;am trying to find a solution for this now (will keep you posted)&lt;SPAN style="mso-no-proof: yes"&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.5in"&gt;&lt;I&gt;The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.&lt;/I&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 0.5in"&gt;&lt;FONT color=#006400&gt;I found some good info here:&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx"&gt;&lt;FONT color=#006400&gt;http://weblogs.asp.net/jan/archive/2004/05/08/128394.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#006400&gt;.&amp;nbsp; This is for WSE but it has fixed my problem as well.&lt;SPAN style="COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Here is the current code I am playing with (and it works):&lt;/P&gt;
&lt;P&gt;Some important using statements for this to work:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-no-proof: yes"&gt; System.IO;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-no-proof: yes"&gt; System.Net;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-no-proof: yes"&gt; System.Security.Cryptography.X509Certificates;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-no-proof: yes"&gt; System.Net.Security;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: blue; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-no-proof: yes"&gt; System.Security.Policy;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; SecureTest(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;try&lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;HttpWebRequest&lt;/SPAN&gt; req = (&lt;SPAN style="COLOR: teal"&gt;HttpWebRequest&lt;/SPAN&gt;)&lt;SPAN style="COLOR: teal"&gt;WebRequest&lt;/SPAN&gt;.Create(&amp;#8220;http://myurl/TestService&amp;#8221;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;req.Method = &lt;SPAN style="COLOR: maroon"&gt;"POST"&lt;/SPAN&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;req.KeepAlive = &lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;X509Certificate2&lt;/SPAN&gt; Cert = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;X509Certificate2&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; CertPath = &amp;#8220;c:\temp\cert.p12&amp;#8221;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; CertPwd = &amp;#8220;certpassword&amp;#8221;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Cert.Import(CertPath, CertPwd, &lt;SPAN style="COLOR: teal"&gt;X509KeyStorageFlags&lt;/SPAN&gt;.PersistKeySet);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;req.ClientCertificates.Add(Cert);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;Stream&lt;/SPAN&gt; s = req.GetRequestStream();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;StreamWriter&lt;/SPAN&gt; sw = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;StreamWriter&lt;/SPAN&gt;(s);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;sw.Write(txtInput.Text);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;sw.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;s.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2&gt;// submit synchronous HTTP request to Web server&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;WebResponse&lt;/SPAN&gt; rsp = req.GetResponse();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="COLOR: green"&gt;&lt;FONT size=2&gt;// WebResponse provides stream-based access so let's go get it baby&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: teal"&gt;StreamReader&lt;/SPAN&gt; sr = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;StreamReader&lt;/SPAN&gt;(rsp.GetResponseStream());&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;txtSecureOutput.Text = sr.ReadToEnd();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: blue"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;Exception&lt;/SPAN&gt; ex) { &lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt; ex; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://geekswithblogs.net/ignusblog/aggbug/84889.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/ignusblog/comments/84889.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/ignusblog/comments/commentRss/84889.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/ignusblog/services/trackbacks/84889.aspx</trackback:ping>
    </entry>
    <entry>
        <title>VB, C# and MTBC (my three brian cells)</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/ignusblog/archive/2006/07/12/84901.aspx" />
        <id>http://geekswithblogs.net/ignusblog/archive/2006/07/12/84901.aspx</id>
        <published>2006-07-12T11:55:00-05:00:00</published>
        <updated>2006-07-12T11:55:00Z</updated>
        <content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=2&gt;I have been a VB guy since VB3.0.&amp;nbsp; IMHO it is the&amp;nbsp;most productive&amp;nbsp;language available.&amp;nbsp; I flunk out of typing school so typing is not for me.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;VB has over the years made coding so easy without scarifying performance.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;When .Net was released it was tough to not have some of the productivity features we were used to for years like &amp;#8220;Edit and Continue&amp;#8221; etc.&amp;nbsp; Most of that is now back again in VS 2005 and I am very happy.&amp;nbsp; If you are still using VB6 &lt;FONT color=#ff0000&gt;now&lt;/FONT&gt; is the time to switch to .Net.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=2&gt;I was also never big on the web applications.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It sure has a rightful place in our world.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;I have done some web stuff and really like what is available in VS 2005 and ASP.Net 2.0.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I am also very excited about &lt;/FONT&gt;&lt;A href="http://atlas.asp.net/Default.aspx?tabid=47"&gt;&lt;FONT size=2&gt;ATLAS&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It gives us a lot of features (based on the &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;AJAX&lt;/st1:place&gt;&lt;/st1:City&gt; platform) that we used to either live without or had to code lines and lines of JavaScript to accomplish.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is still in Beta but it is slick.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=2&gt;Recently I took a new job and my first few projects are C# and all are on ASP 2.0.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So as you can imagine I now have to do the wild thing and read documentation again.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;My head hurts.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I only have three brain cells left and they are all preserve in some malted beverage for use (or abuse) by the next generation.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I have a hard time every morning to get the three of them going.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=2&gt;I am getting awfully familiar with C# now and although I do not mind using it I must say that I still prefer VB over C#.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is just way more productive of a language and once it becomes IL it is all the same in any case.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://geekswithblogs.net/ignusblog/aggbug/84901.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/ignusblog/comments/84901.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/ignusblog/comments/commentRss/84901.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/ignusblog/services/trackbacks/84901.aspx</trackback:ping>
    </entry>
</feed>