I am using IIS 8 in my machine.
I want to execute the appcmd command in command prompt as Normal user.
While executing this command I got the error as below,
c:\Windows\System32\inetsrv>appcmd.exe list wp
I get this error message:
The WAS service is not available - try starting the service first.
It works if I open the command prompt as administrator.
How can I achieve this as normal user?
Is there a way to get the application pool name of a worker process from C++ ?
Appcmd is not intended for non-admin use:
Appcmd.exe is intended for local management of the Web server [...]
and requires the user to have administrative privileges when using it.
If you require remote management or the ability to configure the Web
server without being an administrator on the server, you need to use
the remote delegation support that IIS Manager provides.
from Internet Information Services (IIS) 7.0 Resource Kit by
Volodarsky et al., Microsoft Press (2008).
To solve your problem, you will probably be interested to investigate the remote delegation features they mention.
Related
I'm working with WSO2 Identity Server and I'm curious if there is a way to run the product in developer mode without building each component of identity server. I found a way to start the "My Account" component in dev mode by following this tutorial ( https://is.docs.wso2.com/en/5.11.0/develop/setting-up-my-account-in-a-dev-environment/ )
but I want to be able to modify different components such as recovery-portal and authentication-portal by forking and cloning the required github repositories and starting the entire app in developer mode in order to see the code changes in real-time.
AFAIK the developer mode will work only for the MyAccount and Console. You can refer to the doc for more details on that.
The recovery portal, the authentication portal etc. cannot be tried with the developer mode. However, there are two ways that you can try this.
Build the war files manually and add them to the WebApps directory. If the server is running, war file changes will automatically get deployed. If the server is not running, you have to delete the existing directory and restart the server.
You can do the changes to the JSPs that are deployed inside the pack. Once the changes are done, you can save the changes and the changes will automatically get deployed.
I have C++ application running as service. And I want to start my NSIS installer silently from that service. Is it possible? If yes how can I achieve this?
If you want to start the installer as the same user as your service and this service runs at integrity level high or system then you can just use CreateProcess or ShellExecute to start the installer.
If you want to start the installer as a user that is currently logged in you need to use CreateProcessAsUser but things get complicated if you go this route. There might not be any logged in users or there might be more than one. Once you have decided which user you want to start the process as then you can get their token with WTSQueryUserToken.
Is there a way in C++ to set the Windows system proxy with authentication credentials so it would affect all running programs(browsers, etc...) immediatly but:
Not requiring restarting any browser
Not requiring browser-reauthentication
I am looking really for a system level pre-authenticated proxy.
Thank you for any help. Ask any questions if something is unclear.
Using: c++11, Windows 7
EDIT 1: I need to set this programmatically, so please do not suggest any manual actions.
EDIT 2: Partially acceptable is a way how to set proxy programmatically without pre-authentication but still keeping 1. requirement (Not requiring restarting any browser)
System-level proxy settings are located in registry under \Software\Microsoft\Windows\CurrentVersion\Internet Settings hive in HKLM for all users and HKCU hive for current user.
There is an official instruction how to change it via REG file, you does not need to write any code.
But the main problem is: any application may have its own proxy settings, where it 1) can prefer system level settings but allow to override it by user, 2) not using system settings at all.
In corporate environments this problem solves as:
Internet gateway not allowed directly access to external network any computer except proxy server (Microsoft ISA/Forefront Web Proxy)
Proxy settings in registry are forced to all computers via Group Policies
If user need to run application which can not use system-wide proxy settings - it need to install ISA Firewall Client which intercepts all traffic and authenticate it on the ISA proxy.
So when you use full Microsoft software stack - you still not need to write any code :-)
Moreover, ISA Firewall Client uses undocumented Windows features and it will be too hard to write something to replace it with your own "C++11" skills.
I am currently experimenting with using Fiddler 2 to monitor web service requests. I would like to know if it is possible to pick up the sessions from a program run via the command prompt in Windows 7. I have tried configuring the command prompt to use the local host proxy using the following:
netsh winhttp set proxy 127.0.0.1:8888
This doesn't seem to have made a difference though since running the program (a simple sample from the Axis2C install which communicates with a Yahoo web service) still produces no session in Fiddler. I would appreciate any help anyone can give on setting this up to work.
http://www.fiddler2.com/fiddler/help/hookup.asp explains how to hook various HTTP stacks to Fiddler. It sounds like you've ruled out WinINET and WinHTTP; you should ask the maintainers of "Axis2C" what network stack it uses.
How can I debug asmx webservices running on IIS? I read that I must Attach to process called aspnet_wp or w3wp. But I can not find these processes... I selected checkbox show processes from all users but still nothing. What can be wrong?
regards
If your service is not running, then there might not be a worker process running. Start your service by accessing it from the browser, of use "View In Browser" from inside of Visual Studio.
It may not be what you are looking for, but can't you run your project from visual studio first? I usually do it that way before going to IIS.
Or does your project run fine on VS and an other way with IIS? I personnaly never done it myself since I debug all my code in local.
As far as remote and local IIS debugging are concerned, I think you can check on this site CodeProjectI and CodeProjectII. The author claims to be a former MVP in ASP.NET, should be useful.
You have to be logged onto the machine that runs web service. You would need a debugger installed on that machine.
If that is not possible, you can install remote debugger for VS on the server. To install remote debugger you just need to copy msvsmon.exe from your VS installation CD or from machine where VS is already installed and start it.
Then when you attach to proccess from your machine you can type in the name of your remote server and click Browse. You should be able to see all proccess that are running on remote server. You would need administrative or Debugger rights on that server.