<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Miha Grčar</title>
	<atom:link href="http://mihagrcar.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://mihagrcar.org</link>
	<description></description>
	<lastBuildDate>Mon, 03 Jan 2011 19:45:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mihagrcar.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Miha Grčar</title>
		<link>http://mihagrcar.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mihagrcar.org/osd.xml" title="Miha Grčar" />
	<atom:link rel='hub' href='http://mihagrcar.org/?pushpress=hub'/>
		<item>
		<title>Accessing .NET Web Service Test Forms from a Remote Machine</title>
		<link>http://mihagrcar.org/2007/08/29/access-the-web-service-test-forms-from-a-remote-machine/</link>
		<comments>http://mihagrcar.org/2007/08/29/access-the-web-service-test-forms-from-a-remote-machine/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 19:36:59 +0000</pubDate>
		<dc:creator>Miha</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Microsoft Visual Studio]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mihagrcar.wordpress.com/2007/08/29/access-the-web-service-test-forms-from-a-remote-machine/</guid>
		<description><![CDATA[Testing .NET Web services remotely is disabled by default. This means that if you navigate to a Web service and select a method, you will not get the HTML form for testing the method unless this has been enabled as described in this article. The trick is to add the following section to Web.config: &#60;system.web&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=25&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Testing .NET Web services remotely is disabled by default. This means that if you navigate to a Web service and select a method, you will not get the HTML form for testing the method unless this has been enabled as described in <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;819267">this article</a>. The trick is to add the following section to <strong>Web.config</strong>:</p>
<p><code>&lt;system.web&gt;<br />
</code><img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=10&#038;h=1" align="absmiddle" border="0" height="1" width="10" /><code>&lt;!--<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=20&#038;h=1" align="absmiddle" border="0" height="1" width="20" />The following enables access to the test forms<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=20&#038;h=1" align="absmiddle" border="0" height="1" width="20" />from a remote machine.<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=10&#038;h=1" align="absmiddle" border="0" height="1" width="10" />-</code><code>-&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=10&#038;h=1" align="absmiddle" border="0" height="1" width="10" />&lt;webServices&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=20&#038;h=1" align="absmiddle" border="0" height="1" width="20" />&lt;protocols&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=30&#038;h=1" align="absmiddle" border="0" height="1" width="30" />&lt;add name=</code><code>″</code><code>HttpGet″/&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=30&#038;h=1" align="absmiddle" border="0" height="1" width="30" />&lt;add name=</code><code>″</code><code>HttpPost</code><code>″</code><code>/&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=20&#038;h=1" align="absmiddle" border="0" height="1" width="20" />&lt;/protocols&gt;<br />
<img src="http://mihagrcar.files.wordpress.com/2007/08/blank.gif?w=10&#038;h=1" align="absmiddle" border="0" height="1" width="10" />&lt;/webServices&gt;<br />
..</code><code>.<br />
&lt;/system.web&gt;</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mihagrcar.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mihagrcar.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mihagrcar.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mihagrcar.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=25&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mihagrcar.org/2007/08/29/access-the-web-service-test-forms-from-a-remote-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/aca26f1d952577ee718a71effa449b65?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mIHA</media:title>
		</media:content>

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />

		<media:content url="http://mihagrcar.files.wordpress.com/2007/08/blank.gif" medium="image" />
	</item>
		<item>
		<title>Running an Arbitrary Executable as a Windows Service in Windows Server 2003</title>
		<link>http://mihagrcar.org/2007/08/26/running-an-arbitrary-executable-as-a-windows-service-in-windows-server-2003/</link>
		<comments>http://mihagrcar.org/2007/08/26/running-an-arbitrary-executable-as-a-windows-service-in-windows-server-2003/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 15:58:57 +0000</pubDate>
		<dc:creator>Miha</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mihagrcar.wordpress.com/2007/08/31/running-an-arbitrary-executable-as-a-windows-service-in-windows-server-2003/</guid>
		<description><![CDATA[Some time ago I was asked to setup a legacy server (which was actually a command-line application) on a server machine. The pragmatic solution was to simply launch it and let it run in its own command-prompt window. This, however, was not a good solution because the server application got terminated sooner or later (if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=16&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Some time ago I was asked to setup a legacy server (which was actually a command-line application) on a server machine. The pragmatic solution was to simply launch it and let it run in its own command-prompt window. This, however, was not a good solution because the server application got terminated sooner or later (if not otherwise, by the system administrator not knowing what it is) <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>A better solution is to start such legacy application as a <a href="http://en.wikipedia.org/wiki/Windows_service">Windows service</a>. <a href="http://www.tacktech.com/display.cfm?ttid=197">This article</a> explains how to do this. These are the steps to follow:</p>
<ol>
<li>Download <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&amp;displaylang=en">Windows Server 2003 Resource Kit</a> and install it into <strong>C:\reskit</strong>.</li>
<li>Start the command prompt and launch the following command:
<ul>
<li><code>C:\reskit\INSTSRV.EXE "&lt;service name&gt;"<br />
C:\reskit\SRVANY.EXE</code></li>
</ul>
</li>
<li>Start the registry editor and navigate to <strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\&lt;service name&gt;</strong>.</li>
<li>Add a key and name it <strong>Parameters</strong>.</li>
<li>Add the following value to the <strong>Parameters</strong> key:
<ul>
<li>Value name: <strong>Application</strong></li>
<li>Data type: <strong>REG_SZ</strong></li>
<li>String: <strong>&lt;path&gt;\&lt;application.ext&gt; &lt;parameters&gt;<br />
</strong></li>
</ul>
</li>
<p>This value represents the path to the executable file. It is also possible to specify command-line parameters here.</p>
<li>Start your service from <strong>Service Manager</strong>.</li>
</ol>
<p>With these same tools, it is also possible to remove the service by issuing the following command:</p>
<ul>
<li><code>C:\reskit\INSTSRV.EXE "&lt;service name&gt;" REMOVE</code></li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mihagrcar.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mihagrcar.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mihagrcar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mihagrcar.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=16&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mihagrcar.org/2007/08/26/running-an-arbitrary-executable-as-a-windows-service-in-windows-server-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/aca26f1d952577ee718a71effa449b65?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mIHA</media:title>
		</media:content>
	</item>
		<item>
		<title>Developing a 32-bit .NET Web service on a 64-bit Windows Platform in Visual Studio 2005</title>
		<link>http://mihagrcar.org/2007/08/24/developing-a-32-bit-net-web-service-on-a-64-bit-windows-platform-in-visual-studio-2005/</link>
		<comments>http://mihagrcar.org/2007/08/24/developing-a-32-bit-net-web-service-on-a-64-bit-windows-platform-in-visual-studio-2005/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 18:29:41 +0000</pubDate>
		<dc:creator>Miha</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Microsoft Visual Studio]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mihagrcar.wordpress.com/2007/08/24/developing-a-32-bit-net-web-service-on-a-64-bit-windows-platform-in-visual-studio-2005/</guid>
		<description><![CDATA[Today I was struggling with the issue of developing and debugging a 32-bit .NET Web service on a 64-bit Windows platform (i.e. Windows Server 2003) in Visual Studio 2005. This is not entirely trivial so I decided to write about it. The reason why I need a 32-bit service is because it is using a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=15&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I was struggling with the issue of developing and debugging a 32-bit .NET Web service on a 64-bit Windows platform (i.e. Windows Server 2003) in Visual Studio 2005. This is not entirely trivial so I decided to write about it.</p>
<p>The reason why I need a 32-bit service is because it is using a 32-bit unmanaged DLL which I cannot recompile for a 64-bit system. .NET assigns a 64-bit interpreter to a newly created Web service by default (due to the fact that the OS is 64-bit, I guess). This can be seen in <strong>Internet Information Services (IIS) Manager</strong> if you view the Web service properties and then select <strong>Configuration</strong> under <strong>Application settings</strong>. If you look at the executable paths for various application extensions, you can see &#8220;\Framework64\&#8221; as part of each path. The trick is to set all these paths to &#8220;\Framework\&#8221; instead. Apart from this it is also necessary to put IIS into the 32-bit mode and register the 32-bit version of ASP.NET. <a href="http://support.microsoft.com/kb/894435">This article</a> explains how to do this. In short, you launch the command prompt and issue the following commands:</p>
<ul>
<li><code>cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1</code></li>
<li><code>%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir</code></li>
<li><code>%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -s W3SVC/1/ROOT/WebServiceName</code></li>
</ul>
<p>As always after such actions, restarting IIS and the application pool is a smart thing to do <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Unfortunately it is not possible to run a 32-bit and a 64-bit Web service at the same time on a 64-bit Windows platform <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>To debug my Web service, I added another project (a console-mode application, to be more exact) to the solution. In the pre-build event of this test application, I issue a command with which I generate the WSDL stub:</p>
<ul>
<li><code>"C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\wsdl" /language:cs /namespace:</code><code>WebServiceName</code><code> "/out:$(ProjectDir)</code><code>WebServiceName</code><code>.cs" /protocol:soap <a href="http://localhost/" rel="nofollow">http://localhost/</a></code><code>WebServiceName</code><code>/Service</code><code></code><code>.asmx?wsdl</code></li>
</ul>
<p>Everything seemed OK until I pressed F5. I then realized that I cannot set breakpoints in the Web service source code after I set the test application to be the startup project. I resolved this issue by setting two startup projects, the Web service project and the test application project, as described in <a href="http://visualbasic.about.com/od/usingvbnet/a/WSDebug.htm">this article by Dan Mabbutt</a>. To summarize, you need to follow these steps to prepare your solution for debugging:</p>
<ol>
<li>Select <strong>Set Startup Projects</strong> from the solution context menu.</li>
<li>Tick the <strong>Multiple startup projects</strong> radio box and set the <strong>Action</strong> option for the Web service project and the test application project to <strong>Start</strong>.</li>
<li>Select <strong>Property Pages</strong> from the Web service project context menu and tick &#8220;<strong>Don’t open a page. Wait for a request from an external application.</strong>”</li>
<li>Start <strong>Internet Information Services (IIS) Manager</strong>, select the <strong>Directory Security</strong> tab, and press the <strong>Edit</strong> button under <strong>Authentication and access control</strong>.</li>
<li>Tick the <strong>Integrated Windows authentication</strong> check box.</li>
</ol>
<p>This set almost everything right. The only issue still remaining was that I was unable to set breakpoints in the unmanaged DLL source code (which was also included in the solution as a separate project). It turned out that this one is easy to solve: you simply display <strong>Property Pages</strong> of the Web service, click <strong>Start Options</strong>, and tick the <strong>Native code</strong> check box in the <strong>Debugger</strong> section. Do not be alarmed if the breakpoints in the unmanaged code seem inactive right after launching the application − this will only be the case until the DLL gets loaded by the managed code.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mihagrcar.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mihagrcar.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mihagrcar.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mihagrcar.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mihagrcar.org&#038;blog=1566616&#038;post=15&#038;subd=mihagrcar&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mihagrcar.org/2007/08/24/developing-a-32-bit-net-web-service-on-a-64-bit-windows-platform-in-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/aca26f1d952577ee718a71effa449b65?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mIHA</media:title>
		</media:content>
	</item>
	</channel>
</rss>
