<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Catalyst Development &#187; .NET Framework</title>
	<atom:link href="http://blog.catalyst.com/archives/category/net-framework/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.catalyst.com</link>
	<description>Applications, Components and Libraries For Software Developers</description>
	<lastBuildDate>Fri, 18 Nov 2011 21:34:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Visual Studio 2010 Released</title>
		<link>http://blog.catalyst.com/archives/75</link>
		<comments>http://blog.catalyst.com/archives/75#comments</comments>
		<pubDate>Wed, 14 Apr 2010 18:41:20 +0000</pubDate>
		<dc:creator>Catalyst</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Visual C#]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.catalyst.com/?p=75</guid>
		<description><![CDATA[Microsoft has released Visual Studio 2010, which includes a new IDE, new language features and a new version of the .NET Framework. We&#8217;ve updated the current versions of our SocketTools .NET family of products to include assemblies that target version 4.0 of the .NET Framework. We also have some additional information about SocketTools compatibility with [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has released Visual Studio 2010, which includes a new IDE, new language features and a new version of the .NET Framework. We&#8217;ve updated the current versions of our SocketTools .NET family of products to include assemblies that target version 4.0 of the .NET Framework. We also have some additional information about <a href="http://go.catalyst.com/vs2010">SocketTools compatibility</a> with Visual Studio 2010 on our website.<span id="more-75"></span></p>
<p>For Visual Basic programmers, the new version of Visual Studio includes some nice features such as implicit line continuation (no more underscore characters to continue lines), auto-implemented class properties, collection initializers and lambda expressions (essentially functions within functions). On the C# side of things, they&#8217;ve added support for late binding to dynamic types, and improved interoperability with COM objects. This is a real benefit to C# developers who need to make extensive use of the Office automation APIs, since these changes make it significantly easier to work with.  For the most part, the language changes make it easier to do more with less code, and brings VB and C# into parity with one another in terms of language features and overall functionality. Microsoft decided to merge the VB and C# language teams together, ensuring that both languages are &#8220;first class citizens&#8221; in the .NET universe.</p>
<p>For those who are interested in working with Visual Studio 2010, here&#8217;s some useful links:</p>
<ul>
<li><a target="_blank" href="http://www.microsoft.com/express/Windows/">Visual Studio 2010 Express Editions</a></li>
<li><a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=26bae65f-b0df-4081-ae6e-1d828993d4d0">Visual Studio 2010 Professional</a></li>
<li><a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992">.NET Framework 4 Installer</a></li>
<li><a target="_blank" href="http://visualstudiogallery.msdn.microsoft.com/en-us/4af86641-a302-4edf-9853-007bcc670b30">Visual Studio 2010 Help Keyword Index</a></li>
<li><a target="_blank" href="http://visualstudiogallery.msdn.microsoft.com/en-us/60a86afe-159b-4940-a22f-4fef055cbd63">Help Viewer Power Tool</a></li>
</ul>
<p>Visual Studio 2010 Professional can be installed as a 30-day trial and you can get an additional 60-day extension, if necessary. The Express Editions are free, of course, but are more limited. New projects build with VS2010 will target the .NET 4 Framework, so your end-users would need to have that  installed. You could either have them install it using the web installer I linked above, or you could have your own installation program pre-install the framework.</p>
<p>The link to the keyword index addon is something that addresses the one significant negative in VS2010, which is the new help system that they&#8217;re using. It lacks an index, and the searching functionality leaves a lot to be desired (for example, there&#8217;s no ability to filter search results). This addon adds a panel that provides an index that integrates directly into the IDE, and is really something that should have been included with the product. One caveat is that this addon won&#8217;t work with the Express editions because they don&#8217;t support tool extensions. The Help Viewer power tool allows you to configure the VIsual Studio 2010 help to use a standalone viewer, rather than your browser. Keep in mind that if you want to make full use of the Help Viewer power tool, make sure that you install all of the Visual Studio documentation locally.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.catalyst.com/archives/75/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Command Execution</title>
		<link>http://blog.catalyst.com/archives/36</link>
		<comments>http://blog.catalyst.com/archives/36#comments</comments>
		<pubDate>Wed, 12 Aug 2009 20:50:22 +0000</pubDate>
		<dc:creator>Catalyst</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[SocketTips]]></category>
		<category><![CDATA[Visual Basic]]></category>

		<guid isPermaLink="false">http://blog.catalyst.com/?p=36</guid>
		<description><![CDATA[When people think of the Secure Shell (SSH) protocol, interactive terminal sessions and secure file transfers are typically what to come to mind. In addition to these common functions, SSH also supports securely executing a command on a remote host and returning the output of that command back to the local system. The SSH component [...]]]></description>
			<content:encoded><![CDATA[<p>When people think of the Secure Shell (SSH) protocol, interactive terminal sessions and secure file transfers are typically what to come to mind. In addition to these common functions, SSH also supports securely executing a command on a remote host and returning the output of that command back to the local system. The SSH component that is included with the SocketTools Secure Editions enables you to take advantage of this functionality through a single method call named Execute.<span id="more-36"></span></p>
<p>For example, in Visual Basic the code could look like this:</p>
<pre>
  SecureShell.HostName = "remote.server.net"
  SecureShell.UserName = "username"
  SecureShell.Password = "password"

  Dim strResult = SecureShell.Execute("/bin/ps -ef")
  If strResult.Length = 0 And SecureShell.LastError > 0 Then
      MessageBox.Show(SecureShell.LastErrorString)
      Exit Sub
  End If

  TextBox1.Text = strResult
</pre>
<p>In this example, the typical property values are set for the SSH server domain name or IP address, the user name and password required to authenticate the session. The Execute method is then called, providing the command to execute as a parameter, and the output from the command will be returned to a string value. In this case, we&#8217;re connecting to a UNIX based system and listing all of the running processes using the /bin/ps command.</p>
<p>If an error occurs, then the return value will be an empty string and the LastError property will be set to a value which identifies the error condition. In this case, we simply display a message box that shows a human-readable description of the last error code and then exit the subroutine.</p>
<p>As with an interactive terminal session, the entire operation is encrypted over the network, including the command that is sent and the output that it returns. For this reason, using SSH is preferred over the old rexec protocol which would send both the user credentials and the command as plain text. If you&#8217;re currently using the Remote Command class in your applications, it&#8217;s recommended that you consider rewriting your code to use the SSH component as a secure alternative.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.catalyst.com/archives/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InternetServer Class For SocketTools .NET</title>
		<link>http://blog.catalyst.com/archives/32</link>
		<comments>http://blog.catalyst.com/archives/32#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:44:15 +0000</pubDate>
		<dc:creator>Catalyst</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[SocketTips]]></category>
		<category><![CDATA[SocketTools]]></category>

		<guid isPermaLink="false">http://blog.catalyst.com/archives/32</guid>
		<description><![CDATA[The SocketTools 6.0 .NET Edition introduced the new InternetServer class that was designed to simplify the implementation of a TCP/IP server application. With only a few lines of code, you can create the framework for a multi-threaded server that is completely event driven. You only need to create event handlers and then write your server [...]]]></description>
			<content:encoded><![CDATA[<p>The SocketTools 6.0 .NET Edition introduced the new InternetServer class that was designed to simplify the implementation of a TCP/IP server application. With only a few lines of code, you can create the framework for a multi-threaded server that is completely event driven. You only need to create event handlers and then write your server code to respond to those network events.<span id="more-32"></span></p>
<p>Although the class makes developing server applications significantly easier, there are a few important things to keep in mind when using this class:</p>
<p>Although the code that you&#8217;ll write will look like typical single-threaded code that responds to events, it&#8217;s actually a multi-threaded application, with each client session isolated in its own thread. When network events are raised, they are being raised within the context of the thread that&#8217;s generated them. For example, this means that when the OnRead event fires, it&#8217;s not firing within the thread that created that instance of the InternetServer class (e.g.: the main UI thread). Any code that you have inside that event handler is executing in the context of the thread that&#8217;s managing that specific client session.</p>
<p>Because network events are being raised in the context of the client session threads, this means you cannot update user interface controls directly from within the event handlers. .NET does not allow one thread to modify a control that was created in another thread (usually the main UI thread). This is an absolute rule, and if you break it, your program is either going to hang or throw an exception. If you want to change any property values or call methods in a control, you need to create a delegate and marshal the call to the UI thread to using the Invoke method. Both the VB.NET and C# examples show how to do this; in the example, it&#8217;s used to update a ListBox control. Frequently updating the user interface from within an event handler can have a very negative impact on the overall performance of your program. Marshalling calls across threads to those UI controls is an expensive operation, and while you&#8217;re doing it, you&#8217;re not servicing network events like OnRead. You should keep it to a minimum, only updating the UI when absolutely necessary.</p>
<p>Another important consideration is that you should never modify shared objects without first synchronizing access to that object. In VB.NET it&#8217;s typically done using the SyncLock statement; in C# it&#8217;s done using the lock statement. The VB.NET and C# examples show to do this using a shared instance of a Hashtable class which is used to keep track of the number of bytes echoed by the server. While our lower-level API provides thread-safe queuing functions (InetServerEnqueue, InetServerDequeue, etc.) this doesn&#8217;t exist in the .NET class, largely because it would be redundant. If you want to use a queue, then you use the .NET Queue class, but the same rule applies; make sure that you synchronize access to the queue. While the InternetServer class does have Lock and Unlock methods, you should never use it for general purpose synchronization in your program. Calling the Lock method will cause every single client thread to block, and so while using Lock and Unlock would seem to be the easiest approach, it&#8217;s not a good idea for performance reasons.</p>
<p>The InternetServer class provides two general forms of many methods which are used to exchange data with the clients, ones which requires a handle to the client socket, and ones that do not. It&#8217;s not required that you specify a client handle if your code is inside an event handler (or in a function that&#8217;s being called by an event handler); the class knows which client raised the event and calls to Read and Write will work with that client (referred to as the &#8220;current client&#8221; in the documentation). However, if you want to exchange data with a client outside of an event handler, or with a client other than the current client, then you must specify a handle. Also, certain properties only return meaningful results from within an event handler. For example, the ClientAddress property (which returns the IP address of the client) should only be referenced from within an event handler such as OnConnect. The documentation notes when a property or method should only be used inside an event handler.</p>
<p>Finally, while it is possible to exchange data in an event handler with a client other than the one that generated the event, it&#8217;s not recommended. This is a case where you should use the Lock method to ensure that you&#8217;re the only thread that is attempting to read or write on that socket at the time. Two threads that attempt to read or write data on the same socket has undefined results; there&#8217;s no guarantee which thread would &#8220;get there first&#8221;, and the end result can be really unpredictable behavior by your program. One way to think about this is to think of your server program as a house, with each client connection being a room inside that house. You can do pretty much anything you want inside your own room (from within the event handler code that you write). However, if you want to go into another room and start rearranging the furniture, you need to make sure that every other thread is locked out while you do that. When you&#8217;re done and back in your own room, then you unlock the server and continue on.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.catalyst.com/archives/32/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Transfer .NET and Internet Mail .NET</title>
		<link>http://blog.catalyst.com/archives/21</link>
		<comments>http://blog.catalyst.com/archives/21#comments</comments>
		<pubDate>Wed, 24 Oct 2007 17:18:51 +0000</pubDate>
		<dc:creator>Catalyst</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[SocketTools]]></category>

		<guid isPermaLink="false">http://blog.catalyst.com/archives/21</guid>
		<description><![CDATA[If you are working with the .NET Framework and need to incorporate file transfer or e-mail functionality in your software, the new File Transfer .NET and Internet Mail .NET components can enable you to add those features quickly and easily, with a minimum of coding and virtually no learning curve. These managed code classes are [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working with the .NET Framework and need to incorporate file transfer or e-mail functionality in your software, the new File Transfer .NET and Internet Mail .NET components can enable you to add those features quickly and easily, with a minimum of coding and virtually no learning curve. These managed code classes are similar to what is offered in our larger SocketTools .NET product, but with a streamlined interface that is designed specifically for developers who want a single interface that is easy to use and understand. Both components also support secure connections using the standard SSL and TLS security protocols, and as with all of our components, are licensed without redistribution limitations, royalties or runtime licensing fees. If you have an active SocketTools Subscription license, then these new components are available to you free as part of the current update to your subscription download.<span id="more-21"></span></p>
<p><a href="http://www.catalyst.com/products/filetransfer/dotnet.html">Catalyst File Transfer .NET</a><br />
The File Transfer .NET component is a managed code class designed to simplify the process of uploading and downloading files from within your application. The class supports both the File Transfer Protocol (FTP) and Hypertext Transfer Protocol (HTTP), providing a seamless interface that is both easy to understand and implement in your own software. In addition to basic file transfer functionality, the class also supports remote file management features, such as the ability to list available files, rename files and move folders.</p>
<p>The File Transfer .NET class also supports secure connections using the standard SSL and TLS protocols, providing strong encryption and support for the latest security features. If you are already familiar with the ActiveX version of this component, you&#8217;ll find that it has an exceptionally low learning curve, with an interface that is similar enough to make the transition to the .NET platform as simple as possible.</p>
<p><a href="http://www.catalyst.com/products/internetmail/dotnet.html">Catalyst Internet Mail .NET</a><br />
The Internet Mail .NET component is a managed code class that provides a comprehensive interface for sending, downloading and managing e-mail messages on a mail server. This single component supports both the Post Office Protocol (POP3) and Internet Message Access Protocol (IMAP4) for accessing e-mail messages on a server, managing them remotely and downloading them to the local system. It also supports the Simple Mail Transfer Protocol (SMTP) for submitting e-mail messages for delivery, either directly to the recipient, or routed through a relay server.</p>
<p>In addition to the Internet protocols supported, the class also provides an interface that makes it easy to compose, parse and modify e-mail messages. Attaching files to messages or creating styled messages with HTML formatting is simple to do, typically requiring only a line or two of code. The Internet Mail .NET class also supports secure connections to the mail server using the standard SSL and TLS protocols, ensuring that the mail that you send or receive is encrypted. If you have used the Internet Mail ActiveX control, then you&#8217;ll find the .NET class to be extremely easy to use, with an interface that is similar enough to minimize the transition to the .NET platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.catalyst.com/archives/21/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

