Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

Security getting lost when accessing EF6 over WCF

$
0
0

Firstly let me apologise as I don't believe it is a CSLA issue but an EF6 one.

I am using CSLA 4.5, EF6 and WCF with IIS Express in VS2012.

My problem is whenever I add a record in a dataportal_insert EF6 clears the user security so when the response goes back to the client the o:security section of the message is missing which can be seen using svctraceviewer.exe in all prior messages.

if I comment out the add and savechanges lines all works.

        public void Insert(ProductData productData)
        {
            using (var ctx = DbContextManager<DatabaseContext>.GetManager())
            {
                ctx.DbContext.Products.Add(new Product().InjectFrom(productData) as Product);
                ctx.DbContext.SaveChanges();
            }
        }

I had originally thought it was my web.config settings but after trying countless configs and getting the same results I am now at a loss.  It's Friday and I have spent the last 4 days trying to figure it out and am scared of facing this problem again come Monday.

Any guidance would severely be appreciated.


Viewing all articles
Browse latest Browse all 764

Trending Articles