Re: Programatically Use NetworkService User?



Hello,

you want to programmatically create a COM+ application and set it's identity to Network Service, do I understand you correct?

The way to go here is the COMAdmin interface, which can be reached via COM Interop (See the ICOMAdminCatalog interface) and google around.

Once you have created the application, set it's identity to NT Authority\NetworkService and leave the password empty. That should do the trick.
Given the application catalog in variable apps and your COM+ application in variable app, this should work:

app.set_Value("Identity", "NT Authority\NetworkService");
apps.SaveChanges

Kind regards,
Henning Krause

"coconet" <coconet@xxxxxxxxxxxxxxxx> wrote in message news:47rkv35u3ukj9n42nccmv5lpr64unskamh@xxxxxxxxxx

Thanks, but actually I am installing credentials in a COM+ application
(ServicedComponent) and want to set it that way. What to do?


On Mon, 7 Apr 2008 12:12:48 -0500, "Joe Kaplan"
<joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

If you install the service with the ServiceProcessInstaller class, you can
set the Account property to use ServiceAccount.NetworkService. That is
probably what you should be doing. If you deploy the service with another
technology besides the .NET "installer" class approach (like a traditional
MSI or something), then you can also do this during the deployment with
those other technologies.

Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net


.



Relevant Pages

  • Re: ASP or ASP.NET
    ... You say that you main concern is what technology you ... dependent upon the requirements for your dissertation. ... of the most difficult aspects of web application programming. ... > I've already done some programming, database and web site stuff on my ...
    (microsoft.public.dotnet.framework.aspnet)
  • When Knuth and I were young - Part 2
    ... It wasn't that I had anything against communications technology. ... machine was, of course, whatever machine language we had created. ... we got no instruction in how to program our own machine ... but the instructor clearly considered programming in Algol to be too ...
    (comp.lang.asm.x86)
  • Re: lies about OOP
    ... We could all make our own choices, but anyone who's been programming ... The fact that it took the technology a relatively long time to appear ... SmallTalk was a curiosity - unless you define anything of interest ... was a seminal precursor to today's object-oriented systems. ...
    (comp.lang.python)
  • Re: ASP.NET
    ... ASP.NET is a technology that allows Web site developers (and in this sense, ... There is quite a bit of programming logic that is ... ASP.NET and FrontPage 2003 are very well integrated, ...
    (microsoft.public.frontpage.client)
  • Re: Technologies to teach in undergrad CS
    ... I expect a few to answer "none but our favourite programming language"; ... slightly sympathetic to the "teaching technology doesn't belong in academia" ... it really doesn't make much difference which one because the fundamentals are all pretty much the same. ... the particular technology probably doesn't make much difference so long as the course properly captures the underlying invariants of the processing. ...
    (comp.edu)