Strange behaviour with StructureMap / ASP.MVC / Visual Studio / LinqToSql

前端 未结 4 1582
梦如初夏
梦如初夏 2020-12-18 05:45

I have been using the new MVC framework with StructureMap recently and have had good results overall, however, I keep running into a very strange error that I cannot underst

4条回答
  •  伪装坚强ぢ
    2020-12-18 06:19

    Add:

    MultipleActiveResultSets=True
    

    To the end of your connection string (assuming MSSQL 2005+)

    To do this for your linq context: Open the properties tab -> Expand Connection -> Click the "..." on 'Connection String' -> 'Advanced' -> 'MultipleActiveResultSets' -> true.

    I solved this one myself today and my architecture is almost identical (save for unity instead of structure map). Including the two controllers being loaded via JS!

提交回复
热议问题