Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Membership Provider CreateUser not supported when running NCrunch
thomen
#1 Posted : Wednesday, December 4, 2013 5:54:28 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2013(UTC)
Posts: 1
Location: Australia

Hi Guys,
I have some legacy tests which create a user using the FormsAuthMembershipProvider

This all worked fine under NUnit but under NCrunch the CreateUser method isn't supported:
System.NotSupportedException : Specified method is not supported.
at System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status




Just wondering if there's a workaround I was thinking of wrapping and stubbing but just wanted to know if anyone else had experienced this.
Cheers,
Tom
Remco
#2 Posted : Wednesday, December 4, 2013 6:07:32 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Tom,

Thanks for posting!

NCrunch itself doesn't have any knowledge of ASP.NET or its membership providers, so my suspicion is that this is a symptom of a much deeper problem - perhaps related to the .config file being applied to your test environment, or the assemblies it is referencing.

I recommend trying to deduct the source of the problem by looking for differences between the NUnit test environment and NCrunch. Specifically, check the following:
- Are both environments loading the same .config file? You can check the .config file being used by NCrunch by right clicking on the failed test, going to Advanced->Browse To Workspace, then looking for the ncrunchconfig file in the build output directory of the shadowed project NCrunch has used for the test run
- Are both environments using the same processor architecture and version of the .NET framework? You can often tell this by checking the list of loaded modules under a debug session
- Are both environments loading the same versions of the .NET framework assemblies? Again, the list of running modules can help you here
- If you browse to the .DLL NCrunch has built for your test project (using the Advanced->Browse To Workspace option), then try loading this DLL under NUnit, what kind of result do you get?

If you haven't already, it's also worth having a skim over the test troubleshooting guide to see if there's anything here that might be causing the deeper issue.


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download