Questions tagged [web-administration]

Microsoft's API for administering IIS in .NET.

The Microsoft.Web.Administration API:

contains classes that a developer can use to administer IIS Manager. With the classes in this namespace, an administrator can read and write configuration information to ApplicationHost.config, Web.config, and Administration.config files.

The classes in the Microsoft.Web.Administration namespace contain a series of convenient top-level objects that allow the developer to perform administrative tasks. The different logical objects available include sites, applications, application pools, application domains, virtual directories, and worker processes. You can use the API to obtain and work with the configuration and state of these objects and to perform such actions as creating a site, starting or stopping a site, deleting an application pool, recycling an application pool, and even unloading application domains.

80 questions
2
votes
2 answers

Creating AppPool with username/password over Microsoft.Web.Administration

I'm using the following code to create an App Pool: var appPool = serverManager.ApplicationPools.Add(Name); appPool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser; appPool.ProcessModel.UserName =…
gsharp
  • 27,557
  • 22
  • 88
  • 134
1
vote
1 answer

What's the difference between IISAdministration and WebAdministration

Here's the docs for both modules: IISAdministration Module WebAdministration Module And here's a couple articles detailing the release notes of IISAdministration Introducing IISAdministration in the PowerShell Gallery IISAdministration…
KyleMit
  • 30,350
  • 66
  • 462
  • 664
1
vote
2 answers

Replace SSL Certificate on Remote IIS 10 server from VB.NET

I'm attempting to automate the process of renewing my SSL certificates for a few different publicly accessible endpoints. I'm using Certify the Web's Certify SSL/TLS Certificate Management to complete the CSR and SSL generation and validation via…
G_Hosa_Phat
  • 976
  • 2
  • 18
  • 38
1
vote
0 answers

Umbraco: scheduled tasks/publishing/keepalive not working

I having problem on Umbraco 7.7.6 basically server call itself for tasks/publishing/keepalive details: http://issues.umbraco.org/issue/U4-5391 the problem is that server admin is not allowing external access to internet from webserver so that…
shaadi
  • 161
  • 2
  • 4
  • 21
1
vote
0 answers

json_last_error missing on webserver

Seems my website can't backup to rackspace via updraft for some reason. In my error log I see [Mon Feb 20 16:17:38.118180 2017] [:error] [pid 3093] [client 216.31.249.71:13708] PHP Fatal error: Uncaught Error: Call to undefined function…
1
vote
0 answers

WebAdministration module does not expose their cmdlets

Given MS Server 2008 r2, IIS 7.0 upgraded to 7.5 Powershell 2.0 upgraded to 3.0 Execute command import-module WebAdministration It completes without errors. Then call get-command -module WebAdministration It discovers that only two commands are…
DotNetter
  • 426
  • 2
  • 6
  • 19
1
vote
1 answer

Ps WebAdministration called from MVC only returns info about the current website

I want something simple: List all websites (for now just on my own IIS7, but later for the serverfarm). I'd like to use powershell-4 commands, like Get-WebBinding or Get-Website, because pShell is easily executed remote on other servers. I want…
Arjan
  • 469
  • 4
  • 12
1
vote
0 answers

Getting already removed applications in site application list

I am getting the list of both removed and present sites under IIS default site. Below is my code. ServerManager server = new ServerManager(); SiteCollection sites = server.Sites; foreach (var site in sites) { …
Prashant Mohite
  • 758
  • 2
  • 7
  • 19
1
vote
2 answers

ASP.NET Web Site Administration Tool database connection error

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be…
user476896
  • 11
  • 1
1
vote
1 answer

How to register ASP.NET 4.0 for IIS using PowerShell Web Administration module?

I would like to register the ASP.NET 4.0 framework for IIS using a PowerShell script. I have previously used the aspnet_regiis.exe tool in the following way: aspnet_regiis.exe –iru This did the job, but I would like to refactor my code to use the…
sc3w
  • 1,154
  • 9
  • 21
1
vote
1 answer

Powershell: IIS, Microsoft.Web.Administration, Import-Module WebAdministration, PSSnapin WebAdministration

I use VS2010, PowerShell v2.0, Windows Server 2008 R2 Standard for create deploy scripts ps1 for web applications (IIS 7). I want manage IIS 7 (websites, appPools, virtualDirs, etc) programmatically using Powershell. I'm confused about several ways…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
0
votes
1 answer

How do I get the web sites running in the current application pool by WMI?

I am trying to find out which web sites are running an application pool. MicrosoftIISv2/WebServerSetting only offers AppPoolId property and all of the valuse are DefaultAppPool . I can see all of these application pools are running different web…
Ufuk Hacıoğulları
  • 37,978
  • 12
  • 114
  • 156
0
votes
0 answers

Getting "Can't find the drive. The drive called 'IIS' does not exist." on first request

Working on Windows Server 2019 Datacenter, $PSVersionTable.PSVersion 5.1.17763.2931 In a powershell script started as admin I have to check if an IIS AppPool exists. I used Get-Item -Path ("IIS:\AppPools\$apppoolname") -ErrorAction SilentlyContinue…
Trix
  • 1
  • 2
0
votes
1 answer

IIS: add a Deny rule to .NET Authorization

Afternoon guys, I'm working on going through some lockdowns for IIS, I need to add a Deny rule to .NET Authorizations for all anonymous users. I have this, which partially works Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT' -filter…
Fitzgery
  • 558
  • 5
  • 14
0
votes
1 answer

Add proxy element to applicationHost.config in system.webServer section via Powershell

I am trying to add element under system.webServer section. Add-WebConfigurationProperty -Filter '/system.webServer/proxy' -Name . -Value @{ enabled="true" } Above command does nothing. Add-WebConfigurationProperty -Filter…
Zergatul
  • 1,957
  • 1
  • 18
  • 28