I am seeing this error:
Unable to cast object of type ‘System.Web.Profile.DefaultProfile’ to type ‘ProfileCommon’.
on following code:
ProfileCommon p = (ProfileCommon)ProfileCommon.Create(TextUsername.Text, true);
I am not sure why…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Agree with theChrisKent.It’s look like problem in the web.config
Check out the following example for,How to get ProfileCommon object in asp.net
File: Default.aspx.cs
File: Web.config
EDIT
This example only work when the project type is website.If you want to use ProfileCommon object in Web Application then go through the following link
Converting Profile Object Code
EDIT -II
As per your comment,Following link might help you
ASP.NET Profiles in Web Application Projects