« Previous Next »

Thread: Programmatically Creating AppPools/Websites On A Remote Server

Last post 11-18-2009 2:55 PM by ztrem. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 11-04-2009, 11:44 AM

    Programmatically Creating AppPools/Websites On A Remote Server

    I've scoured the net and have found some things that appear to be useful but it turns out not to be so.

    I'm trying to create websites programmatically on a remote server( Server 2008 Std, IIS7).  Initially I found these links which have the answer if you're running the code locally:

    http://dnknormark.net/post/Adding-an-Application-Pool-to-IIS7-programmatically.aspx

    http://dnknormark.net/post/Adding-a-Website-to-IIS7-programmatically.aspx

    However, the web server is located across the network and I'd be running my application at my desktop, preferably.   Is there anything available that lists the steps to take to connect to IIS7 that lends itself to quick and simple form design.  There are going to be a lot of sites set up within the next few months and the prospect of creating them all by hand doesn't thrill me in the least.

     

    Thanks!

  • 11-04-2009, 8:15 PM In reply to

    • DanielVL
    • Top 75 Contributor
    • Joined on 10-07-2006, 6:00 PM
    • Redmond, WA, USA
    • Posts 109

    Re: Programmatically Creating AppPools/Websites On A Remote Server

  • 11-04-2009, 8:16 PM In reply to

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    Have you domain access rights to these servers?

    Can you remote desktop to them?

    How many servers/apps are you talking about?

     

  • 11-05-2009, 9:37 AM In reply to

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    Yes, I'm a domain admin and can mstsc to them.  It's a single application, currently, planned to create websites dynamically/programmatically.

    OpenRemote looks promising, thanks DanielVL

  • 11-05-2009, 7:37 PM In reply to

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    YEah you will need to have local admin rights to teh machine.

  • 11-06-2009, 9:19 AM In reply to

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    The OpenRemote method "worked" inasmuch as I was able to connect to the remote server; however, I got some interop exception that sort of got in the way.  Something about the COM not being registered, and when I googled the error code, it basically talked about MS Office.  I can give it another go if necessary because I foolishly forgot to save the error message and I'm certain my vague description doesn't help much (though if it does spark an idea, please feel free to chime in with another suggestion!  Otherwise, I'll try to find time to run it again and see if I can capture it this time). 

    In the mean time, we've been working with a couple of different options, so I'm not stalled completely. 

    Thanks for the help thus far, Guys.

     EDIT:  Here's the COM error I was talking about.

    Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FA7660F6-7B3F-4237-A8BF-ED0AD0DCBBD9}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).

  • 11-06-2009, 12:27 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    You do have IIS7 installed on your desktop from where you are trying to connect?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-06-2009, 2:11 PM In reply to

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    No, the webserver is Server2008, but all the desktops are WinXP which is where I'm doing the dev.

    Is that the problem; the reason for that particular error?

  • 11-18-2009, 2:55 PM In reply to

    • ztrem
    • Not Ranked
    • Joined on 11-18-2009, 7:51 PM
    • Posts 1

    Re: Programmatically Creating AppPools/Websites On A Remote Server

    So we can't use this DLL to make applications that will run on some machine (which may or may not have IIS installed, or might have an older version) to remotely get IIS7 settings from another machine?

Page 1 of 1 (9 items)
Microsoft Communities