I am looking to create new virtual directories on a remote server and set the app pool to a configuration other than the default. I am using NAnt but open to any other commands that can accompolish this.
Here is what I have tried:
<mkiisdir iisserver="${remote.server}" dirpath="${install.path}" vdirname="${vir.dir.name}" />
The above works fine in creating the VD to a remote server but the nant task does not have a parameter for specificing the application pool. Strange as to why not !!
I looked into using powershell to update the application pool since I already have the Virtual Directory created but due to my Windows OS restrictions I am unable to install the WebAdministration module which is required to update the IIS app pool.
Is there any existing method to accompolish this that I have not considered?
Thanks.
You can use AppCmd.exe which is located in the System32 folder.
appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"
If you need to Update the web applications directories on other servers remotely, then you can use PSExec \\RemoteServerHostname appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"
Related
I´m trying to install JBOSS EAP 7.4 on Windows Server as a service and I´m having trouble with two issues. All batch files where executed from the command line (cmd.exe) in admin mode.
Installation of Service with local system account
I´m using the service.bat to install it as a service. When checking in the properties of the service for the user context, it says it was installed under a Local Service user.This leads to numerous errors in the startup log, as the service is not allowed to access the file system in R/W mode. Manually setting this to “Local System Account” solves the problem, it runs just fine.
So, how do I configure the installation script that the service will use “Local System Account” or, how can I grant R/W access to this “Local Service”?
Shutdown
The manual states, that you must use the parameter /jbossuser (and password) for the installation. If I don´t, it is not possible to shut down the service via the Windows Services Tool, timeout…
If I add a user to the installation, it can be shutdown. As long as it runs in the “Local Service” context. If I change it to Local System Account, it doesn´t shutdown anymore, timeout…
Beside, this is a productive installation on a virtual server. It will not be possible to have a permanent, dedicated user on such a machine.
How do I configure this correctly?
Current installation params, generated by the service.bat:
"D:\jboss-eap-7.4.6\jboss-eap-7.4\bin\prunsrv.exe" install MyApp
--DisplayName=MyApp
--Description="JBoss Enterprise Application Platform 7"
--LogLevel=INFO
--LogPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\standalone\log"
--LogPrefix=service
--StdOutput=auto
--StdError=auto
--StartMode=exe
--Startup=manual
--StartImage=cmd.exe
--StartPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\bin" ++StartParams="/c#set#NOPAUSE=Y#&&#standalone.bat#-Djboss.server.base.dir=D:\jboss-eap-7.4.6\jboss-eap-7.4\standalone#--server-config=standalone.xml"
--StopMode=exe
--StopImage=cmd.exe
--StopPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\bin"
++StopParams="/c jboss-cli.bat --controller=localhost:9990 --connect --user=ABC --password='12345' --command=:shutdown"
Any help is appreciated!
I have a program that builds with Delphi and It uses MySQL for DB in Windows 10. I install Devserver 17 but it can not be run in windows startup. I need to run Devserver before my program. I searched on google and used some tips but my problem still alive. for example I use "shellexecuteEx" for run Devserver (run-devserver.exe) when my program start ( on FormCreat event) but it has a delay that is not good for me and give me a new PROBLEMS!. After running the "run-devserver.exe" with "shellexecuteEx", the Http server and database server aren`t running! if I run them manually everything is ok but I want all of them (Devserver and HTTP server and database server) to start automatically before my program.
I use "shellexecuteEx" to execute "eds-dbserver.exe" too but it not working.
I think to avoid a chain of problems I should solve the first problem that is running Devserver and HTTP Server and Database server in Windows StartUp in Windows 10.
I used some tips that not worked for me (in the below):
-Using "shellexecuteEx",
-Run as Administrator,
-change "eds.ini" file : set "Autostart_httpserver=1" and "Autostart_dbserver=1"
-check the windows and antivirus firewall rules
-Run Programs Automatically Using Windows Task Scheduler
please give me a new way.
I had to uninstall devserver 17 and install it again. I put a shortcut of "run-devserver.exe" in the startup folder in this address: "C:\Users\MyPCName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup". the Devserver started on windows startup but HTTP server and database server didn't start. i put a shortcut of dbserver and httpserver to the startup folder too and everything is ok!
dbserver address : C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\dbserver\mysqlxxxx\bin\eds-dbserver.exe
http server address :
C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\httpserver\apachexxxx\bin\eds-httpserver.exe
I'm running Arch with a Windows 10 virtual machine and I'm trying to run an IIS server with an application in a shared folder. When I try to browse to it, I'm given a 500.19 error "cannot read configuration file". I know the application works under a normal Windows environment but I need the application to be in a shared folder under a virtual machine.
The shared folder is located in /home/hayden/virtual/shared.
What am I doing wrong?
Does IIS have permission to the folder? See this post on how to do that.
I would like to write a script and run it from my local PC to stop and start an application pool and site that exists on a server.
Value of App Pool and Site - Test
Value of server - SERVER1
Any guidance would be much appreciated.
Run Command Prompt with Administrative rights, and type the following:
C:\Windows\System32\inetsrv\appcmd start apppool /apppool.name:"MYAPPPOOLNAME"
or use the stop command. You could save this in a batch file, but it must be executed with higher privileges.
For the application pool on a remote server, you could use PsExec:
Psexec \\{Computer Name of ISS7 Server} C:\Windows\System32\inetsrv\appcmd recycle apppool my-app-pool
How to enable windows authentication on iis 8 on a Win2k12 machine using cmd ? I am running and MVC website on a server and not able to access it from the client with Error : 500 Internal Server error
Read this article but it doesn't work on Win2k12 machine http://technet.microsoft.com/en-us/library/cc754628(v=WS.10).aspx
For IIS8, you need to specify the website's name within the command, for example:
appcmd set config "Default Web Site" /section:windowsAuthentication /enabled:true
Source: Appcmd.exe (IIS 8) reference.