K
Kirk
I have successfully, implemented a custom Membership Provider to a SQL
2000 table, however, I am having problems doing the same with a
Profile Provider.
As I understand it, the steps for both of these are similar: Create a
new class (MyMembershipProvider and MyProfileProvider). Add the
"Inherits..." value to the provider (MembershipProvider and
ProfileProvider). Modify the web.config file to assign this class and
it's connection string. (Feel free to correct me if the above is
incorrect).
I have done this for my Profile Provider, and I can't seem to "wire
up" the new class to the application. My class starts like this:
Public Class MyProfileProvider
Inherits ProfileProvider
When I type the above inherits statement, all of the methods for this
class show up, which leads me to believe this part worked. I then
modified my web.config file like this:
<profile enabled="true" defaultProvider="MyProfileProvider" >
<providers>
<add name="MyProfileProvider" type="MyProfileProvider"
connectionStringName="Data Source=myweb;Initial
Catalog=WebReport;Persist Security Info=True;User
ID=VBUser;Password=VBUser" providername="System.Data.SqlClient" />
</providers>
<properties>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="Int32"/>
</properties>
</profile>
In theory, I should be able to type "Profile.Country = ..." in VB and
get intellisense, right? When I type this, it tells me that "Country"
is not a member of "Profile"?
Am I missing an Imports statement or something else minor? I would
GREATLY appreciate any suggestions or comments. Thank you!
2000 table, however, I am having problems doing the same with a
Profile Provider.
As I understand it, the steps for both of these are similar: Create a
new class (MyMembershipProvider and MyProfileProvider). Add the
"Inherits..." value to the provider (MembershipProvider and
ProfileProvider). Modify the web.config file to assign this class and
it's connection string. (Feel free to correct me if the above is
incorrect).
I have done this for my Profile Provider, and I can't seem to "wire
up" the new class to the application. My class starts like this:
Public Class MyProfileProvider
Inherits ProfileProvider
When I type the above inherits statement, all of the methods for this
class show up, which leads me to believe this part worked. I then
modified my web.config file like this:
<profile enabled="true" defaultProvider="MyProfileProvider" >
<providers>
<add name="MyProfileProvider" type="MyProfileProvider"
connectionStringName="Data Source=myweb;Initial
Catalog=WebReport;Persist Security Info=True;User
ID=VBUser;Password=VBUser" providername="System.Data.SqlClient" />
</providers>
<properties>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="Int32"/>
</properties>
</profile>
In theory, I should be able to type "Profile.Country = ..." in VB and
get intellisense, right? When I type this, it tells me that "Country"
is not a member of "Profile"?
Am I missing an Imports statement or something else minor? I would
GREATLY appreciate any suggestions or comments. Thank you!