I'm working on a new section for the backend and I have a small issue.
In a grid (jqGrid) I want to diplay some data. I get the data via linq and I want to get the email from the membership provider (the membership table itself is in another DB).
I use the following code:
PaymentsDataContext data = newPaymentsDataContext();
Can't see anything wrong right now, but a good test would be to check whether GetUser() is working as expected... So, don't pass act.userName but start with a userName you know it's in the db and find out whether it's returning some info. If it doesn't, than you know it's a problem on the Membership side of things, otherwise it'll be your code which is not correct.
Membership DB access from backend section
Hi,
I'm working on a new section for the backend and I have a small issue.
In a grid (jqGrid) I want to diplay some data. I get the data via linq and I want to get the email from the membership provider (the membership table itself is in another DB).
I use the following code:
When I run this code I get a NullReferenceException. I should be able to access the membership provider from the backend, right?
Any one see what I'm missing?
Thank you!
Can't see anything wrong right now, but a good test would be to check whether GetUser() is working as expected... So, don't pass act.userName but start with a userName you know it's in the db and find out whether it's returning some info. If it doesn't, than you know it's a problem on the Membership side of things, otherwise it'll be your code which is not correct.
Cheers,
/Dirk
Well... turns out that I should have check that there even was a logged in user before searching for their username :)
That was the issue, not the code I posted.
Silly me... Sorry.
is working on a reply...