I run this from a website on the same machine that my MOSS 2007. The K2.net Server is on another machine.
A part of the web.config of the webapplication :
;Authentication=Windows;Domain=mydomain;User=mylogin;Password=mypassword" />
</appSettings>
</configuration>