Creating New Application Pool in Agent server

Sandeep GuptaSandeep Gupta Posts: 56
edited December 9, 2013 12:37AM in Deployment Manager
How to create new Application Pool on agent server and Create Authentication for it.
Thanks
Sandeep Gupta
«13

Comments

  • There are some extra variables you need to specify to create an application pool (see here)

    Specifically:

    You also need to specify the following to create a new application pool:
    RedGateCreateWebSiteApplicationPool
    The name of the application pool to create.
    RedGateCreateWebSiteDotNetVersion
    The .NET Framework version to use for the application pool.
    RedGateCreateWebSiteIdentityType
    The identity type to use for the application pool.
    Icon
    You can only use the application pool variables with IIS 7.
    Systems Software Engineer

    Redgate Software

  • i have already declared all the variables ,pl see here

    t82b8o.jpg

    after that no application pool is created on target machine and can you please tell me that 'RedGateCreateWebSiteOnPort' compulsory or not?
    Thanks
    Sandeep Gupta
  • If the website does not yet exist then you have to specify the other variables too:

    RedGateWebSiteName
    The IIS site name or virtual directory to use when creating the IIS website.
    RedGateCreateWebSiteOnPort
    The port number to use when creating the IIS website.

    If you've done all that, then we probably need to see the full output from the deployment to see if there's any helpful information.
    Systems Software Engineer

    Redgate Software

  • pl see the variables defined in DM

    2qntq3p.jpg

    and here is the IIS information

    14dpvde.jpg

    :(
    Thanks
    Sandeep Gupta
  • I have a feeling it might be because it's in the default website which is already running on port 80.
    If you stop the default web site (assuming you don't need it for anything else) and then reconfigure your site just as MailingService, does it work?
    Systems Software Engineer

    Redgate Software

  • Ok... i am doing...
    Thanks
    Sandeep Gupta
  • After that target machine is offline,.....
    Thanks
    Sandeep Gupta
  • Do you mean Deployment Manager is saying the target is offline? Try a Health Check. Stopping the default website shouldn't affect the agent as it listens on its own port.
    Systems Software Engineer

    Redgate Software

  • yes...target machine is offline....
    Thanks
    Sandeep Gupta
  • Is the service running..? If not, start it and if it is, try restarting it. If it still fails, please post the output from the health check.
    Systems Software Engineer

    Redgate Software

  • 2013-11-21 18:07:16 +05:30 ERROR System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (405) Method Not Allowed. ---> System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
    at System.Net.HttpWebRequest.GetResponse()
    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    --- End of inner exception stack trace ---

    Server stack trace:
    at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
    at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
    at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
    at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
    at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.SyncWaiter.TryGetChannel()
    at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.SyncWaiter.TryWait(TChannel& channel)
    at System.ServiceModel.Channels.ReliableChannelBinder`1.ChannelSynchronizer.TryGetChannel(Boolean canGetChannel, Boolean canCauseFault, TimeSpan timeout, MaskingMode maskingMode, TChannel& channel)
    at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)
    at System.ServiceModel.Channels.RequestReliableRequestor.OnRequest(Message request, TimeSpan timeout, Boolean last)
    at System.ServiceModel.Channels.ReliableRequestor.Request(TimeSpan timeout)
    at System.ServiceModel.Channels.ClientReliableSession.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ReliableRequestSessionChannel.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
    at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at RedGate.Deploy.Shared.Contracts.IHealthService.CheckHealth()
    at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
    at CallSite.Target(Closure , CallSite , Object )
    at ImpromptuInterface.Optimization.InvokeHelper.InvokeMemberCallSite(Object target, String_OR_InvokeMemberName name, Object[] args, String[] tArgNames, Type tContext, Boolean tStaticContext, CallSite& callSite)
    at ImpromptuInterface.Dynamic.ImpromptuForwarder.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
    at RedGate.Deploy.Server.Proxies.WcfSecurityWrapper`1.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
    at CallSite.Target(Closure , CallSite , Object )
    at ActLike_IHealthService_b0bd9650e92e4cd0b1c2bf69d9407e18.CheckHealth()
    at RedGate.Deploy.Server.Tasks.Health.CheckMachineHealthActivity.<Execute>b__0()
    Thanks
    Sandeep Gupta
  • Did you make any other config changes? Or just stop the default website in IIS on the target?

    Presumably this connected OK before... can you show a screenshot of how the agent is defined in Deployment Manager? Also, are the two machines on the same network or are there any proxies/firewalls between the two? You may want to reboot the agent just in case it's a temporary glitch too.
    Systems Software Engineer

    Redgate Software

  • No, i am not doing any changes, and i am restart the iis on target machine

    2cr4roh.jpg

    yes it is connected....pl see the screenshot...and pls give me the reason what is the reason?
    Thanks
    Sandeep Gupta
  • now target machine is restart and now in DM Agent is online.... and i am tried the Default Web Site is Stopped and again deploy release... then Application pool is not created.... problem is exist...
    Thanks
    Sandeep Gupta
  • OK, glad the agent is OK now. I will try out the application pool myself to test it. Please can you post the raw deployment log? (Change any usernames/passwords to **** if you need to)
    Systems Software Engineer

    Redgate Software

  • please tell me the location of the deployment log... so i am post the log for further help...
    Thanks
    Sandeep Gupta
  • Go to your project > Deployment History > View > "Raw", then copy the text:


    241weua.png

    then

    308l7xc.png
    Systems Software Engineer

    Redgate Software

  • Please find the Raw

    Success: DeploymentControllerActivity
    2013-11-21 18:28:09 +05:30 INFO Stage 1: Downloading packages from NuGet servers
    2013-11-21 18:28:09 +05:30 INFO Stage 2: Uploading packages to target machines
    2013-11-21 18:28:10 +05:30 INFO Stage 3: Installation
    2013-11-21 18:28:11 +05:30 INFO Deployment complete!

    Success: Stage 1: Downloading packages from NuGet servers
    2013-11-21 18:28:09 +05:30 INFO Making a list of packages to download
    2013-11-21 18:28:09 +05:30 INFO All packages have been downloaded

    Success: Download package Shipboard.MailingService 1.0 from NuGet feed: Deployment Manager package feed
    2013-11-21 18:28:09 +05:30 INFO Downloading package Shipboard.MailingService 1.0 from feed: 'http://dc-dev59.decurtis.com:8080/nuget/'
    2013-11-21 18:28:09 +05:30 DEBUG Downloaded packages will be stored in: C:\ProgramData\Red Gate\DeploymentManager\Data\PackageCache
    2013-11-21 18:28:09 +05:30 DEBUG Finding package (attempt 1 of 5)
    2013-11-21 18:28:09 +05:30 DEBUG Found package Shipboard.MailingService 1.0
    2013-11-21 18:28:09 +05:30 INFO Download complete

    Success: Stage 2: Uploading packages to target machines
    2013-11-21 18:28:09 +05:30 INFO Preparing to upload packages
    2013-11-21 18:28:09 +05:30 INFO Uploading packages...
    2013-11-21 18:28:10 +05:30 INFO Package upload complete!

    Success: Upload package Shipboard.MailingService to machine http://vm-sandeep01:10301/
    2013-11-21 18:28:09 +05:30 DEBUG Checking whether package Shipboard.MailingService 1.0 is in the package cache on agent http://vm-sandeep01:10301/
    2013-11-21 18:28:09 +05:30 DEBUG The package already exists in the agent package cache. Skipping package upload

    Success: Stage 3: Installation


    Success: Step 1: Shipboard.MailingService version 1.0
    2013-11-21 18:28:10 +05:30 INFO Execute step Shipboard.MailingService version 1.0
    2013-11-21 18:28:11 +05:30 INFO Step completed

    Success: Execute step Shipboard.MailingService version 1.0 against machine vm_2008
    2013-11-21 18:28:10 +05:30 INFO Evaluating deployment variables
    2013-11-21 18:28:10 +05:30 INFO Begin deployment
    2013-11-21 18:28:10 +05:30 DEBUG Deploying package Shipboard.MailingService 1.0 to agent http://vm-sandeep01:10301/
    2013-11-21 18:28:11 +05:30 INFO Deployment successful.
    2013-11-21 18:28:11 +05:30 INFO Agent output follows:
    2013-11-21 18:28:10 +05:30 DEBUG Begin deployment of package: Shipboard.MailingService.1.0
    2013-11-21 18:28:10 +05:30 DEBUG Deployment Agent information is below:
    2013-11-21 18:28:10 +05:30 DEBUG - Machine name: VM-SANDEEP01
    2013-11-21 18:28:10 +05:30 DEBUG - Is 64-bit OS: True
    2013-11-21 18:28:10 +05:30 DEBUG - Is 64-bit process: False
    2013-11-21 18:28:10 +05:30 DEBUG - Service user name: SYSTEM
    2013-11-21 18:28:10 +05:30 DEBUG - CLR version: 4.0.30319.1
    2013-11-21 18:28:10 +05:30 DEBUG - Current directory: C:\Windows\system32
    2013-11-21 18:28:10 +05:30 DEBUG - OS version: Microsoft Windows NT 6.1.7601 Service Pack 1
    2013-11-21 18:28:10 +05:30 DEBUG - Agent version: 2.3.4.13
    2013-11-21 18:28:10 +05:30 DEBUG Installing package Shipboard.MailingService.1.0 from uploaded package cache into C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15
    2013-11-21 18:28:10 +05:30 INFO Installing 'Shipboard.MailingService 1.0'.
    2013-11-21 18:28:10 +05:30 INFO Successfully installed 'Shipboard.MailingService 1.0'.
    2013-11-21 18:28:10 +05:30 DEBUG The following variables are available:
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGatePackageName] = 'Shipboard.MailingService'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGatePackageVersion] = '1.0'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGatePackageNameAndVersion] = 'Shipboard.MailingService.1.0'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateEnvironmentName] = 'Dev'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateReleaseNumber] = '1.1.3'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateReleaseNotes] = ''
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateDeploymentComments] = ''
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateProjectName] = 'Mailing Service'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateProjectDescription] = ''
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateTaskId] = 'deployments-322'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateReleasedBy] = 'administrator'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateDeployedBy] = 'administrator'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateMachineName] = 'vm_2008'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateWebSiteName] = 'Default Web Site/MailingService'
    2013-11-21 18:28:10 +05:30 DEBUG - [CommonSchema] = 'busobj_ship.'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateCreateWebSiteApplicationPool] = 'MailingService'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateCreateWebSiteDotNetVersion] = '4.0'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateCreateWebSiteIdentityType] = 'ApplicationPoolIdentity'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateCreateWebSiteOnPort] = '80'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateDeploymentAgentVersion] = '2.3.4.13'
    2013-11-21 18:28:10 +05:30 DEBUG - [RedGateDeploymentAgentMode] = 'installed-agent'
    2013-11-21 18:28:10 +05:30 INFO Conventions will be run in the following order:
    2013-11-21 18:28:10 +05:30 INFO - Run PreDeploy.ps1
    2013-11-21 18:28:10 +05:30 INFO - Apply .config transforms
    2013-11-21 18:28:10 +05:30 INFO - Update appSettings/connectionStrings in .config(s)
    2013-11-21 18:28:10 +05:30 INFO - Copy package
    2013-11-21 18:28:10 +05:30 DEBUG x Database package deployment plugin (not applicable to this package)
    2013-11-21 18:28:10 +05:30 INFO - Run Deploy.ps1
    2013-11-21 18:28:10 +05:30 INFO - Configure IIS
    2013-11-21 18:28:10 +05:30 INFO - Delete package file
    2013-11-21 18:28:10 +05:30 INFO - Run PostDeploy.ps1
    2013-11-21 18:28:10 +05:30 DEBUG Looking for PowerShell scripts named PreDeploy.ps1
    2013-11-21 18:28:10 +05:30 DEBUG No scripts with a .ps1 extension were found.
    2013-11-21 18:28:10 +05:30 INFO Looking for any configuration transformation files
    2013-11-21 18:28:10 +05:30 DEBUG Start tranformation to 'C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\MailingService.WebService\Web.config'.
    2013-11-21 18:28:10 +05:30 DEBUG Source file: 'C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\MailingService.WebService\Web.config'.
    2013-11-21 18:28:10 +05:30 DEBUG Transform file: 'C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\MailingService.WebService\Web.Release.config'.
    2013-11-21 18:28:10 +05:30 DEBUG Executing RemoveAttributes (transform line 8, 18)
    2013-11-21 18:28:10 +05:30 DEBUG on /configuration/system.web/compilation
    2013-11-21 18:28:10 +05:30 DEBUG Applying to 'compilation' element (source line 91, 6)
    2013-11-21 18:28:10 +05:30 DEBUG Removed 'debug' attribute
    2013-11-21 18:28:10 +05:30 DEBUG Removed 1 attributes
    2013-11-21 18:28:10 +05:30 DEBUG Done executing RemoveAttributes
    2013-11-21 18:28:10 +05:30 INFO Looking for appSettings and connectionStrings in any .config files
    2013-11-21 18:28:10 +05:30 DEBUG Scanning configuration file: C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\MailingService.WebService\Web.config

    2013-11-21 18:28:10 +05:30 INFO The package has been installed to: C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15
    2013-11-21 18:28:10 +05:30 DEBUG If you would like the package to be installed to an alternative location, please specify the variable 'RedGatePackageDirectoryPath'
    2013-11-21 18:28:10 +05:30 DEBUG Looking for PowerShell scripts named Deploy.ps1
    2013-11-21 18:28:10 +05:30 DEBUG No scripts with a .ps1 extension were found.
    2013-11-21 18:28:10 +05:30 INFO Updating IIS website Default Web Site (virtual directory: MailingService). You can use the RedGateWebSiteName project variable to override an IIS site name. If you don't specify the variable, the package name is used.
    2013-11-21 18:28:10 +05:30 INFO The IIS website Default Web Site (virtual directory: MailingService) has had its path updated to: 'C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\MailingService.WebService'. You can use the RedGateWebSiteName project variable to override an IIS site name. If you don't specify the variable, the package name is used.
    2013-11-21 18:28:10 +05:30 INFO Deleting package: C:\ProgramData\Red Gate\DeploymentAgent\Applications\Dev\Shipboard.MailingService\1.0_15\Shipboard.MailingService.1.0.nupkg
    2013-11-21 18:28:10 +05:30 DEBUG Looking for PowerShell scripts named PostDeploy.ps1
    2013-11-21 18:28:10 +05:30 DEBUG No scripts with a .ps1 extension were found.
    Thanks
    Sandeep Gupta
  • The website name is still referencing it within the default site:

    [RedGateWebSiteName] = 'Default Web Site/MailingService'

    Note that when you change the value of a variable, you need to create a new release for those to take effect. Can you try that?
    Systems Software Engineer

    Redgate Software

  • which variable value i want to change?

    i have changed the value of the Pool there is no Pool is created on target Machine.
    Thanks
    Sandeep Gupta
  • The website name, as in my previous message - so instead of 'Default Web Site/MailingService' it's just 'MailingService'

    Then, because the default site is stopped, it'll create a new MailingService site on Port 80 instead and (hopefully) the new application pool.
    Systems Software Engineer

    Redgate Software

  • now it gives an error

    2013-11-21 20:06:10 +05:30 ERROR 4.0 is not a valid .Net version to create an application pool.
    Thanks
    Sandeep Gupta
  • yes, you are right for update Website name by removing the Default Web site,, but now problem is when it comes under the category of Default Web Site then all services run on Port 80..
    Now the port 80 Can't work on this type of publishing...
    Thanks
    Sandeep Gupta
  • OK, I've now tested this myself.

    Did your deployment succeed or error? Initially I had an error. The .NET version for the application pool needs the "v" in front of it. So I created these variables:

    2aifo7p.png

    And this correctly created the site within default web site and the app-pool:

    wboqdx.png
    Systems Software Engineer

    Redgate Software

  • thnxs.... Now i have created successfully application pool and Deployed service under the Default Web Site.

    :):):):):)
    Thanks
    Sandeep Gupta
  • Good to hear!
    Systems Software Engineer

    Redgate Software

  • Another question is that i have created the PreDeploy.ps1 file.
    Can you please tell me that which location it is placed, so it is execute when Deployment is under process.
    Thanks
    Sandeep Gupta
  • As long as it's included in your package, it should get picked up. Generally you'd place it in the root of the package.

    If you're creating your website package using our visual studio add-in for example, just ensure your script is set to 'Content' as the build action in Visual Studio, and it should be included.
    Systems Software Engineer

    Redgate Software

  • Sandeep GuptaSandeep Gupta Posts: 56
    edited November 25, 2013 12:13AM
    Please see in the picture

    2nimcnq.jpg

    It's a solution of service.. now which location it is placed?
    Thanks
    Sandeep Gupta
  • Just add it as a new file alongside your web.config
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.