Profile data is being stored as blobs, can't retrieve
Profile data is being stored as blobs, can't retrieve
String data is being saved as blobs in aspnet_profiles propertyvaluesstring column. Is this wrong?
Problem is that i can't retrieve profile values.
How should fields be coded in web.config?
Tried:
and also tried:
aspx code:
aspx.cs code to save:
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
// this saves data as blob
}
aspx.cs code to get:
protected void Page_Load(object sender, EventArgs e)
{
if ( !IsPostBack )
{
FirstNameTextBox.Text = Profile.FirstName;
// returns empty string
}
}
also, please provide an example line that shows how to code other data types, for example int, in the profile properties. Is it -
or
or?
thanks
Problem is that i can't retrieve profile values.
How should fields be coded in web.config?
Tried:
and also tried:
aspx code:
aspx.cs code to save:
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
// this saves data as blob
}
aspx.cs code to get:
protected void Page_Load(object sender, EventArgs e)
{
if ( !IsPostBack )
{
FirstNameTextBox.Text = Profile.FirstName;
// returns empty string
}
}
also, please provide an example line that shows how to code other data types, for example int, in the profile properties. Is it -
or
or?
thanks
Web.config file section should look like this:How should fields be coded in web.config?
Code: Select all
What version of MySQLDirect do you use? Try to use the latest one from our site.FirstNameTextBox.Text = Profile.FirstName;
// returns empty string
The history.html file says 3.50.13 19.09.06, not sure where else to check for version. The code on the web.config is identical to your post.
This was on a PC using Visual Web Developer.
Have since moved to a box using Visual Studio 2005 Professional and we are using Web Application Projects. In this project it requires
type="CoreLab.MySql.Web.Providers.MySqlProfileProvider, CoreLab.MySql.Web, Version=3.50.13.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
instead of
type="CoreLab.MySql.Web.Providers.MySqlProfileProvider"
otherwise when run it gives error: Could not load type 'CoreLab.MySql.Web.Providers.MySqlMembershipProvider'
Also in this project the Profile class object is not recognized in the .cs file at all.
This was on a PC using Visual Web Developer.
Have since moved to a box using Visual Studio 2005 Professional and we are using Web Application Projects. In this project it requires
type="CoreLab.MySql.Web.Providers.MySqlProfileProvider, CoreLab.MySql.Web, Version=3.50.13.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
instead of
type="CoreLab.MySql.Web.Providers.MySqlProfileProvider"
otherwise when run it gives error: Could not load type 'CoreLab.MySql.Web.Providers.MySqlMembershipProvider'
Also in this project the Profile class object is not recognized in the .cs file at all.
If you refer to MySqlProfileProvider, why VS swears about MySqlMembershipProvider? Please clarify.In this project it requires type="CoreLab.MySql.Web.Providers.MySqlProfileProvider, CoreLab.MySql.Web, Version=3.50.13.0, Culture=neutral, PublicKeyToken=09af7300eec23701" instead of type="CoreLab.MySql.Web.Providers.MySqlProfileProvider"
otherwise when run it gives error: Could not load type 'CoreLab.MySql.Web.Providers.MySqlMembershipProvider'
What do you mean? VS gives you compile error?Also in this project the Profile class object is not recognized in the .cs file at all.
To clarify, I have 2 problems at this point.
1 - As stated in my original post, on my first project, String data is being saved as blobs in aspnet_profiles propertyvaluesstring column. Problem is that i can't retrieve profile values. Looks like I have the newest CoreLab software - 3.50.13. Why can't I retrieve profile values?
2 - In the 2nd project, using Visual Studio 2005 Professional and Web Application Projects, I can't use the Profile object in the .cs file. This code:
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
// this saves data as blob
}
gives this compile error: The name 'Profile' does not exist in the current context. Any ideas? Is there something more needed with Web Application Projects?
1 - As stated in my original post, on my first project, String data is being saved as blobs in aspnet_profiles propertyvaluesstring column. Problem is that i can't retrieve profile values. Looks like I have the newest CoreLab software - 3.50.13. Why can't I retrieve profile values?
2 - In the 2nd project, using Visual Studio 2005 Professional and Web Application Projects, I can't use the Profile object in the .cs file. This code:
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
// this saves data as blob
}
gives this compile error: The name 'Profile' does not exist in the current context. Any ideas? Is there something more needed with Web Application Projects?
I've sent you CoreLab.MySql.Web.dll. This bug is fixed in it.Looks like I have the newest CoreLab software - 3.50.13. Why can't I retrieve profile values?
If you create ASP.NET Web Site project Profile property should be recognized by compiler. What version of Visual Studio do you use?I can't use the Profile object in the .cs file.
OK, I have spent the last hour trying to add the DLL to the GAC. Can't find the gacutil. But it doesn't matter unless my 2nd issue can be resolved.
2nd issue:
I am using Visual Studio 2005 Professional Edition - version 8.0.50727.42
But we are not using an ASP.NET Web Site project, we are using an ASP.NET Web Application Project. This is an ASP.NET 2.0 project, which uses a similar project model as .net 1.1.
See http://msdn.microsoft.com/vstudio/defau ... ml/WAP.asp
In this project, the membership stuff works fine, but the Profile object is not available. See previously mentioned error message. Am I doing something wrong? Or has CoreLab tested profiles with this project type?
We are evaluating the software and need to know the situation.
thanks
2nd issue:
I am using Visual Studio 2005 Professional Edition - version 8.0.50727.42
But we are not using an ASP.NET Web Site project, we are using an ASP.NET Web Application Project. This is an ASP.NET 2.0 project, which uses a similar project model as .net 1.1.
See http://msdn.microsoft.com/vstudio/defau ... ml/WAP.asp
In this project, the membership stuff works fine, but the Profile object is not available. See previously mentioned error message. Am I doing something wrong? Or has CoreLab tested profiles with this project type?
We are evaluating the software and need to know the situation.
thanks
Found the problem.
With the VS 2005 Web Site Project option, Visual Studio dynamically creates and adds a "ProfileCommon" class named "Profile" into every code-behind instance.
VS 2005 Web Application Projects don't automatically support generating a strongly-typed Profile class proxy. However, you can use the following free download to automatically keep your own proxy class in sync with the profile configuration.
http://www.gotdotnet.com/workspaces/wor ... f135df4127
With the VS 2005 Web Site Project option, Visual Studio dynamically creates and adds a "ProfileCommon" class named "Profile" into every code-behind instance.
VS 2005 Web Application Projects don't automatically support generating a strongly-typed Profile class proxy. However, you can use the following free download to automatically keep your own proxy class in sync with the profile configuration.
http://www.gotdotnet.com/workspaces/wor ... f135df4127
After testing this more and using the newest CoreLab.MySql.Web.dll sent to me, I've realized it doesn't always work.
When the profile data is added, there is a new aspnet_users record created which doesn't have a matching userid as the existing aspnet_users and aspnet_membership records for this user. A aspnet_profiles record is added with a userid that matches the newly created aspnet_users record and doesn't match the existing aspnet_users record.
This seems wrong, and I'm surprised profile data is ever able to be retrieved. Sometimes it can't be.
When a aspnet_profiles record is added, it's userid should match the existing aspnet_users record and no new aspnet_users records should be created.
This is happening with Visual Web Developer and Visual Studio 2005 Professional.
My code is basically like this:
protected void Page_Load(object sender, EventArgs e)
{
if ( !IsPostBack )
{
FirstNameTextBox.Text = Profile.FirstName;
}
}
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
}
When the profile data is added, there is a new aspnet_users record created which doesn't have a matching userid as the existing aspnet_users and aspnet_membership records for this user. A aspnet_profiles record is added with a userid that matches the newly created aspnet_users record and doesn't match the existing aspnet_users record.
This seems wrong, and I'm surprised profile data is ever able to be retrieved. Sometimes it can't be.
When a aspnet_profiles record is added, it's userid should match the existing aspnet_users record and no new aspnet_users records should be created.
This is happening with Visual Web Developer and Visual Studio 2005 Professional.
My code is basically like this:
protected void Page_Load(object sender, EventArgs e)
{
if ( !IsPostBack )
{
FirstNameTextBox.Text = Profile.FirstName;
}
}
protected void SubmitButton_Click(object sender, EventArgs e)
{
Profile.FirstName = FirstNameTextBox.Text;
}
Found my problem.
First I added the ApplicationName="/" attribute to the providers section for membership and profiles in the web.config. I tried applicationName previously which gave me an error.
The other problem was related to how I was using the .net framework add-in mentioned earlier in this thread for Web Application Projects.
thanks
First I added the ApplicationName="/" attribute to the providers section for membership and profiles in the web.config. I tried applicationName previously which gave me an error.
The other problem was related to how I was using the .net framework add-in mentioned earlier in this thread for Web Application Projects.
thanks