Hi
I am trying to manipulation asp.net membership programmatically from a
winform app. I have added the connectionstring and membership & role setting
fragment to my app's app.config file as per this article;
http://blogs.msdn.com/msdnts/archive/2006/12/16/asp-net-2-0-membership-role-mana
gement-out-of-asp-net-context.aspx?CommentPosted=true#commentmessage
However when I try to use code like;
Dim ret As MembershipCreateStatus
in VB.net I get the error 'Type 'MembershipCreateStatus' is not defined'.
What am I doing wrong?
Thanks
Regards
Juan T. Llibre - 18 May 2008 18:49 GMT
re:
!> However when I try to use code like;
!> Dim ret As MembershipCreateStatus
!> in VB.net I get the error 'Type 'MembershipCreateStatus' is not defined'.
!> What am I doing wrong?
You need to import the System.Web.Security namespace :
<%@ Import Namespace="System.Web.Security" %>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Hi
>
[quoted text clipped - 12 lines]
>
> Regards
Alex Meleta - 18 May 2008 19:00 GMT
Hi John,
Seems it's a compilation error. Sure that you add reference to System.Web.dll
and import the namespage System.Web.Security (see the reqs at http://msdn.microsoft.com/en-us/library/system.web.security.membershipcreatestat
us.aspx)
Regards, Alex
Cowboy (Gregory A. Beamer) - 18 May 2008 23:31 GMT
Two things:
1. Make sure you have a reference to the System.Web DLL
2. Make sure you have a "imports" statement for System.Web.Security
You can set up a "global" reference in teh config, if you so desire.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
*************************************************
> Hi
>
[quoted text clipped - 14 lines]
>
> Regards