Sept. 5, 2006, 3:11 p.m.
If you change your password and start getting DCOM errors in the Event Log, you might need to run <strong>cscript.exe synciwam.vbs -v</strong> followed by <strong>iisreset</strong> to force IIS to reload your credentials. This seemed to solve the problem for me.
Aug. 30, 2006, 3:24 p.m.
I find IronPython to be <strong>extremely</strong> useful. I use it quite a bit to script interactions with IIS servers that use Windows authentication: you get all the power of Python with the authentication transparency of .NET. But I haven't done anything very involved. Jon Udell posted a <a href="http://weblog.infoworld.com/udell/2006/08/30.html#a1515">screencast of an interview</a> with Jim Hugunin that really illustrates what you can do with IronPython. Packed into a 38 minute screencast: <ul> <li>Changing Avalon UI elements</li> <li>Python integration in Visual Studio</li> <li>Using IronPython to script elements from PowerShell</li> <li>Calling the IronPython library from Visual Basic script.</li> </ul>
Aug. 27, 2006, 7:58 p.m.
I decided to start checking out <a href="http://www.rubyonrails.org">Ruby on Rails</a>. Well, I <a href="http://www.rubyonrails.org/down">installed Ruby on Rails</a> and started learning Ruby. I haven't done much of anything yet. Here is some sample Ruby playing around: >> 1.0/0 => Infinity >> 1/0 ZeroDivisionError: divided by 0 from (irb):27:in `/' from (irb):27 >> 1/0.0 => Infinity Here is the Python equivalent: >>> print 1/0 Traceback (most recent call last): File "", line 1, in ? ZeroDivisionError: integer division or modulo by zero >>> print 1/0.0 Traceback (most recent call last): File "", line 1, in ? ZeroDivisionError: float division >>> print 1.0/0 Traceback (most recent call last): File "", line 1, in ? ZeroDivisionError: float division I don't understand why 1/0.0 is Infinity in Ruby. I know that it's a float, so it's probably being handled differently, but if 1/0 results in a ZeroDivisionError for integer arithmetic, why does the equivalent float division return Infinity? Anybody know?
Aug. 16, 2006, 9:08 a.m.
Well, not really. Recently I was wrestling with a framework that put a bean in the request context. The standard way of outputting the variable was using the Core "out" tag. I needed to conditionally output some text on the page depending on the value of some of the members of the bean. I didn't want to copy/paste the same statement all over the page. If I have a bean that has all the data, it makes sense to put that logic in the bean. But, you can't call a method from within a tag. You can, however, do it within a Java expression. You can also access variables from the Core tags from Java expressions by using the pageContext variable. So, you can do something like: <%= pageContext.getRequest().getAttribute("foo") %> to display the variable. That's kind of messy, though, to splatter all over your page. Plus, you get back an Object, so casting to your bean class and calling the method won't be much less code than copy/pasting "c:if" tags around. The cleanest way I have found thus far is to do all the dirty casting work in a scriptlet. Start with retrieving the variable from the page context, cast it to your object, and use reference this var in your page where you need to call the method.
July 12, 2006, 8:35 a.m.
When I was doing a lot of Java development, every now and then I would need to decompile something to see how it worked. <a href="http://www.kpdus.com/jad.html">Jad</a> works very well. It can be very enlightening to see what's happening under the covers. For .NET, there is a great tool by <a href="http://www.aisto.com/roeder/">Lutz Roeder</a> named <a href="http://www.aisto.com/roeder/dotnet/">Reflector</a>. Load any .NET assembly into Reflector and you can look at the classes in that assembly. It also has a disassembly view that immediately displays the decompiled source for any class.
July 6, 2006, 3:25 p.m.
Ok, so I wanted to run Jetspeed 2 in Jetty 6. I need to do something with Jetspeed, and like Jetty much better than the other servlet containers. So, I started by reading <a href="http://docs.codehaus.org/display/JETTY/Jetspeed">this article</a> that covers just this (Jetty 6 and Jetspeed 2). There were a couple other tweaks, though: <ul> <li>I didn't want to clutter up jetty/lib with all the Jetspeed libraries, so I added jetty/lib/jetspeed and added "$(jetty.home)/lib/jetspeed/*" to start.config in start.jar.</li> <li>In addition to making the changes to jetty.xml (I'm not using jetty-plus), you need to change jetspeed/WEB-INF/assembly/boot/datasource.xml. Change the jndiName for JetspeedDS from java:comp/env/jdbc/jetspeed to jdbc/jetspeed. This references the datasource you created in jetty.xml when you followed the directions in the article.</li> <li>Copy demo.war and j2-admin.war to jetty/webapps.</li> <li>Start Jetty.</li> </ul>
July 4, 2006, 8:08 p.m.
I've only begun using <a href="http://www.myghty.org/">Myghty</a>, but it looks to be a great framework. Here is a <a href="http://www.groovie.org/articles/2005/10/18/hooked-on-myghty">great article</a> that gives you an introduction to Myghty.
June 28, 2006, 9:20 a.m.
Wow, <a href="http://blogs.msdn.com/david.wang/archive/2005/07/14/HOWTO_Diagnose_IIS_401_Access_Denied.aspx">great article</a> by David Wang of Microsoft on IIS authentication problems.
May 22, 2006, 1:44 p.m.
Something I've never had to do before is use Linux command line utilities from behind a HTTP proxy. Not surprisingly, there are different mechanisms to do this, depending on the application. wget, for example, looks at http_proxy, which seems to be an informal standard. svn doesn't use http_proxy. You uncomment the http-proxy-host and http-proxy-port entries in ~/.subversion/servers.
May 16, 2006, 9:35 a.m.
I spent a fair amount of time searching for a <a href="http://msdn2.microsoft.com/en-US/library/bt727f1t.aspx">good article about remote debugging</a> with Visual 2005 and .NET 2.0. I finally <a href="http://msdn2.microsoft.com/en-US/library/bt727f1t.aspx">found one</a>. The best way to do this, as the article states, is by using a network share. You don't have to install any software on the machine you're debugging, and you can run as yourself (if that's how your application works, I was lucky in this case). After I found the article, opened a command prompt (because old Linux habits die hard) on the server and ran msvsmon.exe from my dev machine, it was trivial to point my IDE on the dev machine to the server (include the entire path msvsmon gives you, like domain\user@host) and debug. Not that it helped me solve my problem, but that's life.