Results 1 to 5 of 5

Thread: [RESOLVED] [2.0] enable application name

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Resolved [RESOLVED] [2.0] enable application name

    Hi,
    Code:
        site.Invoke("Put", "ServerComment", name);
                site.Invoke("Put", "KeyType", "IIsWebServer");
                site.Invoke("Put", "ServerBindings", "10.254.104.199:" + port.ToString() + ":hostname.com");
                site.Invoke("Put", "AppPoolId", "MSSharePointPortalAppPool");
                site.Invoke("Put", "ServerState", 1);
                //site.Invoke("Put", "FrontPageWeb", 1); comment by me
                //site.Invoke("Put", "Default.htm", "Default.asp", "index.htm", "iisstart.htm", "Default.aspx");
                site.Invoke("Put", "SecureBindings", ":443:"); // ssl 
                site.Invoke("Put", "ServerAutoStart", 0);
                site.Invoke("Put", "ServerSize", 1);
                site.Invoke("SetInfo");
    
                // Create the application virtual directory
                //DirectoryEntry Parent = new DirectoryEntry(@"IIS://localhost/W3SVC/" + ServerId.ToString() + "/Root");
                DirectoryEntry siteVDir = site.Children.Add("root", "IIsWebVirtualDir");
                siteVDir.Properties["AppIsolated"][0] = 2;
                siteVDir.Properties["Path"][0] = homeDirectory;
                siteVDir.Properties["AccessFlags"][0] = 513;
                //siteVDir.Properties["FrontPageWeb"][0] = 1; comment by me
                siteVDir.Properties["AppRoot"][0] = "/LM/W3SVC/" + siteID + "/root";
                siteVDir.Properties["AppFriendlyName"][0] = "Default Application";
                siteVDir.CommitChanges();
                site.CommitChanges();
    Thats my code in creating a website . My question is how to enable the application name textbox programmatically.


    thanks,

    Popskie
    Attached Images Attached Images  

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [2.0] enable application name

    I don't believe you can do it through code as it's an IIS setting and not to do with your project. Could be wrong, though.

  3. #3

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Re: [2.0] enable application name

    Quote Originally Posted by penagate
    I don't believe you can do it through code as it's an IIS setting and not to do with your project. Could be wrong, though.
    thanks penagate for the reply. So I should manualy click the create button manually.

    Thanks,

    Popskie

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: [2.0] enable application name

    check the attached application
    Attached Files Attached Files
    Show Appreciation. Rate Posts.

  5. #5

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Re: [2.0] enable application name

    Thanks HG

    newChild.Invoke("AppCreate", true);

    Above line solved my problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width