tag:blogger.com,1999:blog-21305239575940336712024-02-19T17:24:27.562-08:00Bina Web BlogBina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.comBlogger42125tag:blogger.com,1999:blog-2130523957594033671.post-77313998340585328342009-01-14T00:39:00.000-08:002009-01-14T00:45:35.668-08:00ASP.NET 3.5 slides and examplesSlides from the open day<br /><a href="http://res.bna.co.il/DotNET/files/whatsnewasp3.5part1.ppt">Part 1</a><br /><a href="http://res.bna.co.il/DotNET/files/whatsnewasp3.5part2.ppt">Part 2</a><br /><br /><a href="http://res.bna.co.il/DotNET/files/asp3.5DEMO.zip">Examples</a><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-40641584150698405152007-12-23T11:54:00.000-08:002007-12-23T11:57:29.484-08:00C# vs. JavaI found <a href="http://www.25hoursaday.com/CsharpVsJava.html">this article</a> today,<br />Its a good comparison between C# and Java<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-6717030509913951622007-11-08T11:32:00.000-08:002008-07-07T10:48:23.160-07:00Embedded Linux introThe slides from the lecture today in elbit added to <a href="http://bina-soft.blogspot.com/2007/09/embedded-linux-examples.html">Embedded linux page</a><br /><br />most of the slides taken from the great site: <a href="http://www.free-electrons.com/">http://www.free-electrons.com</a><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-61938646083429124672007-10-22T12:04:00.000-07:002007-10-22T12:12:25.897-07:00WPF Example ApplicationsIn .NET 3.x microsoft added new options to create a web application with smart client abilities<br />you can see list of web application in this link : <a href="http://channel9.msdn.com/wiki/default.aspx/WPF.ApplicationPortfolio">http://channel9.msdn.com/wiki/default.aspx/WPF.ApplicationPortfolio</a><br /><br /><strong>Legend</strong>:<br />XBAP - XAML browser application (like java applets)<br />Application - click once deployment<br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-69421025238338454472007-10-18T09:55:00.000-07:002007-10-18T10:07:18.902-07:00.NET 3.x VideosTo get started with .NET 3.x , you can watch the video tutorials<br />some links:<br /><a href="http://windowsclient.net/learn/videos.aspx">http://windowsclient.net/learn/videos.aspx</a><br /><a href="http://movielibrary.lynda.com/html/modPage.asp?ID=359">http://movielibrary.lynda.com/html/modPage.asp?ID=359</a><br /><a href="http://www.contentpresenter.com/">http://www.contentpresenter.com/</a><br /><a href="http://www.microsoft.com/Expression/kc/resources.aspx?type=video">http://www.microsoft.com/Expression/kc/resources.aspx?type=video</a><br /><a href="http://www.bestechvideos.com/category/web-tech/wpf/">http://www.bestechvideos.com/category/web-tech/wpf/</a><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-7968831410063117872007-10-08T13:20:00.000-07:002007-10-08T13:26:29.075-07:00Linux Without installif you want to try linux without installation you have 2 options<br /><ol><li>Download and burn one of the Live CD distributions , boot from the cd and enjoy. for a list of live cd distributions <a href="http://www.livecdlist.com/?pick=All&sort=&showonly=desktop">click here</a></li><li>Download vmware image and try linux from vmware client. for a list of images <a href="http://www.thoughtpolice.co.uk/vmware/">click here</a></li></ol>for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-79503970584097174702007-10-05T05:07:00.000-07:002007-10-05T05:11:57.080-07:00Linux VixtaIf you can't choose between windows vista and Linux there is a solution: <a href="http://www.vixta.org">Vixta </a><br />Vixta is a linux distribution with exact look and feel as vista. Its based on kernel 2.6.23 and fedora distribution.<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-43314215706490766292007-10-05T03:37:00.000-07:002007-10-06T11:35:50.276-07:00C# in embedded systemsMost of the times developers uses C language to write embedded applications. If time is not an issue or its not critical you can easily use java or c#<br />Microsoft has now 3 platforms for embedded:<br /><ul><li>Windows XP embedded for large systems</li><li>Windows CE for small to medium systems</li><li>.NET micro framework for very small devices<br /></li></ul>to use C# and .NET you can use:<br /><ul><li>.NET framework in XP embedded</li><li>.NET compact framework for windows CE</li><li>.NET micro framework - native<br /></li></ul>.NET micro framework supported by some small devices such as <a href="http://www.dotnetcpus.com/default.aspx?id=90">this board</a><br /><br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-61106351955064080712007-10-05T02:32:00.000-07:002007-10-05T02:36:16.325-07:00Visual Studio 2008.NET framework 3.0/3.5 gives us a lot of new technologies such as:<br />WPF/WPFE<br />WCF<br />Workflow<br />....<br /><br />if you want to evaluate it without installation you can download a <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3B72271C-E996-4989-898D-72D684966CE6&displaylang=en">VPC image from here</a><br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-60502760090582515872007-10-02T08:17:00.000-07:002007-10-02T08:21:11.377-07:00CLI specificationsIf you want to know the exact standard of CLI or C# you can find it in this <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-335.pdf">pdf file</a><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-4401659293463246892007-09-29T21:55:00.000-07:002007-10-05T02:08:42.278-07:00OSK board tutorialThe embedded linux tutorial using the ARM starter kit is completed.<br />the <a href="http://bina-soft.blogspot.com/2007/09/embedded-linux-examples.html">Embedded linux</a> section is updated<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-27758092255799638282007-09-29T14:31:00.000-07:002007-09-29T14:52:00.997-07:00Embedded Linux - Loading The KernelNow we are ready to operate the board<br />we want to load the kernel inside the board flash memory and mount the file system in out host computer. this is very useful in the development process because the only thing we should do to download out application/driver to the target is to copy it from one directory to another on the host computer<br /><br />restart the device and press a key to get u-boot shell<br />the easiest way to load files from host to target is to use <span class="blsp-spelling-error" id="SPELLING_ERROR_0">tftp</span> server on the host.<br />start the <span class="blsp-spelling-error" id="SPELLING_ERROR_1">tftp</span> server and place the kernel image (<span class="blsp-spelling-error" id="SPELLING_ERROR_2">uImage</span>.cc) in the server directory<br /><br />on the target <span class="blsp-spelling-error" id="SPELLING_ERROR_3">uboot</span> shell:<br /><br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_4">setenv</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_5">serverip</span> [your <span class="blsp-spelling-error" id="SPELLING_ERROR_6">tftp</span> server <span class="blsp-spelling-error" id="SPELLING_ERROR_7">ip</span> address]<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_8">tftpboot</span> 0x10000000 <span class="blsp-spelling-error" id="SPELLING_ERROR_9">uImage</span>.cc<br />after this you will get a <span style="color:#ff0000;">number</span> in hex format - REMEMBER IT<br /><br />now we should erase the flash memory : (bank 8 to 20)<br /><br /># erase 1:8-20<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_10">cp</span>.b 0x10000000 0x100000 [the <span style="color:#ff0000;">number</span> above]<br /><br />now set the <span class="blsp-spelling-error" id="SPELLING_ERROR_11">bootargs</span> variable:<br /><br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_12">setenv</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_13">bootargs</span> console=<span class="blsp-spelling-error" id="SPELLING_ERROR_14">ttyS</span>0,115200n8 <span class="blsp-spelling-error" id="SPELLING_ERROR_15">noinitrd</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_16">ip</span>=${<span class="blsp-spelling-error" id="SPELLING_ERROR_17">OSK</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_18">IP</span>}:<br />${PC_<span class="blsp-spelling-error" id="SPELLING_ERROR_19">IP</span>}:${GATEWAY_<span class="blsp-spelling-error" id="SPELLING_ERROR_20">IP</span>}:${<span class="blsp-spelling-error" id="SPELLING_ERROR_21">NETMASK</span>}:<span class="blsp-spelling-error" id="SPELLING_ERROR_22">osk</span>:<span class="blsp-spelling-error" id="SPELLING_ERROR_23">eth</span>0:off root=<br />/<span class="blsp-spelling-error" id="SPELLING_ERROR_24">dev</span>/<span class="blsp-spelling-error" id="SPELLING_ERROR_25">nfs</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_26">rw</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_27">nfsroot</span>=${PC_<span class="blsp-spelling-error" id="SPELLING_ERROR_28">IP</span>}:/data/<span class="blsp-spelling-error" id="SPELLING_ERROR_29">rootfs</span>2.6,<span class="blsp-spelling-error" id="SPELLING_ERROR_30">nolock</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_31">mem</span>=32M<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_32">saveenv</span><br /><br />to test the board restart it or:<br /><br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_33">bootm</span> 0x100000<br /><br />after all the messages , you will get a prompt with the file system on the host<br /><br />now you can use the <span class="blsp-spelling-error" id="SPELLING_ERROR_34">toolchain</span> to build applications and drivers, copy the output files to the root <span class="blsp-spelling-error" id="SPELLING_ERROR_35">filesystem</span> directory and execute/load it from the target<br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/"><span class="blsp-spelling-error" id="SPELLING_ERROR_36">Bina</span></a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-55373865029803504712007-09-29T14:19:00.000-07:002007-09-30T13:52:05.777-07:00Embedded Linux - Root File SystemThe next step in to build a root file system.<br />there are many ways to do that. we are using <a href="http://www.busybox.net/"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">busybox</span> </a><br /><span class="blsp-spelling-error" id="SPELLING_ERROR_1">busybox</span> creates a single file that implements many tools from the file system<br />you can download it and configure it using "make <span class="blsp-spelling-error" id="SPELLING_ERROR_2">menuconfig</span>"<br />the only thing you should remember is to copy the .so files from the lib directory in your <span class="blsp-spelling-error" id="SPELLING_ERROR_3">toolchain</span> (usr/local/arm/3.4.1/arm-linux/lib) to the lib directory in the root file system<br /><br />for <span class="blsp-spelling-corrected" id="SPELLING_ERROR_4">already</span> made file system <a href="http://res.bna.co.il/blogstore/rootfsosk.tar.bz2">click here</a><br /><br />after creating the file system place it in a directory and update the file /etc/exports with access rights :<br /><br />/opt/<span class="blsp-spelling-error" id="SPELLING_ERROR_5">osk</span>/<span class="blsp-spelling-error" id="SPELLING_ERROR_6">rootfs</span>2.6 *(<span class="blsp-spelling-error" id="SPELLING_ERROR_7">rw</span>,no_root_squash)<br /><br />restart the <span class="blsp-spelling-error" id="SPELLING_ERROR_8">nfs</span> server<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/"><span class="blsp-spelling-error" id="SPELLING_ERROR_9">Bina</span></a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-64405118599382323742007-09-28T03:14:00.000-07:002007-09-30T13:52:45.443-07:00Embedded Linux - building the kernelThe next step is to build the kernel with our <span class="blsp-spelling-error" id="SPELLING_ERROR_0">toolchain</span><br />you should download the kernel source and a patch<br /><br />download kernel 2.6.20 (from <a href="http://www.kernel.org/">http://www.kernel.org/</a>)<br />download the board <a href="http://res.bna.co.il/blogstore/patch-2.6.20-omap1.bz2">kernel patch</a><br /><br />now follow this:<br /><br /># tar -<span class="blsp-spelling-error" id="SPELLING_ERROR_1">xjvf</span> ${DOWLOADDIR}/linux-${VERSION}.tar.bz2<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_2">cp</span> ${<span class="blsp-spelling-error" id="SPELLING_ERROR_3">DOWLOADDIR</span>}/patch-${VERSION}-<span class="blsp-spelling-error" id="SPELLING_ERROR_4">omap</span>1.<span class="blsp-spelling-error" id="SPELLING_ERROR_5">bz</span>2 .<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_6">bunzip</span>2 patch-${VERSION}-<span class="blsp-spelling-error" id="SPELLING_ERROR_7">omap</span>1.<span class="blsp-spelling-error" id="SPELLING_ERROR_8">bz</span>2<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_9">cd</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_10">linux</span>-${VERSION}/<br /># cat ../patch-${VERSION}-omap1 | patch -p1<br /><br /># make clean<br /># make <span class="blsp-spelling-error" id="SPELLING_ERROR_11">omap</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_12">osk</span>_5912_<span class="blsp-spelling-error" id="SPELLING_ERROR_13">defconfig</span><br /><br />make sure that the following options are set:<br /><span class="blsp-spelling-error" id="SPELLING_ERROR_14">CONFIG</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_15">NFS</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_16">FS</span>=y<br /><span class="blsp-spelling-error" id="SPELLING_ERROR_17">CONFIG</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_18">NFS</span>_V3=y<br /><span class="blsp-spelling-error" id="SPELLING_ERROR_19">CONFIG</span>_ROOT_<span class="blsp-spelling-error" id="SPELLING_ERROR_20">NFS</span>=y<br /><br /><br /># make<br /><br />now the kernel image is ready but we have to convert it to U-BOOT format<br /><br /># arm-<span class="blsp-spelling-error" id="SPELLING_ERROR_21">linux</span>-<span class="blsp-spelling-error" id="SPELLING_ERROR_22">objcopy</span> -O binary -R .note -R .comment S<br />arch/arm/boot/compressed/<span class="blsp-spelling-error" id="SPELLING_ERROR_23">vmlinux</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_24">linux</span>.bin<br /># <span class="blsp-spelling-error" id="SPELLING_ERROR_25">gzip</span> -9 <span class="blsp-spelling-error" id="SPELLING_ERROR_26">linux</span>.bin<br /># ${U-<span class="blsp-spelling-error" id="SPELLING_ERROR_27">BOOTDIR</span>}/tools/<span class="blsp-spelling-error" id="SPELLING_ERROR_28">mkimage</span> -A arm -O <span class="blsp-spelling-error" id="SPELLING_ERROR_29">linux</span> -T kernel -C <span class="blsp-spelling-error" id="SPELLING_ERROR_30">gzip</span> -a 0x10c08000 -e 0x10c08000 -n Linux Kernel Image -d linux.bin.gz <span class="blsp-spelling-error" id="SPELLING_ERROR_31">uImage</span>.cc<br /><br /><span class="blsp-spelling-error" id="SPELLING_ERROR_32">uImage</span>.cc is ready<br /><br />for <span class="blsp-spelling-corrected" id="SPELLING_ERROR_33">already</span> made <span class="blsp-spelling-error" id="SPELLING_ERROR_34">uImage</span>.cc <a href="http://res.bna.co.il/blogstore/uImage.cc">click here </a><br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/"><span class="blsp-spelling-error" id="SPELLING_ERROR_35">Bina</span></a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-41569633992857612202007-09-28T02:11:00.000-07:002007-09-28T02:55:41.797-07:00Embedded Linux - boot loaderThe next step in our osk system is to build and set the boot loader<br />the OSK board comes with already installed U-BOOT,<br />we can replace it but we don't need<br />we do need a tool: mkimage to convert the kernel image to U_BOOT format<br />to build the tool download <a href="http://res.bna.co.il/blogstore/u-boot-1.1.2.tar.bz2">U-BOOT source</a><br /><br /> do the following:<br /><br /># tar -xjvf ${DOWLOADDIR}/u-boot-1.1.2.tar.bz2<br /># cd u-boot-1.1.2<br /># make distclean<br /># make omap5912osk_config<br /># make tools<br /><br />you can also run make to create the binary image of u-boot boot loader so you can replace it on the board but we don't need it (future post)<br /><br />if you look inside the tools directory you will find the tool mkimage<br /><br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-58630435914107433062007-09-26T04:39:00.001-07:002007-09-26T05:03:35.924-07:00Embedded Linux - ToolchainThe next step for our <span class="blsp-spelling-error" id="SPELLING_ERROR_0">OSK</span> system is to find or create a <span class="blsp-spelling-error" id="SPELLING_ERROR_1">toolchain</span><br />we need a <span class="blsp-spelling-error" id="SPELLING_ERROR_2">toolchain</span> for ARM processor<br /><br />Building a new <span class="blsp-spelling-error" id="SPELLING_ERROR_3">toolchain</span> can be complicated mission<br />in general you should download:<br /><ul><li><span class="blsp-spelling-error" id="SPELLING_ERROR_4">binutils</span> - <a href="http://ftp.gnu.org/gnu/binutils/">http://ftp.gnu.org/gnu/binutils/</a></li><li><span class="blsp-spelling-error" id="SPELLING_ERROR_5">gcc</span> - <a href="http://ftp.gnu.org/gnu/gcc/">http://ftp.gnu.org/gnu/gcc/</a></li><li>C library - <a href="http://ftp.gnu.org/gnu/glibc/">http://ftp.gnu.org/gnu/glibc/</a></li><li>some extensions </li></ul>then configure and build a binary image of your <span class="blsp-spelling-error" id="SPELLING_ERROR_6">toolschain</span> (future post)<br />for our purpose we can use an already made <span class="blsp-spelling-error" id="SPELLING_ERROR_7">toolchain</span> from <a href="http://res.bna.co.il/blogstore/arm-linux-gcc-3.4.1.tar.bz2">here</a><br /><br />extract the archive:<br /><br /># tar -<span class="blsp-spelling-error" id="SPELLING_ERROR_8">xjvf</span> ${DOWLOADDIR}/arm-linux-gcc-3.4.1.tar.bz2<br /><br />look at the path: ${EXTRACTEDDIR}/usr/local/arm/3.4.1/bin<br />(all the binary tools to compile, link and debug an ARM code)<br /><br />add the above path to your PATH <span class="blsp-spelling-corrected" id="SPELLING_ERROR_9">environment</span> variable :<br /><br /># export PATH=/usr/local/arm/3.4.1/bin/:$PATH<br /><br />now we can build everything with this toolchain<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/"><span class="blsp-spelling-error" id="SPELLING_ERROR_10">Bina</span></a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com2tag:blogger.com,1999:blog-2130523957594033671.post-8269955905420399662007-09-19T03:16:00.000-07:002008-12-10T00:13:56.674-08:00Connect to SQL 2005 by the JDBC Provider<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs-LpAlK1jhGrvxP-qWYPqmm_PHbxWwG6w0bNBRJAabzWxoPdex7q21D1Yl7cSIpr7pWE4FkJVLUrCj4xJS3sF3ZrEPkQWqHfonUbkmimE6IlpPwg8MAMQM8526EzsNLYByj1s3uUnncQ/s1600-h/sql.JPG"><img id="BLOGGER_PHOTO_ID_5111857679175737778" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs-LpAlK1jhGrvxP-qWYPqmm_PHbxWwG6w0bNBRJAabzWxoPdex7q21D1Yl7cSIpr7pWE4FkJVLUrCj4xJS3sF3ZrEPkQWqHfonUbkmimE6IlpPwg8MAMQM8526EzsNLYByj1s3uUnncQ/s320/sql.JPG" border="0" /></a><br /><div>In order to connect to the SQL 2005 by the JDBC provider - in addition to the connection string,</div><br /><div>you have to configure the service to a static ip/port :</div><br /><div></div><br /><div>for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a></div>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-47688406157851387682007-09-17T01:48:00.000-07:002007-09-17T01:48:09.936-07:00StumbleuponGreat toolbar - Discover new sites<br />go to the site: <a href="http://www.stumbleupon.com/">http://www.stumbleupon.com/</a><br />download and install the toolbar<br />choose your interesting areas<br />each time you click the stumble button on the toolbar it will take you to somewhere<br />many sites that cant be found <span class="blsp-spelling-corrected" id="SPELLING_ERROR_0">easily</span> with <span class="blsp-spelling-error" id="SPELLING_ERROR_1">google</span><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/"><span class="blsp-spelling-error" id="SPELLING_ERROR_2">Bina</span></a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-8256058858811132162007-09-17T01:47:00.001-07:002007-09-17T01:47:24.126-07:00Timers problem on Windows 2003 serverIn a SOA solution sometimes we need to set a timer on a web service to manage some tasks.<br />for example if we have cached data and want to flush it to a database each 30 seconds we can create a timer for this task<br />the problem is that the timer runs on anonimous identity and cant access the database<br />the problem exist only on Windows 2003 server, on XP pro it runs with ASPNET user identity<br />to solve it, create a thread that do that job and sleep for a 30 seconds<br />Another problem with the thread - it access database or other resource with network service identity and its a very weak account - so if the resource is located on other computer change the application pool identity to other domain user<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-7734420548624169042007-09-17T01:47:00.000-07:002007-09-17T01:47:01.558-07:00Marshaling structures over TCP/IP[this post came from our old blog]<br />To create a distributed application you can use TCP/IP, Remoting, Web Services, WSE etc.<br />There are 2 benefits with TCP/IP:<br />Performance Connecting .net application to legacy applicationsWhen you use for example a TCP server written in C on of the problems is to marshal structures.<br />.NET socket class provides a Receive method that fills a byte buffer.<br />The only problem is to convert it to the structure<br /><br />Some ways I know:<br /><br />Option 1: Using MemoryStream and BinaryReader (field by field)<br />C struct:<br />struct Demo{<br />int x;<br />int y;<br />};<br /><br />C#<br />class Demo<br />{<br />public int x;<br />public int y;<br />}<br /><br />Socket s = tcpl.AcceptSocket();<br />byte[] buf = new byte [100];<br /><br />int bytesReceived = s.Receive(buf);<br />Demo d = new Demo();<br />MemoryStream m = new MemoryStream(buf);<br />BinaryReader br = new BinaryReader(m);<br />d.x = br.ReadInt32();<br />d.y = br.ReadInt32();<br /><br /><br />Option 2: using unsafe code (field by field)<br />You have to compile with /unsafe option and your code is not secured but its faster<br /><br />unsafe<br />{<br />fixed (byte * p1 = buf)<br />{<br />int* p = (int *)p1;<br />d.x = *p;<br />d.y = *(p + 1);<br />}<br />}<br /><br />Option 3: using Marshal class (all at once)<br />Its easy because you Marshal the structure at one time but its very inefficient (marshaling to the unmanaged heap and back to the managed heap)<br /><br />[StructLayout(LayoutKind.Sequential)]<br />class Demo<br />{<br />public int x;<br />public int y;<br />}<br />......<br /><br />Socket s = tcpl.AcceptSocket();<br />byte[] buf = new byte [100];<br /><br />int bytesReceived = s.Receive(buf);<br />Demo d = new Demo();<br />IntPtr p1 = Marshal.AllocCoTaskMem( Marshal.SizeOf(typeof(Demo)));<br />Marshal.Copy(buf, 0, p1, Marshal.SizeOf(typeof(Demo)));<br />Marshal.PtrToStructure(p1, d);<br />Marshal.FreeCoTaskMem(p1);<br /><br />option 4: using struct<br /><br />if you declare it as struct (with all its constrains)<br />unsafe {<br />fixed (byte* p1 = buf) {<br />Demo* p = (Demo *)p1;<br />d = *p;<br />}<br />}<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-67978015130895007082007-09-17T01:46:00.000-07:002007-09-17T01:46:12.573-07:00Starting a service and WMI[this post came from our old blog]<br />One of my students asked me how to start/stop a service from .net application. The simple way to do it is using the ServiceController class:<br /><br />ServiceController sc = new ServiceController();<br />sc.ServiceName = "Dnscache";<br />sc.Stop();<br /><br />Another way is to use WMI<br />2 ways to do it:<br />A. Using classes from System.Management namespace<br />B. Generate .NET proxy class to access WMI class:<br /><br />Example(B)<br /><br />1. Using visual studio command prompt type :<br /><br />C:\demo>mgmtclassgen win32_Service<br /><br />Microsoft (R) .NET Framework Version 2.0.50727.42<br />Copyright (C) Microsoft Corporation. All rights reserved.<br />Generating Code for WMI Class win32_Service ...<br />Code Generated Successfully!!!!<br /><br />2. Add the generated file to your project<br />3. Add reference to system.management.dll<br />4. Use the class<br /><br />Service s = new Service(new ManagementPath("\\\\localhost\\root\\cimv2:Win32_Service.Name='Dnscache'"));<br /><br />s.StartService();<br />//…….<br />s.StopService();<br /><br />WMI helps in many management tasks like installing software, monitoring events etc.<br />Note that within windows 2003 Server Microsoft added many methods to WMI classes. Using the above tool in windows 2003 server usually generate a bigger class file<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-72339612384991282352007-09-17T01:45:00.000-07:002007-09-17T01:45:42.859-07:00Out of resource - TCP portsIn A SOA solution we want to create a client that loads the server with many requests<br />we wrote too clients :<br /><ul><li>java client - runs on linux with AXIS toolkit</li><li>c# client - runs on windows using .net FCL and WSE 3.0</li></ul><p>both clients crashed after a while with the error : "too many open files" of "out of resources"<br />the problem is the use of many TCP ports without release (that managed automatically by OS)<br />The OS allow you to use limited number of port concurrently and free the unused ports once in a while - if you want more ports in the interval it will fail</p><p>2 solutions </p><ul><li>Set HTTP keep-alive both on client and server that means that you use the same port for each request (this can be problem if using built in load balancing feature)</li><li>Raise the port number limit</li></ul><p>To raise the port number:</p><p><strong>On Windows</strong> Registry: set the following<br />[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]<br />"TCPTimedWaitDelay"=dword:0000001e<br />"MaxUserPort"=dword:0000fffe</p><p><strong>On Linux</strong>:<br />open the file etc/security/limits.conf and set nofiles=N</p><p></p>for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-30090149051397402182007-09-17T00:32:00.001-07:002007-09-17T02:54:15.314-07:00SOA<span style="color:#ff6600;"><strong>Course Demo source codes</strong><br /></span><br />XML standards -<a href="http://res.bna.co.il/SOA/demo/ch3.zip">ch3.zip</a><br /><br />Building Web Services - <a href="http://res.bna.co.il/SOA/demo/ch4.zip">ch4.zip</a><br /><br />Consuming Web Services - <a href="http://res.bna.co.il/SOA/demo/ch5.zip">ch5.zip</a><br /><br />Message handling - <a href="http://res.bna.co.il/SOA/demo/ch7.zip">ch7.zip</a><br /><br />Application Servers - <a href="http://res.bna.co.il/SOA/demo/ch8.zip">ch8.zip</a><br /><br />Advance topics - <a href="http://res.bna.co.il/SOA/demo/ch9.zip">ch9.zip</a><br /><br /><span style="color:#ff6600;"><strong>Tools and resources</strong></span><br /><br /><span style="color:#000000;"><a href="http://res.bna.co.il/SOA/tools/XmlValidator.zip">XML Validator</a></span><br /><a href="http://res.bna.co.il/SOA/tools/XSLView.zip">XSL Viewer</a><br /><span style="color:#000000;"></span><span style="color:#000000;"><a href="http://www.cs.fsu.edu/~engelen/soapdownload.html">gSoap toolkit</a> </span><br /><a href="http://xerces.apache.org/xerces-c/download.cgi">Xerces</a><br />Microsoft SOAP Toolkit - MSDN<br />Microsoft XML Notepad 2007<br /><a href="http://notepad-plus.sourceforge.net/uk/download.php">Notepad++</a><br />XML Spy - Altova<br /><a href="http://msdn2.microsoft.com/en-us/data/aa937724.aspx">Microsoft SQL Server 2005 JDBC Driver<br /></a><a href="http://www.netbeans.org/">SUN Netbeans</a><br /> <a href="http://www.netbeans.org/kb/trails/soa.html">SOA Applications and UML Learning Trails</a><br /> <a href="http://www.netbeans.org/kb/trails/java-ee.html">Java EE Applications Learning Trail</a><br /><a href="http://www.service-architecture.com/">http://www.service-architecture.com/</a><br /><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-74521167335410081932007-09-16T04:23:00.000-07:002007-09-16T04:54:39.419-07:00Links<span style="font-size:130%;">Web Services</span><br /><br /><a href="http://webservices.imacination.com/distance/">Zip Distance Calculator WS</a><br /><a href="http://www.webservicex.net/CurrencyConvertor.asmx">Currency Converter WS</a><br /><br /><span style="font-size:130%;">.Net Links</span><br /><br /><a href="http://www.gotdotnet.com/">http://www.gotdotnet.com/</a><br /><a href="http://www.c-sharpcorner.com/">http://www.c-sharpcorner.com/</a><br /><a href="http://www.pinvoke.net/">http://www.pinvoke.net/</a><br /><a href="http://www.codeproject.com/">http://www.codeproject.com/</a><br /><a href="http://www.allesta.com/ws/">web services index</a><br /><a href="http://www.csharphelp.com/">http://www.csharphelp.com/</a><br /><a href="http://www.dotgnu.org/">http://www.dotgnu.org/</a><br /><a href="http://www.webservicex.net/CurrencyConvertor.asmx">c# examples</a><br /><a href="http://www.sql-server-vb-asp.net/">many links to .NET sites</a><br /><a href="http://www.carlosag.net/Tools/WebChart/Default.aspx">Chart control</a><br /><a href="http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html">API Text Viewer</a><br /><a href="http://developerfusion.com/utilities/convertvbtocsharp.aspx">Convert VB.NET to C#</a><br /><a href="http://remoting-corba.sourceforge.net/">CORBA.NET</a><br /><a href="http://j-integra.intrinsyc.com/net/info/">Ja.NET</a> - java and .net remoting interop<br /><a href="http://msdn.microsoft.com/practices/">Microsoft Patterns and practices</a><br /><br /><span style="font-size:130%;">.Net Tools</span><br /><br /><a href="http://www.devexpress.com/">http://www.devexpress.com/</a><br /><a href="http://www.componentone.com/">http://www.componentone.com/</a><br /><a href="http://www.aisto.com/roeder/dotnet/">reflector</a><br /><a href="http://www.jetbrains.com/resharper/">resharper</a><br /><a href="http://www.codesmithtools.com/">http://www.codesmithtools.com/</a><br /><a href="http://www.codeproject.com/csharp/DSWatch.asp">http://www.codeproject.com/csharp/DSWatch.asp</a><br /><a href="http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=01f2f983-298f-4167-b52a-d11b76f3ea62">XML Visualizer</a><br /><a href="http://regex.osherove.com/">Regulator</a><br /><a href="http://www.microsoft.com/technet/itsolutions/msf/default.mspx">MSF</a><br /><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9F3EA426-C2B2-4264-BA0F-35A021D85234&displaylang=en">MSF for small projects</a><br /><a href="http://nprof.sourceforge.net/Site/SiteHomeNews.html">.NET Profiler</a><br /><a href="http://www.aisto.com/roeder/dotnet/">.NET Reflector</a> , <a href="http://www.gotdotnet.com/workspaces/workspace.aspx?id=0f5846c3-c7aa-4879-8043-e0f4fc233ade">addins</a><br /><a href="http://www.devhood.com/tools/tool_details.aspx?tool_id=261">XML Notepad</a><br /><a href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=4136add2-2621-4e04-ae18-b7d41dc59aea">merlin</a> - template generator<br /><a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntsd.mspx">ntsd, sos.dll</a><br /><br /><span style="font-size:130%;">Security Links</span><br /><br /><a href="http://www.phrack.org/">http://www.phrack.org/</a><br /><a href="http://www.cs.rit.edu/~afb/20012/dailywar/slides/buffer.html">bufferoverrun</a><br /><a href="http://www.secureprogramming.com/">http://www.secureprogramming.com/</a><br /><a href="http://project.honeynet.org/">http://project.honeynet.org/</a><br /><a href="http://planet.nana.co.il/yossiea/">http://planet.nana.co.il/yossiea/</a><br /><a href="http://packetstormsecurity.org/">http://packetstormsecurity.org/</a><br /><a href="http://www.cs.ucsb.edu/~jzhou/security/">http://www.cs.ucsb.edu/~jzhou/security/</a><br /><a href="http://www.dwheeler.com/secure-programs/">http://www.dwheeler.com/secure-programs/</a><br /><a href="http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage">http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage</a><br /><br /><span style="font-size:130%;">Linux/Unix</span><br /><br /><a href="http://www.cs.cf.ac.uk/Dave/C/">http://www.cs.cf.ac.uk/Dave/C/</a> - book<br /><a href="http://www.mono-project.com/Main_Page">http://www.mono-project.com/Main_Page</a> - .NET for linux<br /><a href="http://www.advancedlinuxprogramming.com/">http://www.advancedlinuxprogramming.com/</a> - free book<br /><a href="http://www.unixguide.net/linux/linuxshortcuts.shtml">http://www.unixguide.net/linux/linuxshortcuts.shtml</a><br /><a href="http://www.linux.org/docs/online_books.html">http://www.linux.org/docs/online_books.html</a> -many books<br /><a href="http://www.tldp.org/">http://www.tldp.org/</a> -linux documentation project<br /><a href="http://www.linuxhq.com/guides/TLK/tlk.html">http://www.linuxhq.com/guides/TLK/tlk.html</a> - linux kernel guide<br /><a href="http://www.frozentech.com/content/livecd.php">http://www.frozentech.com/content/livecd.php</a> - linux on CD<br /><a href="http://www.codefidence.co.il/">http://www.codefidence.co.il</a><br /><a href="http://www.free-electrons.com/">http://www.free-electrons.com/</a><br /><br />if you have another interesting sites please add a comment<br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com0tag:blogger.com,1999:blog-2130523957594033671.post-37037048411527460522007-09-16T04:10:00.000-07:002007-09-16T04:20:13.795-07:00Windows Scripts Examples, Slides, Tools<a href="http://res.bna.co.il/Misc/files/WMI%20Scripting.ppt">WMI Scripting</a> -slides<br /><a href="http://res.bna.co.il/Misc/files/mod1.zip">Simple scripts</a> - all kind (vbs,js,wsf,wsc -com)<br /><a href="http://res.bna.co.il/Misc/files/mod2.zip">Using components</a><br /><a href="http://res.bna.co.il/Misc/files/mod5.zip">Active Directory scripts</a><br /><a href="http://res.bna.co.il/Misc/files/mod6.zip">Administrative scripts</a><br /><a href="http://res.bna.co.il/Misc/files/mod7.zip">More Administrative scripts</a><br /><a href="http://res.bna.co.il/Misc/files/data.zip">Database scripts</a><br /><a href="http://res.bna.co.il/Misc/files/wmi.zip">WMI examples</a><a href="http://res.bna.co.il/Misc/files/script%20repository.chm"><br />Script repository</a><br /><a href="http://res.bna.co.il/Misc/files/encoder.zip">Script encoder</a><br /><br />for help and other learning materials<br />visit our site: <a href="http://www.bna.co.il/">Bina</a>Bina Software Solutionshttp://www.blogger.com/profile/16375938293954333246noreply@blogger.com