ASP.HttpProfile to be undefined

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

An example in a book included:
Dim userprofile As ASP.HttpProfile

But I get ASP.HttpProfile to be undefined.

There is Intellisense for ASP but the 3 items do not include HttpProfile
(one is _main_master another is global_asax)

I'd sure like to know more about the ASP class or namespace!



I'm using SQL Server and the AspnetDb database.

I've seen it referenced as Aspnetdb in the doc. Does the case matter?

I have the following:

<profile defaultProvider="SqlProvider" enabled="true">

I'd sure like to know why ASP.HttpProfile is not defined.





Thanks
 
re:
!> I have the following:
!> <profile defaultProvider="SqlProvider" enabled="true">

Look in :
BootDrive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

for machine.config, and open it in Notepad.

Look for the "profile" section :
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</profile>

That should tell you what the correct defaultProvider is.

For good code examples, see this article:
http://www.vsj.co.uk/dotnet/display.asp?id=572




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
That's good to know!

That explains how I got some profiles into the database without specifying a
provider. (Same for Roles.)

Since there is a provider in there,"AspNetSqlProfileProvider", I don't need
one. Right?

Actually I had this problem before I add the defaultProvider to me
web.config file so I'm probably looking in the wrong place for the solution.

The site you referenced said "AspNetSqlProfileProvider uses SQL Server 2005
Express ". Is that exactly true or can it also use Sql Server 2008?

It also mentions namespace: ASP { public class ProfileCommon

Somewhere else saw that the dynamic class was HttpProfile.

Are there two classes or maybe on is obsolete?

In any event, ASP produces an InteliSense that does not include either of
them.

I suppose that is the problem. Somehow the class is not being defined.

I wonder if anyone can tell me which is the correct class name.

And maybe a guess at why it is not being generated.

Is there some folder I can look into that should have a temporary file for
the class?

Or maybe some other approach?

Any answers would be appreciated
 
I fixed it. In case someone else has the problem:

I removed defaultProvider let it use the one in machine.config.

Apparently Asp.HttpProfile was replaced with ProfileCommon so I used:

Dim userprofile As ProfileCommon
 
Back
Top