| Previous | Next |
| FWP_E_DYNAMIC_SESSION_IN_PROGRESS | FWP_E_NO_TXN_IN_PROGRESS |
FWP_E_WRONG_SESSION
FWP_E_WRONG_SESSION means that the caller is trying to manage a dynamic-session object from a different session. Dynamic WFP objects are owned by the session that created them; opening another handle to the same engine does not transfer that ownership.
Common source of the error
It appears when cleanup is deferred to a new process, when a service reconnects after losing its original handle, or when one component creates dynamic policy and another component attempts to change or remove it. A long-lived ID stored in a file or registry value does not solve the ownership rule.
What to do
- Use the original dynamic session to modify or delete objects that it created.
- For policy that must be administered across process restarts, create it through the proper persistent or non-dynamic lifecycle.
- After a dynamic session ends, regard its objects as automatically cleaned up and recreate the needed state from declarative configuration.
Microsoft: WFP error codes · Microsoft: dynamic-session deletion rules · Microsoft: sessions and object lifetime
Looking for a different code? Search another status or error code.