MSDeploy RunCommand Priviliges - msdeploy

I am trying to use the -presync:runCommand option in MSDeploy and no matter what I try to run, I get the same error back:
Error: A required privilege is not held by the client.
I've tried a handful of items to execute, and none of them work. Ideally I want to execute an exe on the server as such:
-presync:runCommand=C:\MyExecutable.exe,dontUseCommandExe=true
I've also tried
-presync:runCommand=C:\TestScript.bat
And the sample from their documentation
-presync:runCommand="net stop w3svc"
Thanks in advance.

I found the answer, and it turns out I had already halfway completed it. In the link I provided in my question, they mention how to add privileges to the WMSvc account, like so:
sc privs wmsvc SeChangeNotifyPrivilege/SeImpersonatePrivilege/SeAssignPrimaryTokenPrivilege/SeIncreaseQuotaPrivilege
What it failed to mention is that you must restart WMSvc for this to take affect.

Related

Task `IISWebAppManagementOnMachineGroup` encounter issue "The Parameter is incorrect .. exited with code '87'"

hoping that someone can help me with my issue. I've been trying to solve this issue for a week now and still doesn't have a solution.
Here is my issue - I'm encountering the below issue when my pipeline is publishing my application in IIS (Local IIS)
Before, it's working fine and I don't know why this happen now after re-running a new pipeline. I tried to re-install my IIS and removed all MachineKeys. But still got the same error. Also, after re-installing everything, I changed the Owner of all MachineKeys installed on my machine to my account (which is an administrator).
Also, I tried to removed this in the applicationHost.config of the inetsrv as other solution I found on the internet suggestion but still got the same issue.
But then, after searching for other solution - I found out that the command that's running on my pipeline for publishing into IIS somehow causes this issue. The password parameter.
I tried the command below, on running cmd as Administrator and removing the password parameter and it works.
appcmd.exe set site /site.name:"RTP_LoginService" -applicationDefaults.applicationPool:"RTP_LoginServiceAppPool" -[path='/'].[path='/'].physicalPath:"%SystemDrive%\inetpub\wwwroot\RTP_LoginService" -[path='/'].[path='/'].userName: -[path='/'].[path='/'].password:
But still thinking why this become an issue right now as before it's working even though there's a password parameter and I don't have any changes on the Task for publishing in my local IIS as this is a default command by the Task.
Thanks you in advance to anyone who can help me and give light to my issue I'm experiencing.
Giving Credentials of Physical Path for Virtual Machine Directory can also be the trouble for this password excluding issue. Tried to reproduce the issue and got some solution for this as mentioned below.
This problem will also rise because of the corrupted IIS Configuration Key. We need to avoid the key to be corrupted by encrypting the key in applicationhost.config file.
Create another test machine and generate configuration key.
Use that key for checking.
Exporting the key
From the working IIS server we need to export the key.
aspnet_regiis -px "iisConfigurationKey" "Your path for file.xml" -pri
Import config file from created test server
aspnet_regiis -pi "iisConfigurationKey" "Your path for file.xml"
Implement AES encryption algorithm: Replace the AES Provider which is a default encryption method element from applicationHost.config and configProtectedData and restart the server.
I got this working now. So, I fixed this issue by re-installing IIS URL Rewrite as somehow it got uninstalled on my machine. After that, it now working as expected.

"svn: E170001: Authentication required" when doing "gradlew :publish"

I am setting up an Intershop development environment on Mac OS X. "gradlew checkout" worked fine, also a direct "svn update" works. This means I am svn authenticated.
However, when calling "gradlew :publish" I get the message:
A problem occurred evaluating root project 'a_responsive'.
> svn: E170001: Authentication required for ...
Any ideas how this can be solved?
This problem seems to depend on the operating system you're using and whether SVNKit is using the credentials stored in your user profile or not, but you can always fall back to either two properties or environment variables, whichever you prefer as described on the scmversion-gradle-plugin github page.
In short: Either set the project property (via -P on the commandline or in gradle.properties) scmUserName=<name> and scmUserPasswd=<password> or set the environment variables SCM_USERNAME=<name> and SCM_PASSWORD=<password> to match your SVN login credentials.
Cheers!
Try to add the following to the command line:
-Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM

IISRESET windows 10 (IIS 10) Access denied

I'm just wondering, why I get error during an iisreset in my development machine.
When I execute the command in a Command Prompt some times it wokrs,sometimes it throws an Access Denied Error, and sometimes it throws a file not found exception.
If anyone finds a solution to this anoying problem, I would appreciate a hint how to get rid of it.
In the IIS I'm just hosting an .NET 4.6.1 MVC site.
This stupid error happens randomly and was very annoying especially when you place iisreset inside a script and assume it will do its thing; took me a while to figure it out. It is not related to the service being stopped as can be seen in this picture:
The only thing I use now is:
net stop W3SVC
and
net start W3SVC
Haven't had a problem since then.
I got exactly the same error time ago. Running it in German too. Take a look at this article: https://techcommunity.microsoft.com/t5/iis-support-blog/iis-reset-issue-restart-attempt-failed/ba-p/1031976
Judging from #Giorgi Nakeuri's question about the event logs. The "World Wide Web Publishing" (called only "WWW-Publishingdienst" in German) is very likely not running. You need to start it. The "Windows activity process service" fails because of the first one failing.
I think it says that he was unable to start the service, mainly due to a Problem with authorization. The solution of the problem can be provided in several different ways
1- Configuration causing the authorization error can be corrected
applicationHost.config with XML
2- This authorization can be revoked through the Windows register. Example approach here:
https://stackoverflow.com/a/21036837/914284
3- Machine configuration can be changed in accordance with this
permission. Please continue with the option that suits you :)
https://knowledge.digicert.com/solution/SO1360
i hope it will resolve
Specifying the machine name also helps in some scenarios:
iisreset %ComputerName%

Fail- ICI_INVALID_HANDLE(0)

I see this error in my Geneos active console quite often whenever we use "SQL Toolkit" plugin, This error gets corrected whenever we restart the probe but reappears again. There is no pattern by which these error shows up.
Has anybody come across such error in Geneos and does anyone have nay solution to this?
This looks like an Oracle related error. Check that you can execute the SQL statement on command line from the server that the netprobe is running on using the account that the netprobe is running under.
Supplementary checks would be around the Environment variables like ORACLE_HOME etc.
Might be beneficial to see what SQL you are running and tagging this with ORACLE and SQL

Restarting DevStack services - Safest way

I am using devstack setup in my development environment.
I need the safest way to restarting a particular service in Devstack.
I have tried all the possible way:
I tried the screen -r command it simply shows an error message as follows:
root#devstack:/opt/devstack# screen -r
There is no screen to be resumed.
Then I have tried to open the screen as stack user, then it is showing the error as follows:
stack#devstack:/opt/devstack$ screen -r
Cannot open your terminal '/dev/pts/43' - please check.
So that I went with the final option root#devstack:/opt/devstack# ./rejoin-stack.sh
But in this case, after this command, I am getting the error as follows when I am accessing the devstack horizon.
root#devstack:/opt/devstack# ./rejoin-stack.sh
Each and every horizon page I am getting an error as above.
I can see that in screen there are many errors in many services, Someone let me know the easy and safest way for restarting of services.
rejoin command is the fastest and safest way of restarting, but restart doesn't mean that reinstalling the whole environment. you must protect the configuration of the environment. Most probably you have some problem with environment configuration and rejoin doesn't solve your problem...

Resources