Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    I have permission error when deploy the build on the IIS

    Scheduled Pinned Locked Moved Support
    5 Posts 2 Posters 16 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      manager_7279
      last edited by

      Its .NET app and build are working fine but when I tried to deploy it on IIS I got this error.
      I have given full permission to the site folder as well but still the same error. I am using Windows Server 2019 Standard.
      I tried to use IIS::Stop-Site Script as well but same error there as well.

      Error: Unhandled exception: System.UnauthorizedAccessException: Access is denied. (0x80070005 (E_ACCESSDENIED))
      at Microsoft.Web.Administration.Interop.IAppHostProperty.get_Value()
      at Microsoft.Web.Administration.ConfigurationElement.GetPropertyValue(IAppHostProperty property)
      at Microsoft.Web.Administration.ApplicationPool.get_State()
      at Inedo.Extensions.Windows.Operations.IIS.AppPools.AppPoolJob.StopAppPoolAsync(ApplicationPool pool, CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E361574\Src\Windows\InedoExtension\Operations\IIS\AppPools\AppPoolJob.cs:line 104
      at Inedo.Extensions.Windows.Operations.IIS.AppPools.AppPoolJob.ExecuteAsync(CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E361574\Src\Windows\InedoExtension\Operations\IIS\AppPools\AppPoolJob.cs:line 37
      at Inedo.Agents.LocalJobExecuter.ExecuteJobAsync(RemoteJob job, CancellationToken cancellationToken)
      at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.OtterScriptExecuter.Inedo.ExecutionEngine.Executer.IExecutionHostEnvironment.ExecuteActionAsync(ActionStatement actionStatement, IExecuterContext context)
      
      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @manager_7279
        last edited by

        Hi @manager_7279 ,

        Stopping/Starting IIS application pools requires administrative access. Looking at your stack trace, it seems like you're trying to stop an application pool on localhost (i.e. the server that BuildMaster is running on)?

        That's not a common requirement; instead you'd stop/start an application on a different server.

        In any case, the BuildMaster service runs under NETWORK SERVICE, and will not have permission to modify IIS application pools on localhost. So if you plan to do this (i.e. stop/start IIS on localhost), then you will need to make the BuildMaster server run under LOCAL SYSTEM instead of NETWORK SERVICE.

        This will likely also require you to update database permissions, to allow LOCAL SYSTEM to connect to the database as well.

        Alana

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          manager_7279 @atripp
          last edited by

          Hi @atripp,
          Thank you so much for your answer. Actually, I am trying to stop the IIS Pool (that is connected to only 1 site) without stopping IIS pool I can't deploy artifact files.
          I tried to change the BuildMaster Service and BuildMaster Web Server to run under Local System Account but after restart service BuildMaster web app not running so I have to revert it back.

          Any suggestion?

          Thank you!

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @manager_7279
            last edited by

            Hi @manager_7279 ,

            This is likely because of a lack of database permissions; you'll need to grant permissions to the BuildMaster database in the local SQL Server database. We don't have a step-by-step guide for that, but it involves giving that user BuildMasterUser_Role permission using something like SQL Server Management Studio.

            As an alternative, you can install the Inedo agent on the BuildMaster server (defaults to Local System) and then connect to that instead of localhost.

            Cheers,
            Alana

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              manager_7279 @atripp
              last edited by

              @atripp Thank you! I was able to fix that issue. After changing the service to "Local system account" I gave full permission of Buildmaster database for the user "NT AUTHORITY\SYSTEM"

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation