<rss version="2.0" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>IPWorks</title>
        <link>http://geekswithblogs.net/Lance/category/6618.aspx</link>
        <description>IPWorks</description>
        <language>en-US</language>
        <copyright>Lance Robinson</copyright>
        <managingEditor>lmrobins@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>New Stuff on the Work Front</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/07/22/new-stuff-on-the-work-front.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;From the work front:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;What have I been doing at work lately?  I’ve been spending a lot of time at work playing with &lt;a href="http://www.nsoftware.com/sharepoint/"&gt;SharePoint&lt;/a&gt;, the &lt;a href="http://www.powershelltoys.com"&gt;PowerShellToys’ PowerShellASP&lt;/a&gt; which lets you create ASP.NET apps with PowerShell script, and I set myself up with a brand new openSUSE 11 (this is a great distro) machine where I’ve been spending a lot of time in MonoDevelop.&lt;/p&gt;  &lt;p&gt;Speaking of PowerShell and ASP.NET – check out &lt;a href="http://www.codeplex.com/Poshboard"&gt;PoshBoard&lt;/a&gt; [at CodePlex], Antoine Habert’s PowerShell driven ajax portal.  Antoine has a &lt;a href="http://devinfra-us.blogspot.com/2008/07/powershell-dashboard-aspnet-silverlight.html"&gt;nice little video on his blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;/n software has also made a small flurry of new announcements over the past week or so.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;New release – &lt;a href="http://www.nsoftware.com/ipworks/v8/edi.aspx"&gt;IP*Works! EDI/AS2 V8&lt;/a&gt;.  Another fresh round of Drummond cert tests are complete.  On top of the insanely popular AS2 components, we’ve added OFTP, FTPS, and a new java GISB component.  A new AS2 Connector application is coming out of the pipeline soon too!       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;New release – &lt;a href="http://www.nsoftware.com/ibiz/paymentech/"&gt;Paymentech Integrator v5&lt;/a&gt;.  Paymentech Integrator is probably my personal favorite of all of our credit card processing components.  With PABP/CISP compliance being so important, this new release has been highly anticipated.  This release adds Canadian Debit and Health Care/FSA support.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;New beta – &lt;a href="http://www.nsoftware.com/ibiz/ups/"&gt;UPS Integrator&lt;/a&gt;.  Unlike the other /n software shipping integrators (FedEx and USPS), this one does NOT include the ability to generate shipping labels.  While the technology is there, unfortunately UPS licensing restrictions will not allow us to release a component that generates UPS shipping labels, but we are trying to work with them to change this.  If this is something you’re looking for, do contact me so that I can get your comments passed on to the right people at UPS!       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;New beta – &lt;a href="http://www.nsoftware.com/sharepoint/"&gt;SharePoint Workflow Extensions&lt;/a&gt;.  The toolkit includes SharePoint Activities for Internet communications, namely FTP (ssl &amp;amp; ssh), RSS, email, sexec, SMPP (sms messaging), SNPP (paging), and XMPP (jabber). &lt;/li&gt; &lt;/ul&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123944"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123944" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/123944.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/07/22/new-stuff-on-the-work-front.aspx</guid>
            <pubDate>Tue, 22 Jul 2008 16:27:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/123944.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/07/22/new-stuff-on-the-work-front.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/123944.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/123944.aspx</trackback:ping>
        </item>
        <item>
            <title>Best of Tech Ed 2008</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/06/06/best-of-tech-ed-2008.aspx</link>
            <description>&lt;p&gt;/n software walks away from Tech Ed this year with the &lt;a href="http://windowsitpro.com/awards/teched_dev_finalists_2008.html"&gt;Best of Tech Ed 2008: Software Components &amp;amp; Middleware&lt;/a&gt;, given for the &lt;a href="http://www.nsoftware.com/subscriptions/default.aspx"&gt;Red Carpet Subscription&lt;/a&gt;.  Woo!&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Red Carpet Subscriptions give you everything you need in one package - components for every major protocol from FTP to IMAP to SNMP, SSL and SSH security, S/MIME encryption, Digital Certificates, Credit Card Processing, ZIP compression, Instant Messaging, Shipping and Tracking, and e-business (EDI) transactions.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://windowsitpro.com/article/articleid/99403/teched-developer-2008-day-4.html"&gt;Windows IT Pro&lt;/a&gt; lists all the winners on their website.&lt;/p&gt; &lt;p&gt;Unfortunately I missed TechEd this year.  While my co-workers were there having a good time, I was at my desk working hard.  But the good news is that there are lots of new version upgrades on the way soon!&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:99fa5b6a-d330-423d-92fe-dff096cd0566" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/TechEd" rel="tag"&gt;TechEd&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122665"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122665" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/122665.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/06/06/best-of-tech-ed-2008.aspx</guid>
            <pubDate>Fri, 06 Jun 2008 14:42:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/122665.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/06/06/best-of-tech-ed-2008.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/122665.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/122665.aspx</trackback:ping>
        </item>
        <item>
            <title>View WireShark Payload Data as Byte Arrays</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/06/03/view-wireshark-payload-data-as-byte-arrays.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/Lance/WindowsLiveWriter/ViewWireSharkPayloadDataasByteArrays_B41D/Follow%20UDP%20Stream2_2.jpg"&gt;&lt;img width="244" height="184" border="0" align="right" style="border: 0px none ;" alt="Follow UDP Stream2" src="http://geekswithblogs.net/images/geekswithblogs_net/Lance/WindowsLiveWriter/ViewWireSharkPayloadDataasByteArrays_B41D/Follow%20UDP%20Stream2_thumb.jpg" /&gt;&lt;/a&gt; A customer was having a problem receiving an SNMP trap with a 64 bit timestamp in it.  In order to test, I wanted to send the exact same trap the customer was sending, using the basic UDPPort component of &lt;a title="IP*Works Internet Toolkit" href="http://www.nsoftware.com/ipworks/default.aspx?geekswithblogs" target="_blank"&gt;IP*Works!&lt;/a&gt; INSTEAD of the SendTrap or SendSecureTrap methods that are included in IPWorks SSNMP's SNMPAgent component.  It turns out WireShark gives me an extremely easy way to do this in my code.&lt;/p&gt;
&lt;p&gt; I opened the Wireshark cap file sent to me by the customer, which only included the SNMP trap (important, but I could have filtered it myself).  I right clicked on the SNMP trap and chose "Follow UDP Stream".  Since the sniff only included the single UDP packet, this displays the UDP payload that makes up the trap.  Then I noticed "C Arrays" in the format options for viewing the data.  Clicking this displayed the data in a c byte array instead of the raw bytes.  Very handy for copying and pasting right over to my own C# code!&lt;/p&gt;
&lt;p&gt;Now to send this exact trap, all I need to do is:&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;nsoftware.IPWorks.Udpport agent = &lt;span class="kwrd"&gt;new&lt;/span&gt; Udpport();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;agent.LocalPort = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;agent.RemoteHost = &lt;span class="str"&gt;"255.255.255.255"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;agent.RemotePort = remoteport; &lt;span class="rem"&gt;//trap port      &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;agent.Active = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] mytrap = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        0x30, 0x6f, 0x02, 0x01, 0x00, 0x04, 0x06, 0x70, &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        0x75, 0x62, 0x6c, 0x69, 0x63, 0xa4, ... etc ... }; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;agent.DataToSendB = mytrap;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a44c1e8a-24d8-4d75-ab15-5bfffd586e8a" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/WireShark" rel="tag"&gt;WireShark&lt;/a&gt;, &lt;a href="http://technorati.com/tags/IPWorks" rel="tag"&gt;IPWorks&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SNMP" rel="tag"&gt;SNMP&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Debugging" rel="tag"&gt;Debugging&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122580"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122580" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/122580.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/06/03/view-wireshark-payload-data-as-byte-arrays.aspx</guid>
            <pubDate>Tue, 03 Jun 2008 16:37:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/122580.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/06/03/view-wireshark-payload-data-as-byte-arrays.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/122580.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/122580.aspx</trackback:ping>
        </item>
        <item>
            <title>Zipping data from/to memory</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/05/22/zipping-data-fromto-memory.aspx</link>
            <description>&lt;p&gt;Recently, several people have asked me the same question:  How do I zip from a memory stream to a memory stream?&lt;/p&gt; &lt;p&gt;With the Zip component that comes in &lt;a href="http://www.nsoftware.com/ipworks/zip/default.aspx"&gt;IPWorks Zip&lt;/a&gt;, you can zip from any kind of file or stream to any kind of stream or file.  There is one trick to going from memory stream to memory stream though - and that is keeping the stream open after compressing.&lt;/p&gt; &lt;p&gt;By default, the component will automatically close an input stream after it compresses from it.  But we added a config setting that you can use to turn this off and manually close the stream yourself after you're really done with it (after the extraction or whatever other plans you have for the stream after compression).&lt;/p&gt; &lt;p&gt;The compression:&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;MemoryStream file1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(GetBytes(&lt;span class="str"&gt;"This is test 1"&lt;/span&gt;));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;MemoryStream file2 = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream(GetBytes(&lt;span class="str"&gt;"This is test 2"&lt;/span&gt;));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;MemoryStream myStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; MemoryStream();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;Zip zip = &lt;span class="kwrd"&gt;new&lt;/span&gt; Zip();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;zip.SetArchiveOutputStream(myStream);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;zip.Files.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ZIPFile(&lt;span class="str"&gt;"test.txt"&lt;/span&gt;, file1InputStream));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;zip.Files.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ZIPFile(&lt;span class="str"&gt;"test2.txt"&lt;/span&gt;, file2InputStream));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="rem"&gt;//config the component to keep the stream open&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;zip.Config(&lt;span class="str"&gt;"CloseStreamAfterCompress=false"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;zip.Compress();&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;&lt;style type="text/css"&gt;&lt;![CDATA[csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
]]&gt;&lt;/style&gt;

&lt;p&gt;Now I can get onto whatever business I have with the compressed stream.  If I want to extract an already compressed stream, its just as easy:&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="rem"&gt;//make sure I'm at the beginning of the compressed data:&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;myStream.Seek(0, SeekOrigin.Begin);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;zip = &lt;span class="kwrd"&gt;new&lt;/span&gt; Zip();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;zip.ExtractToPath = "..\\myextractedfiles\\";&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;zip.SetArchiveInputStream(myStream);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;zip.ExtractAll();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;myStream.Close();&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:dd4b3716-a2ee-43d5-b3b1-86eb4f70e7d0" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/IPWorksZip" rel="tag"&gt;IPWorksZip&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Zip" rel="tag"&gt;Zip&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122314"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122314" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/122314.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/05/22/zipping-data-fromto-memory.aspx</guid>
            <pubDate>Thu, 22 May 2008 20:04:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/122314.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/05/22/zipping-data-fromto-memory.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/122314.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/122314.aspx</trackback:ping>
        </item>
        <item>
            <title>FXP - FTP transfers from server to server</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/05/15/fxp---ftp-transfers-from-server-to-server.aspx</link>
            <description>&lt;p&gt;Every so often I get a question from someone who wants to transfer files between two FTP servers.  In order to do so, they usually have to connect to server 1, download the files, and then connect to server 2 and upload the files.  The process could go much sooner if they could eliminate the extra transfers and just copy the files directly from server 1 to server 2.  It turns out this is possible, and is in fact mentioned in the FTP spec (RFC 959), but most people don't realize it.  Also most servers don't allow it by default, for &lt;a href="http://www.cert.org/tech_tips/ftp_port_attacks.html"&gt;security reasons&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;FXP, aka site-to-site transfer, aka server-to-server transfer is really just a sneaky trick of the FTP protocol itself.  Here's how FXP works: &lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Create a connection to FTP server 1, and another connection to FTP server 2.  &lt;/li&gt;
    &lt;li&gt;On FTP server 1, enter passive mode (data connections will be incoming), and make a note of the servers response to the PASV command (what ip the server will be listening on, and on what port).  &lt;/li&gt;
    &lt;li&gt;On server 2, send a PORT command (data connections will be outgoing), such that the port command data corresponds to the data in FTP server 1's reply to the PASV command gathered in step 2.  &lt;/li&gt;
    &lt;li&gt;Finally, send the STOR command to ftp server 1, and the RETR command to FTP server 2.  The data connection will be made between those two servers, and when the transfer is complete the client will be notified by &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here's how you can do this with two instances of the IPWorks FTP component:&lt;/p&gt;
&lt;div class="scrollarea"&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FXP()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;      &lt;span class="rem"&gt;//FXP, aka site-to-site or server-to-server transfers&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;      &lt;span class="rem"&gt;//not commonly supported by FTP servers by default, for&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;      &lt;span class="rem"&gt;//security reasons&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;      &lt;span class="kwrd"&gt;string&lt;/span&gt;[] portdata = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;      Ftp ftpA = &lt;span class="kwrd"&gt;new&lt;/span&gt; Ftp();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;      ftpA.Timeout = 5;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;      ftpA.OnPITrail += &lt;span class="kwrd"&gt;new&lt;/span&gt; Ftp.OnPITrailHandler(&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, FtpPITrailEventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;      {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (e.Message.StartsWith(&lt;span class="str"&gt;"227"&lt;/span&gt;)) &lt;span class="rem"&gt;//response to PASV&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;          &lt;span class="kwrd"&gt;string&lt;/span&gt; portparams = e.Message.Substring(e.Message.IndexOf(&lt;span class="str"&gt;"("&lt;/span&gt;) + 1);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;          portparams = portparams.Remove(portparams.IndexOf(&lt;span class="str"&gt;")"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;          portdata = portparams.Split(&lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;char&lt;/span&gt;[] { &lt;span class="str"&gt;','&lt;/span&gt; });&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;      });&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;      ftpA.RemoteHost = &lt;span class="str"&gt;"serverA"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;      ftpA.User = &lt;span class="str"&gt;"test"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;      ftpA.Password = &lt;span class="str"&gt;"password"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;      ftpA.Passive = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;      ftpA.Logon();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;      ftpA.Command = &lt;span class="str"&gt;"PASV"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;      &lt;span class="rem"&gt;//if this reply was 200 OK, then the server will allow the site to site transfer.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;      &lt;span class="rem"&gt;//now we know the port number that server A is listening on (portparams),&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;      &lt;span class="rem"&gt;//so start a retriever on server B:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;      ThreadPool.QueueUserWorkItem(&lt;span class="kwrd"&gt;new&lt;/span&gt; WaitCallback(FTPRetriever), portdata);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;      &lt;span class="rem"&gt;//start the sender on server A:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;      ftpA.Command = &lt;span class="str"&gt;"STOR uploaded.txt\r\n"&lt;/span&gt;; &lt;span class="rem"&gt;//the file to create on server 1&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;      &lt;span class="rem"&gt;//done..disconnect&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;      ftpA.Logoff();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt;    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; FTPRetriever(&lt;span class="kwrd"&gt;object&lt;/span&gt; parameter)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;      &lt;span class="kwrd"&gt;string&lt;/span&gt;[] portdata = (&lt;span class="kwrd"&gt;string&lt;/span&gt;[])parameter;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;      Ftp ftpB = &lt;span class="kwrd"&gt;new&lt;/span&gt; Ftp();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt;      ftpB.Timeout = 5;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;      ftpB.RemoteHost = &lt;span class="str"&gt;"serverB"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;      ftpB.User = &lt;span class="str"&gt;"test"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt;      ftpB.Password = &lt;span class="str"&gt;"mypassword"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;      ftpB.Passive = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;      ftpB.Logon();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;      ftpB.RemotePath = &lt;span class="str"&gt;"destinationfolder/"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;      ftpB.ListDirectory();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;      ftpB.Command = &lt;span class="str"&gt;"PORT "&lt;/span&gt; + portdata[0] + &lt;span class="str"&gt;","&lt;/span&gt; + portdata[1] + &lt;span class="str"&gt;","&lt;/span&gt; + portdata[2] + &lt;span class="str"&gt;","&lt;/span&gt; + &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt;                                   portdata[3] + &lt;span class="str"&gt;","&lt;/span&gt; + portdata[4] + &lt;span class="str"&gt;","&lt;/span&gt; + portdata[5];&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;      ftpB.Command = &lt;span class="str"&gt;"RETR uploaded.txt"&lt;/span&gt;; &lt;span class="rem"&gt;//the file to get from server A&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;      ftpB.Logoff();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;There you have it, a pretty straight forward process.  ftpA connects to server A and sends the command needed to create an incoming data transfer connection and start sending a file called uploaded.txt.  ftpB connects to server B and sends the commands needed to create an outgoing data transfer connection (to server A) and receive the file uploaded.txt.&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e904fb14-5c00-4bd3-a7b2-f0d73b206503" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/Ftp"&gt;Ftp&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/FXP"&gt;FXP&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/IPWorks"&gt;IPWorks&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122168"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122168" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/122168.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/05/15/fxp---ftp-transfers-from-server-to-server.aspx</guid>
            <pubDate>Thu, 15 May 2008 16:02:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/122168.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/05/15/fxp---ftp-transfers-from-server-to-server.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/122168.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/122168.aspx</trackback:ping>
        </item>
        <item>
            <title>Sending Email On Behalf Of</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/02/26/sending-email-on-behalf-of.aspx</link>
            <description>&lt;p&gt;When you get an email from a yahoo group list, for example, it might say it was sent from &lt;a href="mailto:yourgroup@yahoogroups.com"&gt;yourgroup@yahoogroups.com&lt;/a&gt; on behalf of the person who actually sent it.  Both addresses will be included in the message. &lt;/p&gt;
&lt;p&gt;This is done in SMTP with the SENDER header.  If the Sender header is present, the email client should identify the mail as being "from" the sender you specify in the SENDER header (they are "the responsible mail submitter"), on behalf of the from-address that you specify in the FROM header.  You can do it with &lt;a title="IP*Works Internet Toolkit" target="_blank" href="http://www.nsoftware.com/ipworks/default.aspx?geekswithblogs"&gt;IP*Works!&lt;/a&gt; by simply adding the SENDER header (which is not the same as the FROM header) using the OtherHeaders property, ie:&lt;/p&gt;
&lt;div class="scrollarea"&gt;
&lt;pre class="csharpcode"&gt;smtp.OtherHeaders = &lt;span class="str"&gt;"Sender: sender-address@mydomain.com"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;So, to send an email from test@mylist.com on behalf of the someuser@somedomain.com, just say: &lt;/pre&gt;
&lt;pre class="csharpcode"&gt;smtp.OtherHeaders = &lt;span class="str"&gt;"Sender: test@mylist.com"&lt;/span&gt;; &lt;br /&gt;smtp.From = &lt;span class="str"&gt;"someuser@somedomain.com"&lt;/span&gt;; &lt;br /&gt;smtp.SendTo = &lt;span class="str"&gt;"test@nsoftware.com"&lt;/span&gt;; &lt;br /&gt;smtp.Subject = &lt;span class="str"&gt;"SendOnBehalfOf"&lt;/span&gt;; &lt;br /&gt;smtp.MessageText = &lt;span class="str"&gt;"message text"&lt;/span&gt;; &lt;br /&gt;smtp.Connect(); &lt;br /&gt;smtp.Send();&lt;/pre&gt;&lt;/div&gt;
You can use the OtherHeaders property to specify any custom headers you'd like, multiple headers should be separated with a CRLF.
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7c748684-6dda-45d3-bd17-cb7c782fabc5" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/SMTP"&gt;SMTP&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/IPWorks"&gt;IPWorks&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119993"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119993" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/119993.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/02/26/sending-email-on-behalf-of.aspx</guid>
            <pubDate>Tue, 26 Feb 2008 21:38:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/119993.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/02/26/sending-email-on-behalf-of.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/119993.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/119993.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP.Net Medium Trust and IPWorks/IBiz ASP.Net Editions</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/02/21/asp.net-medium-trust-and-ipworksibiz-asp.net-editions.aspx</link>
            <description>&lt;p&gt;This great MSDN article: "&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998341.aspx"&gt;How To: Use Medium Trust in ASP.NET 2.0&lt;/a&gt;" will probably answer nearly all of your questions about how to work in medium trust and how to customize medium trust permissions.  Here are a few extracts from this document that serve as a sort of "quick start" to medium trust.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;By default, ASP.NET 2.0 Web applications and Web services run with full trust and applications can perform privileged operations and access resources subject only to operating system security and Windows access control lists (ACLs).  You can use code access security (CAS) to restrict access to certain resources by using the &lt;strong&gt;trust&lt;/strong&gt; element of the web.config.  You can set full, high, medium, low, and minimal trust.  &lt;/li&gt;
    &lt;li&gt;Medium restricts you from using OldDbPermission, EventLogPermission, ReflectionPermission, RegistryPermission, calling unmanaged code, and using Enterprise Services.  Also WebPermission (you can only communicate with address(es) defined in the trust element) and FileIOPermission (You can only access files in your applications virtual directory hierarchy) are restricted.  &lt;/li&gt;
    &lt;li&gt;To turn on medium trust, set the trust level to medium in your app-level or machine-level web.config (&amp;lt;trust level="Medium" /&amp;gt;).  Consider the originUrl attribute for the trust element, which allows you to limit what Urls the web application(s) can access.  &lt;/li&gt;
    &lt;li&gt;You can customize medium trust restrictions (e.g., modify FileIOPermission to allow access to a specific directory outside of the applications virtual directory hierarchy) by creating a custom policy file and custom policy level.  There is a great example of this provided in the article.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: machine.config can be found in the "%windir%\Microsoft.Net\Framework\&lt;em&gt;xxx&lt;/em&gt;\config" directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How all this applies to &lt;a target="_blank" href="http://www.nsoftware.com/ipworks/default.aspx?geekswithblogs" title="IP*Works Internet Toolkit"&gt;IP*Works!&lt;/a&gt; and &lt;a href="http://www.nsoftware.com/ibiz/?geekswithblogs" title="IBiz"&gt;IBiz&lt;/a&gt; products:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;In general, all /n software .Net components will need the following permissions, all of which are granted by default in Medium trust except SocketPermission:&lt;br /&gt;
    &lt;br /&gt;
    &lt;ol&gt;
        &lt;li&gt;FileIOPermission - all components, for licensing and file access.  &lt;/li&gt;
        &lt;li&gt;ReflectionPermission - all components, for licensing.  &lt;/li&gt;
        &lt;li&gt;SocketPermission - all components that use socket communication.  &lt;/li&gt;
        &lt;li&gt;DnsPermission - anytime a hostname is used instead of a dotted IP address.&lt;/li&gt;
    &lt;/ol&gt;
    &lt;br /&gt;
    To add SocketPermission to your custom medium trust, just add the following security class and ipermission to your custom policy config:&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;&amp;lt;SecurityClass Name="SocketPermission" Description="System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&amp;gt;&lt;/em&gt;&lt;br /&gt;
    &lt;br /&gt;
    &lt;em&gt;&amp;lt;IPermission class="SocketPermission" version="1" Unrestricted="true" /&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &lt;/em&gt; &lt;/li&gt;
    &lt;li&gt;If you build with nsoftware.System.dll or if you're using a product that uses unsafe or unmanaged code (like SSL which uses pinvokes to security libraries installed on Windows machines), you'll need to set the SkipVerification flags and ManagedCode flags (respectively) of SecurityPermission in your custom policy file.  &lt;/li&gt;
    &lt;li&gt;You may wish to &lt;a href="http://weblogs.asp.net/hosterposter/archive/2006/03/22/440886.aspx"&gt;alter the WebPermission permission&lt;/a&gt; to allow access to any Uri.  &lt;/li&gt;
    &lt;li&gt;You could use CodeGroups with the IMembershipCondition (StrongNameMembershipCondition) to restrict custom config settings specifically to code signed by /n software.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119861"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119861" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/119861.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/02/21/asp.net-medium-trust-and-ipworksibiz-asp.net-editions.aspx</guid>
            <pubDate>Thu, 21 Feb 2008 18:58:13 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/119861.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/02/21/asp.net-medium-trust-and-ipworksibiz-asp.net-editions.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/119861.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/119861.aspx</trackback:ping>
        </item>
        <item>
            <title>FTP error 425, &amp;quot;Can't open data connection.&amp;quot;</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/01/24/ftp-error-425-quotcant-open-data-connection.quot.aspx</link>
            <description>&lt;p&gt;One of the most common questions I get about FTP has to do with error 425, "Can't open data connection."  This is indeed a protocol level error that is defined in the RFC.  Its meaning is obvious:  the data connection (for a directory listing, upload, or download) was unable to be established.  &lt;/p&gt;&lt;p&gt;First - the most common solution:  change the active/passive mode settings.  But that might not work, and if it does its only a band-aid covering up the real problem. &lt;/p&gt;&lt;p&gt;As I've mentioned in the past, one of the most common reasons that this error occurs is a misconfiguration of the FTP server software itself, related to SSL connections and firewalls, in which the connection tries to establish itself on a bogus ip address.  &lt;a href="http://geekswithblogs.net/Lance/archive/2005/08/23/50912.aspx"&gt;Read more about FTP SSL through a NAT firewall here&lt;/a&gt;, some potential solutions are included. &lt;/p&gt;&lt;p&gt;There are other less likely causes, such as: &lt;/p&gt;&lt;ul&gt; &lt;li&gt;The server is configured to always use the same port for passive mode connections, or the client is configured to always use the same port for active mode connections, although in this case usually the software in question should raise a different error first, but I've seen this happen.&lt;/li&gt; &lt;li&gt;In passive mode, the firewall in front of the FTP server doesn't have the correct ports open.  So the server tells the client to connect to ipaddress 1.2.3.4 on port x, but the firewall doesn't allow incoming connections on port x.  Most firewalls are smart enough to open up the port when it sees the PASV response.  Vice versa for active mode and the firewall in front of the FTP client.&lt;/li&gt;&lt;/ul&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b46b10bf-7075-4b9d-b0be-7b475f598949" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/FTP" rel="tag"&gt;FTP&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118880"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118880" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/118880.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/01/24/ftp-error-425-quotcant-open-data-connection.quot.aspx</guid>
            <pubDate>Thu, 24 Jan 2008 21:11:22 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/118880.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/01/24/ftp-error-425-quotcant-open-data-connection.quot.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/118880.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/118880.aspx</trackback:ping>
        </item>
        <item>
            <title>Step Up Your E-Commerce Transactions: Get Better Rates and Prevent Fraud</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/01/15/step-up-your-e-commerce-transactions-get-better-rates-and-prevent.aspx</link>
            <description>&lt;p&gt;Online merchants - by taking advantage of available cardholder authentication services on your e-commerce transactions, you can get improved rates, prevent fraud, and even get charge-back protection so that if a fraud related charge-back does occur - you may not be financially responsible*.  &lt;/p&gt;
&lt;p&gt;The cardholder authentication services I'm talking about?  Verified By Visa, MasterCard SecureCode, and JCB J/Secure.  All of these services are built on Visa's 3-D Secure protocol.  &lt;/p&gt;
&lt;p&gt;For more in formation about how 3-D Secure works, check out this &lt;a href="http://www.nsoftware.com/kb/tutorials/3dsecure.aspx"&gt;3-D Secure tutorial&lt;/a&gt;, and if you have any questions about the process, feel free to leave a comment here or contact me through this blog. The tutorial walks through the entire 3-D Secure process, and shows how you can add 3-D Secure functionality to your own web application (the demo uses .Net, but the same procedures apply in Java and C++ as well).  The tutorial makes use of /n software's &lt;a href="http://www.nsoftware.com/products/3dsecure/"&gt;3-D Secure MPI&lt;/a&gt; product, which has been certified Verified by Visa since 2002:  &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The 3-D Secure component allows easy integration of Verified By Visa, SecureCode, &amp;amp; J/Secure capabilities into online shopping carts, websites, and merchant systems, while providing extraordinary flexibility to software developers through easy to use component interfaces.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Previously, only the ASP Edition of /n software's 3-D Secure MPI product was available, but now the .NET, Java, C++, C++ Builder, and Delphi editions have also been made available!&lt;/p&gt;
&lt;p&gt;* If you use Verified By Visa.  &lt;a href="http://usa.visa.com/merchants/risk_management/vbv.html"&gt;According to Visa&lt;/a&gt;, "Merchants who use Verified by Visa are protected from fraud-related chargebacks on all personal Visa cards—credit or debit, domestic, or international—whether or not the issuer or cardholder is participating in Verified by Visa, with limited exceptions."&lt;/p&gt;
&lt;p&gt;More info:  check out this &lt;a href="http://www.nsoftware.com/kb/tutorials/3dsecure.aspx"&gt;3-D Secure tutorial&lt;/a&gt;&lt;/p&gt;
&lt;div style="margin: 0px; padding: 0px; display: inline;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:072a61ff-35e9-4059-a7e2-8ecb56944d2f" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/3-D%20Secure"&gt;3-D Secure&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Verified%20By%20Visa"&gt;Verified By Visa&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/MasterCard%20SecureCode"&gt;MasterCard SecureCode&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/JCB%20J/Secure"&gt;JCB J/Secure&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/E-Commerce"&gt;E-Commerce&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118582"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118582" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/118582.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/01/15/step-up-your-e-commerce-transactions-get-better-rates-and-prevent.aspx</guid>
            <pubDate>Tue, 15 Jan 2008 20:21:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/118582.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/01/15/step-up-your-e-commerce-transactions-get-better-rates-and-prevent.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/118582.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/118582.aspx</trackback:ping>
        </item>
        <item>
            <title>IP*Works! SSL v8 and IP*Works! SSH v8 released!</title>
            <link>http://geekswithblogs.net/Lance/archive/2008/01/04/ipworks-ssl-v8-and-ipworks-ssh-v8-released.aspx</link>
            <description>&lt;p&gt;Following the release of &lt;a href="http://geekswithblogs.net/Lance/archive/2007/10/03/Rock-on--IPWorks-v8-Released.aspx"&gt;IP*Works! v8&lt;/a&gt; last October, /n software announced to release of &lt;a href="http://www.nsoftware.com/ipworks/v8/ssl.aspx"&gt;IP*Works SSL v8&lt;/a&gt; and &lt;a href="http://www.nsoftware.com/ipworks/v8/ssh.aspx"&gt;IP*Works SSH v8&lt;/a&gt; (.Net and Java Editions) just before Christmas!&lt;/p&gt; &lt;p&gt;Keep up with other /n software releases by following the official &lt;a href="http://www.nsoftware.com/rss/"&gt;RSS feed&lt;/a&gt;.&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2c2e079f-db65-4c34-aa28-71eb7878ae64" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/IPWorks" rel="tag"&gt;IPWorks&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SSL" rel="tag"&gt;SSL&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SSH" rel="tag"&gt;SSH&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118244"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118244" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Lance/aggbug/118244.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Lance Robinson</dc:creator>
            <guid>http://geekswithblogs.net/Lance/archive/2008/01/04/ipworks-ssl-v8-and-ipworks-ssh-v8-released.aspx</guid>
            <pubDate>Fri, 04 Jan 2008 15:27:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Lance/comments/118244.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Lance/archive/2008/01/04/ipworks-ssl-v8-and-ipworks-ssh-v8-released.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Lance/comments/commentRss/118244.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Lance/services/trackbacks/118244.aspx</trackback:ping>
        </item>
    </channel>
</rss>