<feed version="0.3" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://purl.org/atom/ns#" xml:lang="en-US"><title>Welcome to my WebLog</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/default.aspx" /><tagline type="text/html">The virtual home of Alon Fliess </tagline><id>http://dotnetjunkies.com/WebLog/alon/default.aspx</id><author><url>http://dotnetjunkies.com/WebLog/alon/default.aspx</url></author><generator url="http://communityserver.org" version="1.0.1.50214">Community Server</generator><modified>2004-06-08T17:52:00Z</modified><entry><title>A new localized Blog</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2006/04/23/137100.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:137100</id><created>2006-04-23T09:17:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have opened a new Blog at : &lt;A href="http://blogs.microsoft.co.il/blogs/alon/"&gt;http://blogs.microsoft.co.il/blogs/alon/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This blog is for the .Net &lt;SPAN&gt;community &lt;/SPAN&gt;in Israel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=137100" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=137100</wfw:commentRss></entry><entry><title>.Net runs my house!!!</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2005/06/08/114662.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:114662</id><created>2005-06-08T23:21:00Z</created><content type="text/html" mode="escaped">&lt;P dir=ltr&gt;I have just finished my (first version of a) .Net compact framework based remote control client for my intelligent home electrical system. I developed the software using the beta version of VS 2005. I am using C++/CLI for the server side and C# on my IPaq. I am using Web Services over WiFi. Just look at the picture: (Yes it is localized :)&lt;/P&gt;
&lt;P dir=ltr&gt;&amp;nbsp;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr align=center&gt;&lt;IMG id=ViewPicture.ascx_GalleryImage style="BORDER-RIGHT: black 2px solid; BORDER-TOP: black 2px solid; BORDER-LEFT: black 2px solid; WIDTH: 292px; BORDER-BOTTOM: black 2px solid; HEIGHT: 480px" alt="" src="/WebLog/images/dotnetjunkies_com/alon/2503/r_Int_Ipaq.gif"&gt;&lt;/P&gt;
&lt;P dir=ltr align=center&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://dotnetjunkies.com/WebLog/alon/gallery/image/1286.aspx"&gt;&lt;/A&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;I may write soon an article about, the architecture and implementation of this cute piece of software and technology. &lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=114662" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=114662</wfw:commentRss></entry><entry><title>C++/CLI "initonly" and "literal" vs native C++ "const" and "static const"</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2005/04/14/65799.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:65799</id><created>2005-04-14T22:03:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;You know, sometime if you write the right question right, you get the answer right away.&lt;/P&gt;
&lt;P&gt;I am reading the new C++/CLI &lt;A href="http://www.plumhall.com/C++-CLI%20draft%201.10.pdf"&gt;draft &lt;/A&gt;(&lt;A href="http://www.plumhall.com/C++-CLI%20draft%201.10.pdf" target=_top&gt;http://www.plumhall.com/C++-CLI%20draft%201.10.pdf&lt;/A&gt;) and I wonder why they had to invent two new keywords, the "literal" and the "initonly". &lt;/P&gt;
&lt;P&gt;"literal"&amp;nbsp;is like the C# "const" while "initonly" is like the C# readonly. In ISO C++, there is the global or static const for literal and const (in member declaration) for "initonly". So I asked: why not using "static const type var;"? And I see the answer, "static const type var" is it a literal (native C++) or "initonly" static class member (C++/CLI)? &lt;/P&gt;
&lt;P&gt;They had to come with new keywords, just to distinguish the case of "initonly" and "literal" for static members of a class. Of course the emitted IL uses the CLI (CLR) semantic of &amp;#8220;literal&amp;#8221; and &amp;#8220;initonly&amp;#8220;, so there are some other restrictions then the C++ &amp;#8220;const&amp;#8220; keyword, such as the ability to change the value of an &amp;#8220;initonly&amp;#8220; member in the body of the constructor, and some restrictions of the types that you may use for the &amp;#8220;literal&amp;#8220; declaration. There is another (good one) restriction for the &amp;#8220;initonly&amp;#8220;, you can not cast the const away.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=65799" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=65799</wfw:commentRss></entry><entry><title>Implementing Policies in .Net (Another Template vs. Generic Episode)</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2005/04/07/62711.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:62711</id><created>2005-04-07T00:44:00Z</created><content type="text/html" mode="escaped">&lt;P dir=ltr align=justify&gt;I just wrote an &lt;A href="http://dotnetjunkies.com/WebLog/alon/articles/62710.aspx"&gt;article&lt;/A&gt; about the need for static class interface, and why C++/CLI is (almost) the only language that (will) support compile-time polymorphism. If you are familiar with the GOF Strategy pattern, you know that it lets you change an algorithm without breaking the Open/Closed principle (OCP).&amp;nbsp; A Policy is like Strategy, but instead of runtime late-binding polymorphism, it uses compile-time polymorphism and the resulting code is a hard coded call to the specific policy implementation. Read the article to find out how to implement Policy in C# and in C++/CLI and why a static class interface is a must.
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=62711" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=62711</wfw:commentRss></entry><entry><title>Controlling Output cache</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2005/02/20/55676.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:55676</id><created>2005-02-20T12:59:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;I have heard a lecture of David Platt about ASP.Net 2.0 that was held as part of the &lt;A href="http://www.microsoft.com/emea/msdn/aspontour/speakers.aspx"&gt;ASP.Net 2.0 tour&lt;/A&gt;. He talked about the new @SQLDependency directive that allows a Web Form cache to be invalidated according to a database table changes. At first this looked like a great cache policy improvement, but then many people in the audience have realized that it leads to coupling of the Presentation Layer with the DB layer as opposed to using the middle tier business logic layer. For example if I change the database schema, I have to go and change the SQLDependency tag on each and any page that uses it. Another issue that came up was whether the SQLDependency support other databases such as Oracle.&lt;/P&gt;
&lt;P&gt;The answer to all those questions is that the cache mechanism is capable to any custom policy even on ASP.Net 1.1, You just have to register a delegate to set your own policy:&lt;/P&gt;
&lt;P&gt;This example is extracted from the documentation:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;public void Page_Load()
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;{
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Response.Cache.AddValidationCallback(new HttpCacheValidateHandler(Validate), null&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;public void Validate(HttpContext context, Object data, ref HttpValidationStatus status) 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;{
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if (context.Request.QueryString["Valid"] == "false") 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;status = HttpValidationStatus.Invalid;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;else if (context.Request.QueryString["Valid"] == "ignore") 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;status = HttpValidationStatus.IgnoreThisRequest;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;else 
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;status = HttpValidationStatus.Valid;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;}
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So feel free to create your own cache policy.&lt;/P&gt;
&lt;P&gt;The only ability that I think that the ASP.Net @ directive is missing is the ability to add my own directives that will change the policy, something like:&lt;/P&gt;
&lt;P&gt;@MyDependency &amp;#8230;&lt;/P&gt;
&lt;P&gt;For example, they could let us create a custom attribute that we could put in the page &amp;lt;% %&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alon.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=55676" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=55676</wfw:commentRss></entry><entry><title>More XP SP2 Info for Web Developers</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/07/10/18801.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:18801</id><created>2004-07-10T23:54:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;This is an excellent document for changes in XP SP2 for Web developers.&lt;/P&gt;
&lt;P&gt;Pay attention to the last section (General Tips), it shows how to figure the browser version from client side script.&lt;/P&gt;
&lt;P&gt;The link: &lt;A href="http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp"&gt;http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;Note:&lt;/FONT&gt; This way of browser version detection did not work when I tries it on XP SP2 &lt;FONT color=#ff0000&gt;RC1&lt;/FONT&gt;. It worked well on RC2 installed machine.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=18801" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=18801</wfw:commentRss></entry><entry><title>Using Windows Firewall NetFwMgr from .NET application</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/07/06/18466.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:18466</id><created>2004-07-06T23:56:00Z</created><content type="text/html" mode="escaped">&lt;P dir=ltr&gt;There are two ways to use WF com object from .Net code:&lt;/P&gt;
&lt;UL type=disc&gt;
&lt;LI dir=ltr&gt;Create the NetFwMgr dynamically using class ID and Activator.CreateInstance()&lt;/LI&gt;
&lt;LI dir=ltr&gt;Use .Net interop assembly.&lt;/LI&gt;&lt;/UL&gt;
&lt;P dir=ltr&gt;I prefer the second method. It is easier to use and make me feel better.&lt;/P&gt;
&lt;P dir=ltr&gt;&amp;nbsp;The first method involves these two calls:&lt;/P&gt;
&lt;OL type=1&gt;
&lt;LI dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;NetFwMgrType = Type.GetTypeFromCLSID(&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; Guid(&lt;FONT color=#ff0000&gt;"{304CE942-6E39-40D8-943A-B913C40C9CD4}"&lt;/FONT&gt;));&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color=#008000&gt;//Create an instance of the object&lt;/FONT&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;NetFwMgrObject = Activator.CreateInstance(NetFwMgrType);&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;The second method looks like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;1.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;B&gt;&lt;SPAN&gt;NetFwPublicTypeLib;&lt;/SPAN&gt;&lt;/B&gt;&lt;B&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;2.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN&gt;&lt;FONT color=#008000&gt;//Get the FW Manager &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;3.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;NetFwMgr mgr = &lt;SPAN&gt;&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt;&lt;/SPAN&gt; NetFwMgrClass(); &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;4.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color=#008000&gt;//create new application object &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;5.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;NetFwAuthorizedApplication app = &lt;SPAN&gt;&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;NetFwAuthorizedApplicationClass(); &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;6.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;app.Name = &lt;FONT color=#ff0000&gt;"CalcServiceHost"&lt;/FONT&gt;; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;7.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;app.Enabled = &lt;SPAN&gt;&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;/SPAN&gt;; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN lang=PT-BR&gt;&lt;SPAN&gt;8.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN lang=PT-BR&gt;app.ProcessImageFileName = @&lt;FONT color=#ff0000&gt;"C:\...\CalcServerHost.exe"&lt;/FONT&gt;; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN lang=PT-BR&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;9.&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;app.RemoteAddresses = &lt;FONT color=#ff0000&gt;"192.168.0.142"&lt;/FONT&gt;; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;10.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;app.Scope = NET_FW_SCOPE_.NET_FW_SCOPE_LOCAL_SUBNET; &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;11.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color=#008000&gt;//add application &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;SPAN&gt;&lt;SPAN&gt;12.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;mgr.LocalPolicy.CurrentProfile.AuthorizedApplications.Add&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN dir=ltr&gt;&lt;B&gt;&lt;SPAN&gt;(app); &lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&amp;nbsp;
&lt;P dir=ltr&gt;The only problem with the second method is that we have to add a reference to a type library which does not exist. Here comes the trick:
&lt;P dir=ltr&gt;Use the MIDL compiler on the idl file of the NetFwMgr that resides in the include directory that you have installed with the XP SP2 Platform SDK. This will create the type library that you can refer to (using tlbimp.exe or via visual studio).&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;gt;cd C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include\&lt;/FONT&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;gt;midl netfw.idl&lt;/FONT&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;Probably Microsoft will give us a PIA or something else to use the WF APIs from .NET app.&lt;/P&gt;
&lt;P dir=ltr&gt;You may use the same MIDL trick to use the new attachment services as well.&lt;/P&gt;
&lt;P dir=ltr&gt;For more Windows XP SP2 Links, refer to &lt;A href="http://dotnetjunkies.com/WebLog/alon/articles/18465.aspx"&gt;this &lt;/A&gt;article.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=18466" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=18466</wfw:commentRss></entry><entry><title>Yes, Yes, Yes BT GPRS Works</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/06/11/16275.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:16275</id><created>2004-06-11T21:20:00Z</created><content type="text/html" mode="escaped">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; unicode-bidi: embed; TEXT-ALIGN: left"&gt;I don't know what my last setting modification was, but now it works&amp;#8230;.&lt;BR&gt;Maybe an administrator at Orange has changed setting there, or I have changed something, but it works, and it is great!!!&lt;BR&gt;To be connected, anytime, anywhere, with my PDA and Laptop, Yes!&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; unicode-bidi: embed; TEXT-ALIGN: left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; unicode-bidi: embed; TEXT-ALIGN: left"&gt;Alon&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=16275" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=16275</wfw:commentRss></entry><entry><title>New mobile phone, new toy, new headache...</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/06/11/16253.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:16253</id><created>2004-06-11T18:37:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;My company decided to move to other cellular company. They have replaced all our phones. When they ask what kind of phone I'd like to have. I sad I did not care as long it will have a BT (Bluetooth) and a GPRS. I just wanted to connect my IPaq 5450 and my laptop to the internet. Guess what, BT is great, I synchronized the phone contacts with the IPaq and through the IPaq 802.11 I synchronized my desktop also as well as my laptop. The problems started when I tried to use the GPRS. I have searched the Internet, talked with the helpdesk at Orange, tried everything, and what I get is BT connected, Disconnected and an unknown error message in the IPaq that suggest me to Reboot the machine. After a day of trying I realized that there are three kinds of people in the world:&lt;BR&gt;1.&amp;nbsp;People like me that will do everything to make the technology work. They will search the Internet, They will try any settings, for example, they will not install Windows again, but will find how to fix the problem (even if it'll take more time then reinstalling) &lt;BR&gt;2.&amp;nbsp;Those that don't care about great new technology or they give up and save them self the headache.&lt;BR&gt;3.&amp;nbsp;Those that do want the new features and they in position to ask someone else (or they don't care to spend the money) to setup every thing for them.&lt;/P&gt;
&lt;P&gt;And then I realized that all those company managers, owners and other very rich people are from the third group, and this is why we have to spend days and nights to make some new piece of technology in the right setup.&lt;BR&gt;So, it someone can tell me how to set a BT GPRS between Nokia 6310i and IPaq 5450 PPC 2003, I will very appreciate it.&lt;BR&gt;Thanks&lt;BR&gt;Alon.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=16253" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=16253</wfw:commentRss></entry><entry><title>Time for SAB</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/06/09/15892.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:15892</id><created>2004-06-09T06:53:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;Yes, It's time for SAB - &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;S&lt;/FONT&gt;&lt;/STRONG&gt;cripting &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;A&lt;/FONT&gt;&lt;/STRONG&gt;pplication &lt;STRONG&gt;&lt;FONT color=#ff0000&gt;B&lt;/FONT&gt;&lt;/STRONG&gt;lock&lt;/P&gt;
&lt;P&gt;If there is no support to VSA and we don't know anything about it's replacement. We should create SAB...&lt;/P&gt;
&lt;P&gt;What do you think?&lt;/P&gt;
&lt;P&gt;Alon&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=15892" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=15892</wfw:commentRss></entry><entry><title>To VSA or not VSA - This is the question...</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/06/08/15852.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:15852</id><created>2004-06-08T21:44:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT color=#ff0000 size=4&gt;&lt;STRONG&gt;Hello World&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I thought that it will take me a while before I'll post a new remark, but I have to share this with you. I spend most of the day by searching, learning and deciding how to add scripting capabilities to a .NET project. I have found three main ways to do it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The obvious way &amp;#8211; use .NET scripting technology, VSA: &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting06112001.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting06112001.asp&lt;/A&gt; 
&lt;LI&gt;DIY &amp;#8211; use reflection, CodeDom and such to create your own plug-in and scripting capabilities: &lt;A href="http://www.divil.co.uk/net/articles/plugins/scripting.asp"&gt;http://www.divil.co.uk/net/articles/plugins/scripting.asp&lt;/A&gt; 
&lt;LI&gt;Use the good old VBScript technology &amp;#8211; a great article from Roy Oshorove: &lt;A href="http://weblogs.asp.net/rosherove/articles/dotnetscripting.aspx"&gt;http://weblogs.asp.net/rosherove/articles/dotnetscripting.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;With all my respect to Roy (and I do have) my customer wants to use .NET technology. Actually I have told him about VSA and he liked it. However after chasing all day for more information about VSA and try to find the VSA SDK (I even registered &amp;amp; downloaded the VSIP with hope that VSA SDK is hiding there&amp;#8230;) I have found this response (&lt;A href="http://www.dotnet247.com/247reference/msgs/38/194372.aspx"&gt;http://www.dotnet247.com/247reference/msgs/38/194372.aspx&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"&gt;"At this time we are not accepting new evaluations for VSA although we will&lt;BR&gt;continue to support customers already in the program. We are evaluating&lt;BR&gt;alternatives for the next version of VSA. In the meantime, we recommend one&lt;BR&gt;of two approaches. If you are looking just for runtime customization and you&lt;BR&gt;don't need an IDE you should use the &lt;A href="http://www.dotnet247.com/247reference/System/CodeDom/Compiler/ICodeCompiler.aspx"&gt;ICodeCompiler&lt;/A&gt; interfaces in the .NET&lt;BR&gt;Framework. If you need an IDE you should investigate integrating into Visual&lt;BR&gt;Studio via the Visual Studio Industry Partner Program&lt;BR&gt;(&lt;A href="http://www.dotnet247.com/247reference/a.aspx?u=http://www.vsipdev.com/" target=_blank&gt;http://www.vsipdev.com/&lt;/A&gt;). We recently announced new levels of VSIP,&lt;BR&gt;including free access to the VSIP SDK. Integrating into Visual Studio via&lt;BR&gt;VSIP offers a more complete solution than VSA, offering WinForms and C#&lt;BR&gt;support for example, neither of which is supplied by VSA. We appreciate your&lt;BR&gt;patience and understanding as we work on our future direction. We look&lt;BR&gt;forward to sharing more information with you as it becomes available".&lt;BR&gt;&lt;BR&gt;Hope this helps&lt;BR&gt;&lt;BR&gt;Mark&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If anyone knows anything about the replacement of VSA, I will be glad to know. Also there should be some &lt;B&gt;&lt;U&gt;official&lt;/U&gt;&lt;/B&gt; guide from Microsoft telling what to do until their next .NET scripting technology. Unless I missed something they should have a page that announce the current state of VSA (It is not reasonable to search the Web for an answer)&lt;/P&gt;
&lt;P&gt;Usually when I do software architecture for a new project, I try to choose the current technology that will be promote using an easy path to a newer technology in the future. For example Microsoft tells you today not to use Remoting internals (custom sinks, etc.) if you want an easy upgrade path to Indigo. Actually the best way to be prepared to Indigo is by using Enterprise Services. The same idea goes with scripting capabilities. I can create my own custom interfaces and use CodeDom and reflection, but I really don't know how much work I'll have to do when a new scripting technology will be available. At least they should give some whitepapers, please.&lt;/P&gt;
&lt;P&gt;Alon.&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=15852" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=15852</wfw:commentRss></entry><entry><title>Hello</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/alon/archive/2004/06/08/15818.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:15818</id><created>2004-06-08T17:52:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT color=#ff0000 size=5&gt;&lt;STRONG&gt;Web Log!!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=justify&gt;It's a history for me, this is my first post to my first Blog. It's amazing how people find new&amp;nbsp;application types for the Internet. We thought that we have everything we need. Mail for asynchronous messaging, Web for static, and or application front-end, FTP for file transfer, Messenger &amp;amp; ICQ for instance messaging (synchronous).&lt;/P&gt;
&lt;P align=justify&gt;But, now this, a Web Log: A way to tell the world what you think about it, and to get feedbacks from the world. You may think about it as a combination of all those other applications and in a way it is, and this what makes it so great.&lt;/P&gt;
&lt;P align=justify&gt;So, my name is Alon Fliess and I am a Chief Technology Officer in a company named Sela &amp;#8211; Software &amp;amp; Education Labs. In my everyday life I spend my time doing everything regarding to software and especially Microsoft technology based solutions. I like to see myself as a software architect (part of my job), but I am also teach, and consult other software engineers.&lt;/P&gt;
&lt;P align=justify&gt;In my new Blog I will try to share with you my insight about many of the issues I run into every day. I will also try to ask you, the smart audience, what you think about those issues (This is the idea of Blog, isn't it?)&lt;/P&gt;
&lt;P&gt;Until my next post&lt;/P&gt;
&lt;P&gt;Bye&lt;/P&gt;
&lt;P&gt;Alon&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=15818" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://dotnetjunkies.com/WebLog/alon/commentrss.aspx?PostID=15818</wfw:commentRss></entry></feed>