Referring to my possible answer to this question: How would you check the ASP.NET membership tables when recording that the user made changes?
Is it possible to intercept a call coming from code that you are not in ctor on a closed inner class that you do not have, in order to manipulate the object before returning?
Specific example:
SqlMembershipProviderFor all data access, it creates an instance of the auxiliary connections System.Web.DataAccess.SqlConnectionHolder.
The desired result is to intercept this instance and execute the operation on a public connection that opens in ctor System.Web.DataAccess.SqlConnectionHolderbefore continuing with the execution.
UPDATE:
So, as leppie remarked on my example, what I say, I want, is not at all what I want.
Goal now System.Web.DataAccess.SqlConnectionHelper.GetConnection()
So, is it possible to intercept the call to this method?
internal static SqlConnectionHolder GetConnection(string connectionString, bool revertImpersonation)
It is possible. If so, a brief example will be given.
source
share