error when creating profile with modified provider

error when creating profile with modified provider

am 30.01.2008 20:17:07 von Mich

Hi,

I changed the default provider for usernames like this in web.config:



providerName="System.Data.SqlClient"/>





type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myprovider"
.......
/>



This works: the created usernames (via CreateUserWizard control) are put
into tables created in database 'mydb'.

Now i also defined a profile properties in web.config like this:




type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myprovider"/>






When trying to create a new user with CreateUserWizard where i added a
checkbox, i get this error:

Description: An error occurred during the processing of a configuration file
required to service this request.
Please review the specific error details below and modify your configuration
file appropriately.
Parser Error Message: Provider must implement the class
'System.Web.Profile.ProfileProvider'.
Source Error:
Line 98:
Line 99: Line 100: type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
Line 101: connectionStringName="myprovider"/>
Line 102:
Source File: c:\inetpub\wwwroot\tennis\web.config Line: 100

Why do i get this message when using profile and not otherwise? And how to
fix that?
Thanks
Mich

Re: error when creating profile with modified provider

am 30.01.2008 20:23:23 von Dominick Baier

profile enabled="true">


type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"


You want the AspNetSqlProfileProvider (not membership)


-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

> profile enabled="true">
>
>
> > type="System.Web.Security.SqlMembershipProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Re: error when creating profile with modified provider

am 30.01.2008 21:04:02 von Mich

Thanks for replying...
I did this: (i also changed type="System.Web.Profile.ProfileProvider)




type="System.Web.Profile.ProfileProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myprovider"/>

.....

And now, i get the error: "Cannot create an abstract class"




"Dominick Baier" schreef in
bericht news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
> profile enabled="true">
>
>
> > type="System.Web.Security.SqlMembershipProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
>
> You want the AspNetSqlProfileProvider (not membership)
>
>
> -----
> Dominick Baier (http://www.leastprivilege.com)
>
> Developing More Secure Microsoft ASP.NET 2.0 Applications
> (http://www.microsoft.com/mspress/books/9989.asp)
>
>> profile enabled="true">
>>
>>
>> >> type="System.Web.Security.SqlMembershipProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
>

Re: error when creating profile with modified provider

am 30.01.2008 21:41:00 von pbromberg

This might help:
http://weblogs.asp.net/bradleyb/archive/2006/05/08/445727.as px

-- Pete
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"Mich" wrote:

> Thanks for replying...
> I did this: (i also changed type="System.Web.Profile.ProfileProvider)
>
>
>
>
> > type="System.Web.Profile.ProfileProvider, System.Web, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="myprovider"/>
>

> .....
>
> And now, i get the error: "Cannot create an abstract class"
>
>
>
>
> "Dominick Baier" schreef in
> bericht news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
> > profile enabled="true">
> >
> >
> > > > type="System.Web.Security.SqlMembershipProvider, System.Web,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> >
> >
> > You want the AspNetSqlProfileProvider (not membership)
> >
> >
> > -----
> > Dominick Baier (http://www.leastprivilege.com)
> >
> > Developing More Secure Microsoft ASP.NET 2.0 Applications
> > (http://www.microsoft.com/mspress/books/9989.asp)
> >
> >> profile enabled="true">
> >>
> >>
> >> > >> type="System.Web.Security.SqlMembershipProvider, System.Web,
> >> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> >
> >
>
>
>

Re: error when creating profile with modified provider

am 30.01.2008 22:45:29 von Mich

Thanks, but i couldn't find any help there ...

The GotDotNet site is being phased out
Microsoft will be phasing out most features of the GotDotNet site by July
2007.

GotDotNet Workspaces and Private Workspaces have been phased out
a.. More about the GotDotNet phase-out
a.. Contact the GotDotNet Support Team



I found a menu samples, but nothing about my problem.

"Peter Bromberg [C# MVP]" schreef in
bericht news:18853B5A-685E-47A7-AFAD-3306A21D7F9E@microsoft.com...
> This might help:
> http://weblogs.asp.net/bradleyb/archive/2006/05/08/445727.as px
>
> -- Pete
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "Mich" wrote:
>
>> Thanks for replying...
>> I did this: (i also changed type="System.Web.Profile.ProfileProvider)
>>
>>
>>
>>
>> >> type="System.Web.Profile.ProfileProvider, System.Web, Version=2.0.0.0,
>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="myprovider"/>
>>

>> .....
>>
>> And now, i get the error: "Cannot create an abstract class"
>>
>>
>>
>>
>> "Dominick Baier" schreef
>> in
>> bericht news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
>> > profile enabled="true">
>> >
>> >
>> > >> > type="System.Web.Security.SqlMembershipProvider, System.Web,
>> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> >
>> >
>> > You want the AspNetSqlProfileProvider (not membership)
>> >
>> >
>> > -----
>> > Dominick Baier (http://www.leastprivilege.com)
>> >
>> > Developing More Secure Microsoft ASP.NET 2.0 Applications
>> > (http://www.microsoft.com/mspress/books/9989.asp)
>> >
>> >> profile enabled="true">
>> >>
>> >>
>> >> >> >> type="System.Web.Security.SqlMembershipProvider, System.Web,
>> >> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> >
>> >
>>
>>
>>

Re: error when creating profile with modified provider

am 31.01.2008 07:11:08 von Dominick Baier

it is not System.Web.ProfileProvider

it is

AspNetSqlProfileProvider
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

> Thanks for replying...
> I did this: (i also changed type="System.Web.Profile.ProfileProvider)
>
>
>
> > type="System.Web.Profile.ProfileProvider, System.Web, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="myprovider"/>
>

> ....
> And now, i get the error: "Cannot create an abstract class"
>
> "Dominick Baier"
> schreef in bericht
> news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
>
>> profile enabled="true">
>>
>>
>> >> type="System.Web.Security.SqlMembershipProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> You want the AspNetSqlProfileProvider (not membership)
>>
>> -----
>> Dominick Baier (http://www.leastprivilege.com)
>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>> (http://www.microsoft.com/mspress/books/9989.asp)
>>
>>> profile enabled="true">
>>>
>>>
>>> >>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Re: error when creating profile with modified provider

am 31.01.2008 09:01:08 von Mich

Thanks again but i still get an error.
I tried this:
type="System.Web.AspNetSqlProfileProvider, System.Web, Version=2.0.0.0,
Culture=neutral, Pud blicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myprovider"/>

The error:
Could not load type 'System.Web.AspNetSqlProfileProvider' from assembly
'System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.

and this:
type="AspNetSqlProfileProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myprovider"/>

The error:
Could not load type 'AspNetSqlProfileProvider' from assembly 'System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.




"Dominick Baier" schreef in
bericht news:8e6a913a1bbe68ca31ef95eb0c10@news.microsoft.com...
> it is not System.Web.ProfileProvider
>
> it is
>
> AspNetSqlProfileProvider
> -----
> Dominick Baier (http://www.leastprivilege.com)
>
> Developing More Secure Microsoft ASP.NET 2.0 Applications
> (http://www.microsoft.com/mspress/books/9989.asp)
>
>> Thanks for replying...
>> I did this: (i also changed type="System.Web.Profile.ProfileProvider)
>>
>>
>>
>> >> type="System.Web.Profile.ProfileProvider, System.Web, Version=2.0.0.0,
>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="myprovider"/>
>>

>> ....
>> And now, i get the error: "Cannot create an abstract class"
>>
>> "Dominick Baier"
>> schreef in bericht
>> news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
>>
>>> profile enabled="true">
>>>
>>>
>>> >>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> You want the AspNetSqlProfileProvider (not membership)
>>>
>>> -----
>>> Dominick Baier (http://www.leastprivilege.com)
>>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>>> (http://www.microsoft.com/mspress/books/9989.asp)
>>>
>>>> profile enabled="true">
>>>>
>>>>
>>>> >>>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
>

Re: error when creating profile with modified provider

am 31.01.2008 09:51:11 von Dominick Baier

simply copy and modify the provider section from your machine.config (in
\windows\microsoft.net\framework\version\config

it's:




connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>



if you want to use the same name, add a to the provider list.

-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

> Thanks again but i still get an error.
> I tried this:
> > type="System.Web.AspNetSqlProfileProvider, System.Web,
> Version=2.0.0.0,
> Culture=neutral, Pud blicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="myprovider"/>
> The error:
> Could not load type 'System.Web.AspNetSqlProfileProvider' from
> assembly
> 'System.Web, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a'.
> and this:
> > type="AspNetSqlProfileProvider, System.Web, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="myprovider"/>
> The error:
> Could not load type 'AspNetSqlProfileProvider' from assembly
> 'System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
> "Dominick Baier"
> schreef in bericht
> news:8e6a913a1bbe68ca31ef95eb0c10@news.microsoft.com...
>
>> it is not System.Web.ProfileProvider
>>
>> it is
>>
>> AspNetSqlProfileProvider
>> -----
>> Dominick Baier (http://www.leastprivilege.com)
>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>> (http://www.microsoft.com/mspress/books/9989.asp)
>>
>>> Thanks for replying...
>>> I did this: (i also changed
>>> type="System.Web.Profile.ProfileProvider)
>>>
>>>
>>>
>>> >>> type="System.Web.Profile.ProfileProvider, System.Web,
>>> Version=2.0.0.0,
>>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> connectionStringName="myprovider"/>
>>>

>>> ....
>>> And now, i get the error: "Cannot create an abstract class"
>>> "Dominick Baier"
>>> schreef in bericht
>>> news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
>>>
>>>> profile enabled="true">
>>>>
>>>>
>>>> >>>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> You want the AspNetSqlProfileProvider (not membership)
>>>> -----
>>>> Dominick Baier (http://www.leastprivilege.com)
>>>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>>>> (http://www.microsoft.com/mspress/books/9989.asp)
>>>>> profile enabled="true">
>>>>>
>>>>>
>>>>> >>>>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Re: error when creating profile with modified provider

am 31.01.2008 11:42:34 von Mich

You gave me the solution:
in your second reply, you told me:
"it is not System.Web.ProfileProvider
it is
AspNetSqlProfileProvider"

well, in fact, it is:

System.Web.Profile.SqlProfileProvider

Thanks anyway


"Dominick Baier" schreef in
bericht news:8e6a913a1bbe98ca3205f20ab7f0@news.microsoft.com...
> simply copy and modify the provider section from your machine.config (in
> \windows\microsoft.net\framework\version\config
>
> it's:
>
>
>
>
> > connectionStringName="LocalSqlServer"
> applicationName="/"
> type="System.Web.Profile.SqlProfileProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
>

>

>
> if you want to use the same name, add a to the provider list.
>
> -----
> Dominick Baier (http://www.leastprivilege.com)
>
> Developing More Secure Microsoft ASP.NET 2.0 Applications
> (http://www.microsoft.com/mspress/books/9989.asp)
>
>> Thanks again but i still get an error.
>> I tried this:
>> >> type="System.Web.AspNetSqlProfileProvider, System.Web,
>> Version=2.0.0.0,
>> Culture=neutral, Pud blicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="myprovider"/>
>> The error:
>> Could not load type 'System.Web.AspNetSqlProfileProvider' from
>> assembly
>> 'System.Web, Version=2.0.0.0, Culture=neutral,
>> PublicKeyToken=b03f5f7f11d50a3a'.
>> and this:
>> >> type="AspNetSqlProfileProvider, System.Web, Version=2.0.0.0,
>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="myprovider"/>
>> The error:
>> Could not load type 'AspNetSqlProfileProvider' from assembly
>> 'System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
>> "Dominick Baier"
>> schreef in bericht
>> news:8e6a913a1bbe68ca31ef95eb0c10@news.microsoft.com...
>>
>>> it is not System.Web.ProfileProvider
>>>
>>> it is
>>>
>>> AspNetSqlProfileProvider
>>> -----
>>> Dominick Baier (http://www.leastprivilege.com)
>>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>>> (http://www.microsoft.com/mspress/books/9989.asp)
>>>
>>>> Thanks for replying...
>>>> I did this: (i also changed
>>>> type="System.Web.Profile.ProfileProvider)
>>>>
>>>>
>>>>
>>>> >>>> type="System.Web.Profile.ProfileProvider, System.Web,
>>>> Version=2.0.0.0,
>>>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> connectionStringName="myprovider"/>
>>>>

>>>> ....
>>>> And now, i get the error: "Cannot create an abstract class"
>>>> "Dominick Baier"
>>>> schreef in bericht
>>>> news:8e6a913a1bbb98ca319518f06d90@news.microsoft.com...
>>>>
>>>>> profile enabled="true">
>>>>>
>>>>>
>>>>> >>>>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>>> You want the AspNetSqlProfileProvider (not membership)
>>>>> -----
>>>>> Dominick Baier (http://www.leastprivilege.com)
>>>>> Developing More Secure Microsoft ASP.NET 2.0 Applications
>>>>> (http://www.microsoft.com/mspress/books/9989.asp)
>>>>>> profile enabled="true">
>>>>>>
>>>>>>
>>>>>> >>>>>> type="System.Web.Security.SqlMembershipProvider, System.Web,
>>>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
>