Click here to Skip to main content
15,881,701 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Developers,

Hope everybody doing well ..

I'm trying to work with ASP.net membership also integrated with my APP,
first I've created a sample web app to create the new users to membership table

I've Added the membership tag to web.config and change the connection string to my Database connString also I set ApplicationName to "\".

then I added "CreateUserWizard" control with the following code:

C#
Membership.CreateUser(CreateUserWizard1.UserName,CreateUserWizard1.Password,CreateUserWizard1.Email);


But when I run the code, I have the following exception Confused | :confused: :

http://www.m5zn.com/newuploads/2015/03/21/jpg//9a5f11556559e6b.jpg

Anyone help please :(
Posted
Comments
phil.o 21-Mar-15 14:58pm    
What happens if you try to give your application a meaningful name?
And could you post the exception message as string, please?
fahd951 21-Mar-15 15:36pm    
phil.o thanks for the reply ..
I already set the application name in web.config file with the value "\"
what is the best way to define application name ?

This is the exception I have: SqlException (0x80131904)
Dave Kreskowiak 21-Mar-15 16:44pm    
That's not the exception message. That's the exception type. What's the message?
fahd951 21-Mar-15 16:48pm    
Thanks, I got the solution ..
Afzaal Ahmad Zeeshan 21-Mar-15 16:51pm    
The exception message was, Invalid column name ApplicationName. I have posted the solution to this answer. Please see Solution 1.

1 solution

You should try wrapping the name between [] and then trying it again. Such as, [ApplicationName] and then try. If doesn't work, please change the column's name inside your database table and try something else.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900