Questions tagged [servermanager]
93 questions
45
votes
2 answers
How to access Request Monitor in IIS Server Manager?
I've just installed the "Request Monitor" role in "Server Manager",
hoping that I could watch all the HTTP requests come in and go out. Now how do I access this tool? I've never used this software before and I can't seem to find it.

mpen
- 272,448
- 266
- 850
- 1,236
11
votes
3 answers
How to revert an HttpError ConfigurationElement back to "Inherited" using IIS 7 API
Suppose I have the following collection in a web.config:
Yep, nice 'n empty.
And in IIS 7, my HTTP errors page looks like this:
Beautiful! (I've highlighted 404 simply because that's the example I'll use in…

joshcomley
- 28,099
- 24
- 107
- 147
10
votes
1 answer
ServerManager constructor crashes in test environment
I am building a control application in MVC 4 and have encountered a really annoying problem. When I debug the project locally it works fine. However, when I deploy the project to the test server (Windows Server 2008 R2) the following line…

adamfinstorp
- 1,627
- 3
- 17
- 26
8
votes
1 answer
Configure IIS authentication settings using the ServerManager class
I'm using the ServerManager class (from Microsoft.Web.Administration) to create applications on a server running IIS 7. I want to configure whether the application uses anonymous authentication or Windows-authentication on an application-basis so I…

Journey
- 1,023
- 1
- 9
- 12
8
votes
1 answer
How can I get the port by websites name via C# from IIS?
In IIS-Manager, the default web site is bound on port 80. How can I get the port by website-name, using c#? I tried the following code:
var lWebsite = "Default Web Site";
var lServerManager = new ServerManager();
var lPort =…

Simon
- 4,157
- 2
- 46
- 87
6
votes
1 answer
COMException when trying to get application pools using ServerManager
When I try to get the list of IIS application pools from a remote server using the following code
List appPools;
using (ServerManager serverManager = ServerManager.OpenRemote("XXX")) {
appPools =…

Marek Stój
- 4,075
- 6
- 49
- 50
5
votes
1 answer
ServerManager, Creating application pool, identity not set
I'm trying to create application pool using the ServerManager class. This is my code:
using (ServerManager serverManager = new ServerManager()) {
if (!serverManager.ApplicationPools.Any(p => p.Name == poolName)) {
ApplicationPool newPool =…

user2073333
- 152
- 1
- 9
5
votes
2 answers
How to determine if the "Active Directory Domain Services" role has been installed on a server
I am trying to figure out if the Active Directory Domain Services are installed a windows server.
I know they show up in the Server Manager, but can I programmatically get if the role is installed on a server using C# code

MrLister
- 634
- 7
- 32
5
votes
2 answers
Programmatically add binding on IIS 8 with SNI option
I'm trying to create bindings for IIS 8 that have the flag SNI checked (Server Name Indication) using Microsoft.Web.Administration library (.NET Framework).
This is necessary to me because I want to get multiple SSL bindings for the same website…

tittodiego
- 156
- 10
5
votes
1 answer
Adding a website to IIS7 on remote machine C#
I currently have an application written in C# that adds a website to IIS7 on the current machine and it works perfectly, the code is as follows
var iisManager = new ServerManager();
var sites = iisManager.Sites;
var site =…

Dan
- 280
- 3
- 9
5
votes
2 answers
Programmatically get site status from IIS, gets back COM error
I am trying to programmatically get my site status from IIS to see if it's stopped, but I kept getting the following error,
The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
The application is using…

Jack
- 2,600
- 23
- 29
4
votes
1 answer
ServerManager CommitChanges makes changes with a slight delay
i have a little problem with the ServerManager class (from the Microsoft.Web.Administration assembly) and i hope some of you can help me out.
Basically I need to create a new application inside a site (using IIS 7.5) and redirect the user to the new…

TestSubject
- 178
- 2
- 11
3
votes
4 answers
Adding features in Windows 2008 Server R2 in Server Manager programmatically
I am writing a program that needs .NET to run.
When I run it on Windows 2008 Server R2 it fails upon .NET 3.5 installation.
This is because in this version of Windows you can only install .NET 3.5 via Server Manager (or Role Manager).
I was…
3
votes
0 answers
ServerManger exception: value cannot be null. Parameter name: type
I try to create instance of ServerManager (Microsoft.Web.Administration.dll) to get IIS Web Applications list. Code is running on the Windows 2008 Server, ASP.NET, IIS7.
IIS located on the same machine.
But on this line
var serverManager = new…

MaxWave
- 382
- 2
- 17
3
votes
1 answer
c# Remote ServerManager & COM Surrogate footprint
I have the following method which presents IIS worker requests on a pretty webpage however every time the page is refreshed it increases the memory consumption of dllhost (COM Surrogate) on the target machine until there is no more memory…

user3057886
- 31
- 4