Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Excepton updating multiple applicationPools #324

Open
fjOngoing opened this issue Oct 3, 2023 · 0 comments
Open

Unhandled Excepton updating multiple applicationPools #324

fjOngoing opened this issue Oct 3, 2023 · 0 comments

Comments

@fjOngoing
Copy link

IIS.Administration does not handle multiple updates.
Because IIS configuration is all saved to a file only 1 update at a time can open and edit the file.

2 API calls that changes that file causes an unhandled exception
An unhandled exception has occurred while executing the request.

Exception:
System.IO.FileLoadException: Filename: \?...\inetsrv\config\applicationHost.config
Error: Cannot commit configuration changes because the file has changed on disk

at Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager.CommitChanges()
at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
at Microsoft.Web.Administration.ServerManager.CommitChanges()
at Microsoft.IIS.Administration.WebServer.MgmtUnit.Commit()
at Microsoft.IIS.Administration.WebServer.AppPools.AppPoolsController.Patch(String id, Object model)
at lambda_method115(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.IIS.Administration.WebServer.Injector.ProceedNoTransaction(HttpContext context)
at Microsoft.IIS.Administration.WebServer.Injector.Invoke(HttpContext context)
at Microsoft.IIS.Administration.HeadTransform.Invoke(HttpContext context)
at Microsoft.IIS.Administration.Startup.<>c.<b__4_0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.IIS.Administration.Security.Authorization.AuthorizationPolicyMiddleware.Invoke(HttpContext context, IAuthorizationService authorizationService)
at Microsoft.IIS.Administration.Cors.CorsExtensions.<>c.<b__0_2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.IIS.Administration.Cors.CorsExtensions.<>c__DisplayClass0_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.IIS.Administration.ErrorHandler.Invoke(HttpContext context)
at Microsoft.IIS.Administration.ErrorHandler.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant