Giter Site home page Giter Site logo

cake.iis's Introduction

Cake.IIS

Cake-Build addin that extends Cake with IIS extensions

Build status

cakebuild.net

Join the chat at https://gitter.im/cake-build/cake

Table of contents

  1. Implemented functionality
  2. Referencing
  3. Usage
  4. Example
  5. TroubleShooting
  6. Plays well with
  7. License
  8. Share the love

Implemented functionality

  • Create Website / Ftpsite
  • Delete Site
  • Start Site
  • Stop Site
  • Site Exists
  • Add site binding
  • Remove site binding
  • Create Application Pool
  • Delete Pool
  • Start Pool
  • Stop Pool
  • Pool Exists
  • Recycle Pool
  • Create site applications
  • Create WebFarm
  • Delete WebFarm
  • Add server to WebFarm
  • Delete server from WebFarm
  • Server exists
  • Take Server Offline
  • Bring Server Online
  • Set server Healthy
  • Set server Unhealthy
  • Set server Available
  • Set server Unavailable Immediately
  • Set server Unavailable Gracefully
  • Is server Healthy
  • Get server State
  • Create Virtual Directory
  • Delete Virtual Directory
  • Virtual Directory Exists
  • Create Global Rewrite Rules
  • Delete Global Rewrite Rules

Referencing

NuGet Version NuGet Downloads

Cake.IIS is available as a nuget package from the package manager console:

Install-Package Cake.IIS

or directly in your build script via a cake addin directive:

#addin "Cake.IIS"

Usage

#addin "Cake.IIS"

Task("ApplicationPool-Create")
    .Description("Create a ApplicationPool")
    .Does(() =>
{
    CreatePool("remote-server-name", new ApplicationPoolSettings()
    {
        Name = "Production",

        Username = "Admin",
        Password = "pass1"
    });
});

Task("ApplicationPool-Stop")
    .Description("Stops a local ApplicationPool")
    .Does(() =>
{
    StopPool("Production");
});

Task("ApplicationPool-Start")
    .Description("Starts a remote ApplicationPool")
    .Does(() =>
{
    StartPool("remote-server-name", "Production");
});



Task("Website-Create")
    .Description("Create a Website")
    .Does(() =>
{
    CreateWebsite("remote-server-name", new WebsiteSettings()
    {
        Name = "MyBlog",
        Binding = IISBindings.Http
                    .SetHostName("blog.website.com")
                    .SetIpAddress("*")
                    .SetPort(80),
        PhysicalDirectory = "C:/Websites/Blog",

        ApplicationPool = new ApplicationPoolSettings()
        {
            Name = "Production"
        }
    });
});

Task("Website-Stop")
    .Description("Stops a remote Website")
    .Does(() =>
{
    StopSite("remote-server-name", "MyBlog");
});

Task("Website-Start")
    .Description("Starts a local Website")
    .Does(() =>
{
    StartSite("MyBlog");
});



Task("Binding-Add")
    .Description("Adds a binding to a website")
    .Does(() =>
{
    AddBinding("MyBlog", new BindingSettings(BindingProtocol.Http)
    {
        HostName = "myblog.com"
    });
});

Task("Binding-Add-Fluent")
    .Description("Adds a binding to a website using a fluent interface")
    .Does(() =>
{
    AddBinding("remote-server-name", "MyBlog", IISBindings.Http
                                                .SetIpAddress("127.0.0.1")
                                                .SetPort(8080));
});

Task("Binding-Remove")
    .Description("Removes a binding from a website")
    .Does(() =>
{
    RemoveBinding("remote-server-name", "MyBlog", new BindingSettings(BindingProtocol.Http)
    {
        HostName = "myblog.com"
    });
});



Task("Application-Create")
    .Description("Adds an application to a site")
    .Does(() =>
{
    AddSiteApplication(new ApplicationSettings()
    {
        SiteName = "Default Website",

        ApplicationPath = "/NestedApp",
		VirtualDirectory = "/NestedApp",
        PhysicalDirectory = "C:/Apps/KillerApp/"
    });
});

Task("Application-Remove")
    .Description("Remove an application from a site")
    .Does(() =>
{
    RemoveSiteApplication(new ApplicationSettings()
    {
        SiteName = "Default Website",

        ApplicationPath = "/NestedApp",
		VirtualDirectory = "/NestedApp",
        PhysicalDirectory = "C:/Apps/KillerApp/"
    });
});



Task("WebFarm-Create")
    .Description("Create a WebFarm")
    .Does(() =>
{
    CreateWebFarm("remote-server-name", new WebFarmSettings()
    {
        Name = "Batman",
        Servers = new string[] { "Gotham", "Metroplis" }
    });
});

Task("WebFarm-Server-Online")
    .Description("Sets a WebFarm server as online")
    .Does(() =>
{
    BringServerOnline("remote-server-name", "Batman", "Gotham");
});

Task("WebFarm-Server-Offline")
    .Description("Sets a WebFarm server as offline")
    .Does(() =>
{
    TakeServerOffline("remote-server-name", "Batman", "Gotham");
});

Task("WebFarm-Server-Unavailable-Gracefully")
    .Description("Sets a WebFarm server as unavailable gracefully")
    .Does(() =>
{
    SetServerUnavailableGracefully("remote-server-name", "Batman", "Gotham");
});

Task("WebFarm-Server-Unavailable-Immediately")
    .Description("Sets a WebFarm server as unavailable immediately")
    .Does(() =>
{
    SetServerUnavailableImmediately("remote-server-name", "Batman", "Gotham");
});

Task("WebFarm-Add-Server")
    .Description("Add a Server to a WebFarm")
    .Does(() =>
{
    AddServer("remote-server-name", "farm-name", new WebFarmServerSettings
    {
        Address = "webfarm-server-adress",
        HttpPort = 8080
    });
});

Task("VirtualDirectory-Create")
    .Description("Creates a Virtual Directory")
    .Does(() => 
{
    AddSiteVirtualDirectory("remote-server-name", new VirtualDirectorySettings(){
        PhysicalDirectory = "C:/Apps/Directory/",
        SiteName = "Default Website",
        ApplicationPath = "/",
        Path = "/Directory"
    });
});

Task("VirtualDirectory-Remove")
    .Description("Removes a Virtual Directory")
    .Does(() => 
{
    RemoveSiteVirtualDirectory("remote-server-name", new VirtualDirectorySettings(){
        SiteName = "Default Website",
        ApplicationPath = "/",
        Path = "/Directory"
    });
});

Task("VirtualDirectory-Exists")
    .Description("Checks if a Virtual Directory exists")
    .Does(() => 
{
    SiteVirtualDirectoryExists("remote-server-name", new VirtualDirectorySettings(){
        SiteName = "Default Website",
        ApplicationPath = "/",
        Path = "/Directory"
    });
});

Task("RewriteRule-Create")
    .Description("Create a new rewrite global rule")
    .Does(() => 
{
	CreateRewriteRule("remote-server-name", new RewriteRuleSettings
	{
		Name = "Redirect to HTTPS",
		Pattern = "*",
		PatternSintax = RewritePatternSintax.Wildcard,
		IgnoreCase = true,
		StopProcessing = true,
		Conditions = new []
		{
			new RewriteRuleConditionSettings { ConditionInput = "{HTTPS}", Pattern = "off", IgnoreCase = true },
		},
		Action = new RewriteRuleRedirectAction { Url = @"https://{HTTP_HOST}{REQUEST_URI}", RedirectType = RewriteRuleRedirectType.Found }
	});
});


Task("RewriteRule-Delete")
    .Description("Delete a rewrite global rule")
    .Does(() => 
{
	DeleteRewriteRule("remote-server-name", "rule-name");
});

RunTarget("Website-Create");

Example

A complete Cake example can be found here.

TroubleShooting

  • Please be aware of the breaking changes that occurred with the release of Cake v0.22.0, you will need to upgrade Cake in order to use Cake.IIS v0.3.0 or above.

A few pointers for managing IIS can be found here.

Plays well with

If your looking to deploy to IIS its worth checking out Cake.WebDeploy or if your running a WebFarm inside AWS then check out Cake.AWS.ElasticLoadBalancing.

If your looking for a way to trigger cake tasks based on windows events or at scheduled intervals then check out CakeBoss.

License

Copyright (c) 2015 - 2016 Sergio Silveira, Phillip Sharpe

Cake.IIS is provided as-is under the MIT license. For more information see LICENSE.

Share the love

If this project helps you in anyway then please โญ the repository.

cake.iis's People

Contributors

adaskothebeast avatar carlos-vicente avatar davisnt avatar devlead avatar filipeesch avatar jakejscott avatar klabranche avatar michael-wolfenden avatar mrtortoise avatar ragingkore avatar roemer avatar sharperad avatar symbianx avatar terravenil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cake.iis's Issues

Setting authentication bug

Cake.IIS code has bug when trying to set authentication settings. I have fixed the code and added tests but i can not push my changes, keep getting access denied. I can send you my changes if preferred. Thanks

Could not load file or assembly error on build server

We use teamcity for our build server and I'm taking over a project for a developer who is no longer with us. He wrote a build.cake file to push our sites to our servers along with some other things. I have no experience with this and need to update it to also start and stop a site and application when the site is pushed. In googling it I came across this repository. I have updated our build.cake file with the following.

Task("deploy_live_websites")
    	.IsDependentOn("use_live_config")
    	.Does(() => 
    	{ 
    		foreach (var site in websites){
    			foreach (var server in liveServers){
    				CreatePool(server, new ApplicationPoolSettings()
    				{
    					Name = site.ApplicationPoolName,
    					Username = devWebDeployUser,
    					Password = devWebDeployPassword
    				});
    				CreateWebsite(server, new WebsiteSettings()
    				{
    					Name = site.SiteName,
    					Binding = IISBindings.Http
    								.SetHostName(site.HostName)
    								.SetIpAddress("*")
    								.SetPort(80),
    					PhysicalDirectory = site.PhysicalDirectory,
    					ApplicationPool = new ApplicationPoolSettings()
    					{
    						Name = site.ApplicationPoolName
    					}
    				});
    
    				StopSite(server, site.SiteName);
    				StopPool(site.ApplicationPoolName);
    
    				DeployWebsite(new DeploySettings()
    				{					
    					SourcePath = "./artifacts/_PublishedWebsites/" + site.Name + "/",
    					ComputerName = server,
    					SiteName = site.SiteName,
    					Username = webDeployUser,
    					Password = webDeployPassword
    				});
    
    				StartPool(site.ApplicationPoolName);
    				StartSite(site.SiteName);
    			}			
    		}
    	});

Specifically the update I made was the StopSite, StopPool, StartPool, StarSite lines.

When I push this to our build server it fails when this executes. The error I get is

    [20:29:19][Step 1/1] ========================================
    [20:29:19][Step 1/1] deploy_live_websites
    [20:29:19][Step 1/1] ========================================
    [20:29:19][Step 1/1] Executing task: deploy_live_websites
    [20:29:19][Step 1/1] Application pool 'TECWare_v4' is system's default.
    [20:29:19][Step 1/1] An error occurred when executing task 'deploy_live_websites'.
    [20:29:19][Step 1/1] Error: One or more errors occurred.
    [20:29:19][Step 1/1] 	Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    [20:29:19][Step 1/1] Process exited with code 1
    [20:29:05][Step 1/1] Process exited with code 1
    [20:29:19][Step 1/1] Step PowerShell failed

I have no idea what the issue is. Anyone have an idea on how to fix this? It worked fine before adding the start/stop methods. Also I added #addin "Cake.IIS" to the top of the file.

Code inconsistencies / guidelines

There are quite some inconsistencies and also different coding guidelines used.

The code should be cleaned to make further extensions easier.

I can do a PR for that.

NullReferenceException when calling <SiteExists()>

Dear Developers,

lately my Team can't use the SiteExists() funtion. The functions throws allways a NullReferenceException.
It's related to the latest addin version and occurs on Windows 10 (latest and previous update versions)
Is this a known issue or does someone have any ideas for a workaround?

With kind regards.

Load dependencies with addin

To get this addin to run correctly I had to add &loaddependencies=true

otherwise I would get an error like

Could not load file or assembly 'System.ServiceProcess.ServiceController, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...

maybe add this to the FAQ/Wiki

Add a flag for directory browsing when adding a site

It should be possible to enable directory browsing.
See: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/directorybrowse

using(ServerManager serverManager = new ServerManager()) { 
	Configuration config = serverManager.GetWebConfiguration("Contoso");

	ConfigurationSection directoryBrowseSection = config.GetSection("system.webServer/directoryBrowse");
	directoryBrowseSection["enabled"] = true;
	directoryBrowseSection["showFlags"] = @"Date, Time, Size, Extension";

	serverManager.CommitChanges();
}

COM Exception

I'm not able to google myself out of this. Maybe you have seen this before.

my cake script is just this

#addin "Cake.IIS"
StartPool("MachineName", "PoolName");
Error: System.AggregateException: One or more errors occurred. --->
System.AggregateException: One or more errors occurred. ---> 
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine <machineName> failed due to the following error: 800703fa <machineName>.

   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Microsoft.Web.Administration.ConfigurationManager.CreateAdminManager[TClass,TInterface](WebConfigurationMap webConfigMap, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.CreateWritableAdminManager(WebConfigurationMap webConfigMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(String rawConfigurationPath, String cacheKey, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.GetApplicationHostConfiguration()
   at Microsoft.Web.Administration.ServerManager.ApplicationPoolsSectionCreator()
   at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory)
   at Microsoft.Web.Administration.ServerManager.ApplicationPoolCollectionCreator()
   at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory)
   at Cake.IIS.ApplicationPoolManager.Start(String name)
   at Cake.IIS.ApplicationPoolAliases.StartPool(ICakeContext context, String server, String name)
   at Submission#0.StartPool(String server, String name)
   at Submission#0.<<Initialize>>d__0.MoveNext()  

Call to alias "AddSiteApplication" completes but no application visible in IIS.

This is my task.

image

When I run .\build.ps1 --target=create-application

I see no error.

image

When I look in IIS there is no application created there. Refresh did not help.

image

If I re-run I get error saying application already exists.

image

Running appcmd list reveals that its indeed there.
image

What am I missing? I can run appcmd and create the application.
appcmd add app /site.name:"Default Web Site" /path:/myapp /physicalPath:"C:\inetpub\myapp"

image

image

However "AddSiteApplication" alias is not working for me. Am I missing anything?

Exception retrieving COM object

I'm hitting this exception:

Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine failed due to the following error: 800706ba

I'm running as admin and firewall is off. But I'm trying to configure the localhost (I'm automating my development setup).

I hit problems on trying to create AppPool:

Task("Create-Application-Pool")
    .Description("Create a ApplicationPool")
    .Does(() =>
    {
        CreatePool("MyProject.dev", new ApplicationPoolSettings()
        {
            Name = "MyProject.dev",
            IdentityType = IdentityType.LocalSystem,
        });
    });

where MyProject.dev is a domain name in hosts file pointing to 127.0.01.

Anything I can do to debug?

Could not load file or assembly 'System.Reflection.TypeExtensions

Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

When I add the dll to tools\Addins\cake.iis\Cake.IIS\lib\net461 myself, the issue seems to be gone

Broken references for Microsoft.Win32.Registry

  • Cake version = 0.27.1
  • Cake.IIS version = 0.4.0 (and previous)

When adding a site I get:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Adding NuGet package Microsfoft.Win32.Registry, returns:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

problem seems fixed when adding System.Reflection.TypeExtensions Nuget package as addin.
This seems gimmicky... Add dependencies to project or update documentation maybe?

0.1.7 breaking changes for HostName/CreateWebsite?

Hi,

Thank you for providing this add-in -- it's very useful for us in our automated deployments.

However, I'm looking at failed deployments since version 0.1.7, in particular we have this Cake output:
error CS0117: 'Cake.IIS.WebsiteSettings' does not contain a definition for 'HostName'

The broken code looks something like:

CreateWebsite(new WebsiteSettings() {
Name = siteDirectory,
HostName = siteHostName,
PhysicalDirectory = sitePhysicalPath,
ApplicationPool = new ApplicationPoolSettings() {
Name = siteApplicationPoolName
}
});

Would the recent bindings work be expected to completely break this?

StopPool with remote location throws null exception

Cake version = 0.30.0
Cake.IIS version = 0.4.1

When specifying a remote location for these functions I get a null exception.
DeletePool("127.0.0.1", "Test") - Fail
StopPool("localhost", "Test") - Fail

The functions work if you don't use the remote-location at all.
DeletePool( "Test") - Success
StopPool("Test") - Success

Error:

Error: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Web.Administration.ConfigurationManager.CreateWritableAdminManager(WebConfigurationMap webConfigMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(String rawConfigurationPath, String cacheKey, Boolean isAdminConfig, Boolean isRedirectionConfig)
   at Microsoft.Web.Administration.ConfigurationManager.GetApplicationHostConfiguration()
   at Microsoft.Web.Administration.ServerManager.ApplicationPoolsSectionCreator()
   at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory)
   at Microsoft.Web.Administration.ServerManager.ApplicationPoolCollectionCreator()
   at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory)
   at Cake.IIS.ApplicationPoolManager.Stop(String name)
   at Cake.IIS.ApplicationPoolAliases.StopPool(ICakeContext context, String server, String name)
   at Submission#0.StopPool(String server, String name)
   at Submission#0.<<Initialize>>b__0_1()

I had to downgrade to these versions to use the remote-location successfully
Cake version = 0.22.0
Cake.IIS version = 0.3.1

IIS https cert bindinmg

Hi

I simply cannot get the IIS binding on HTTPS to add the cert.
The cert is added as a self signed and in the web hosting store.

I can find the cert in the store but set cert store and set cert hash does not result in the cert being set :-/

Any ideas?

Code snipit:


var x509Store = new X509Store("WebHosting", StoreLocation.LocalMachine);
            var bindingSettings = IISBindings.Https
                .SetIpAddress("*")
                .SetHostName(string.Empty)
                .SetPort(443)
                .SetCertificateStoreName(x509Store.Name);

            x509Store.Open(OpenFlags.ReadOnly);
            var certificates = x509Store.Certificates;
            Console.WriteLine("Cert count "+ certificates.Count + " and looking for " + siteName);
            foreach(var x509 in certificates)
            {
                Console.WriteLine("Cert "+ x509.FriendlyName);
                if(x509.FriendlyName.Equals(siteName, StringComparison.InvariantCultureIgnoreCase))
                {
                    Console.WriteLine("Cert " + siteName + " found with hash " + System.Text.Encoding.UTF8.GetString(x509.GetCertHash()));
                    bindingSettings.SetCertificateHash(x509.GetCertHash);
                    break;
                }
            }

            CreateWebsite(remoteServerName, new WebsiteSettings()
            {
                Name = siteName,
                Binding = bindingSettings,
                PhysicalDirectory = outputDir,
                ApplicationPool = new ApplicationPoolSettings()
                {
                    Name = siteName
                },
                Overwrite = true
            });
            x509Store.Close();

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • You are currently referencing Cake.Core 0.26.0. Please upgrade to 0.28.0
  • The Cake.Core reference should be private. Specifically, your addin's .csproj should have a line similar to this: <PackageReference Include="Cake.Core" Version="0.28.0" PrivateAssets="All" />
  • Your addin should target netstandard2.0. Please note that there is no need to multi-target, netstandard2.0 is sufficient.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • You are currently referencing Cake.Core 0.29.0. Please upgrade to 0.33.0
  • The Cake.Core reference should be private. Specifically, your addin's .csproj should have a line similar to this: <PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
  • The nuget package for your addin should use the cake-contrib icon. Specifically, your addin's .csproj should have a line like this: <PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png</PackageIconUrl>.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.

This issue was created by a tool: Cake.AddinDiscoverer version 3.12.1

Trying to stop website in remote IIS results in COM exception

Hi, I tried to stop website on my remote IIS like so:

StopSite(serverName,siteName);

but this resulted in:

An error occurred when executing task 'Default'.
Error: 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).

Do you have any idea what this can be caused from?

Change the PhysicalPath for existing site.

Hello!
I have a task for deploying the site. One feature is there that the PhysicalPath of the site changes everytime when deploying new version (For example: C:\Apps\CompProject_v_1.0.0.1, next C:\Apps\CompProject_v_1.0.0.2). I know that this is not good solution, but this is what I have . I can't find the way how to change the PhysicalPath of the existing site. Thank you in advance!

Default values for ApplicationPoolSettings

Hi! Thanks for the addin.

I did notice however that, when making an application pool, the settings default values (this is just the default values in C# for those properties, really) do not correspond with what IIS considers default settings.

Specifically, these settings are different:

  • LoadUserProfile --> defaults to false in C#, defaults to true in IIS
  • PingEnabled --> defaults to false in C#, defaults to true in IIS
  • MaximumWorkerProcesses -> defaults to 0 in C#, defaults to 1 in IIS.

I believe it would be wiser to follow the defaults by IIS if possible.

Problems with stopping/starting application pool

Hi,

First of all thanks for the addin ;)

We have some problems though with stopping and starting the application pool sometimes. The return value is true, there is a log message saying Waiting for IIS to activate new config but the pool is not successfully started/stopped.

Have you experienced any of this - any ideas what may be causing such behavior?

NetTcp Binding extra ":" in Binding information

The AddBinding creates an extra ":" before the binding.

AddBinding(websiteName, new BindingSettings(){ BindingProtocol = BindingProtocol.NetTcp, Port = websiteNetTcpPort, HostName="*"

This creates :40005:* but expecting 40005:*

Would it be possible to use the Cake Contrib Icon for your NuGet Package?

Thanks again for creating this Cake Addin, we really appreciate the effort that you have put in to creating it.

We, the Cake Team, recently announced a new Cake Contrib Icon, details of which can be found here:

http://cakebuild.net/blog/2017/06/new-cake-contrib-icon

Would you consider changing the nuspec file for your NuGet Package to use this new Cake Contrib Icon? If so, the recommended URL to use is:

https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png

Details of the above URL can be found in the repository here:

https://github.com/cake-contrib/graphics

Please let me know if you have any questions.

Update to work with cake 0.26.0

Please update Cake.IIS to support Cake.Core 0.26.0.

Error: The assembly 'Cake.IIS, Version=0.3.4.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.22.0).
This assembly need to reference at least Cake.Core version 0.26.0.

cake-contrib user on Nuget

First of all, I wanted to thank you for adding to the Cake community by adding this addin.

I was just wondering if you had seen this blog post:

http://cakebuild.net/blog/2016/08/cake-contribution-organization

We are currently going through a process of increasing the visibility of addins, and also trying to ensure their long term maintainability.

To that end, we are asking addin creators to add the cake-contrib user on NuGet as a co-owner (this can be done through the NuGet website by clicking on Manage Owners on the package page).

Would you be interested in doing this for Cake.IIS? If you have any questions about this, please let me know. There was some initial concern that the Cake Team were trying to "take over" packages, and that couldn't be further from the truth, and if you have this concern, or others, I would like to address them.

Thanks!

Get site appPool and others

You have a lot of methods to manipulate site and server.
Could you please add GetSite and GetServer to you addin?
The aim is to be able to read site properties. I.e. website root physical path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.