Sunday 15 September 2013

c# - WCF with StructureMap: Operation could destabilize the runtime -



c# - WCF with StructureMap: Operation could destabilize the runtime -

i encountered weird error when used wcf structuremap.

i tried search stack , there answers recommend install hotfix: operation destabilize runtime in structuremap

but cannot install hotfix due "software update kb2748645 installation wizard not apply, or blocked status on computer. please click link below more details."

public class structuremapinstanceprovider : iinstanceprovider { private readonly type _servicetype; public structuremapinstanceprovider(type servicetype) { _servicetype = servicetype; } public object getinstance(instancecontext instancecontext, message message) { homecoming objectfactory.getinstance(_servicetype); // error thrown here } } an exception of type 'structuremap.structuremapconfigurationexception' occurred in structuremap.dll not handled in user code. operation destabilize runtime. additional information: attempting create build plan concrete type profileservice 1.) attempting create buildplan instance of profileservice -- profileservice 2.) container.getinstance(profileservice)

stacktrace

@ structuremap.building.concretetype.sourcefor(string ctororsetter, string name, type dependencytype, object value) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\building\concretetype.cs:line 200 @ structuremap.building.concretetype.<>c__displayclass4.<buildconstructorstep>b__3(parameterinfo x) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\building\concretetype.cs:line 112 @ system.linq.enumerable.whereselectarrayiterator`2.movenext() @ structuremap.stringextensions.each[t](ienumerable`1 enumerable, action`1 action) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\extensions.cs:line 10 @ structuremap.building.constructorstep.add(ienumerable`1 dependencies) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\building\constructorstep.cs:line 79 @ structuremap.building.concretetype.buildconstructorstep(type pluggedtype, constructorinfo constructor, dependencycollection dependencies, policies policies) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\building\concretetype.cs:line 115 @ structuremap.building.concretetype.buildsource(type pluggedtype, constructorinfo constructor, dependencycollection dependencies, policies policies) in c:\buildagent\work\996e173a8ceccdca\src\structuremap\building\concretetype.cs:line 27

i don't understand error, , cannot find from. i'm opening suggestion.

after day of messing around, workaround (not resolution):

in visual studio (i'm using 2013), go to:

tools -> options -> intellitrace -> general -> unchoose intellitrace events , phone call information (or take intellitrace events only)

i don't know why alternative caused problem. workaround worked fine me. can find same problem here: https://www.devexpress.com/support/center/question/details/q512306

quoted

outro56 2 years ago ok, think may have found workaround per q262635, has intellitrace; changing intellitrace settings "intellitrace events only" able around problem (i.e. tools->options->intellitrace->general)

c# wcf ioc-container structuremap structuremap3

No comments:

Post a Comment