473,661 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<profile><prope rties> with no Profile class

I have the following in my web.config:
<system.web>
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven

Oct 21 '08 #1
5 1663
First, I must say I am not particularly fond of the default implementation
of Profile. It is simple, but it is a tight box to fit into. It also errors
out and forces you to play games with Temporary ASP.NET files at times, but
deleting them generally clears things up.

At first blush, the config looks fine. What code are you using to try to
pull the ProfileCommon object?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

*************** *************** **************
| Think outside the box! |
*************** *************** **************
"Steven" <sedison@protro nix_nospam_.com wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>I have the following in my web.config:
<system.web>
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven



Oct 23 '08 #2
I can't even do:
Profile.Anythin g

I just want to add a couple of fields to the default user information
in the database using CreateUserWizar d and the Login control.

I wanted to assign the values in CreateUserWizar d::CreatedUser( ) and
save them to the database.

I was under the impression I could do something like:
Profile.FirstNa me = txtFirstName.Te xt;
Profile.Save();

But I get no intellisense with Profile. and anything I try to do with it
says it doesn't exist.

I can do:
HttpContext.Cur rent.Profile
but my new fields aren't in that instance.

Have I mis-interpreted something, or just done something wrong?

Thanks again!

Steven

"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamMwrote
in message news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
First, I must say I am not particularly fond of the default implementation
of Profile. It is simple, but it is a tight box to fit into. It also
errors out and forces you to play games with Temporary ASP.NET files at
times, but deleting them generally clears things up.

At first blush, the config looks fine. What code are you using to try to
pull the ProfileCommon object?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

*************** *************** **************
| Think outside the box! |
*************** *************** **************
"Steven" <sedison@protro nix_nospam_.com wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>>I have the following in my web.config:
<system.web>
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven




Oct 23 '08 #3
The class that holds the autogen stuff is called ProfileCommon, not Profile.
Not sure why, but I have not looked at what is going on. You use it like
this:

ProfileCommon profile = (ProfileCommon) ProfileCommon.C reate("UserName Here",
true);

You can then get at the custom profile elements you have created.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

*************** *************** **************
| Think outside the box! |
*************** *************** **************
"EdisonCPP" <Ed*******@news groups.nospamwr ote in message
news:er******** ******@TK2MSFTN GP06.phx.gbl...
>I can't even do:
Profile.Anythin g

I just want to add a couple of fields to the default user information
in the database using CreateUserWizar d and the Login control.

I wanted to assign the values in CreateUserWizar d::CreatedUser( ) and
save them to the database.

I was under the impression I could do something like:
Profile.FirstNa me = txtFirstName.Te xt;
Profile.Save();

But I get no intellisense with Profile. and anything I try to do with it
says it doesn't exist.

I can do:
HttpContext.Cur rent.Profile
but my new fields aren't in that instance.

Have I mis-interpreted something, or just done something wrong?

Thanks again!

Steven

"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamM>
wrote in message news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>First, I must say I am not particularly fond of the default
implementati on of Profile. It is simple, but it is a tight box to fit
into. It also errors out and forces you to play games with Temporary
ASP.NET files at times, but deleting them generally clears things up.

At first blush, the config looks fine. What code are you using to try to
pull the ProfileCommon object?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

************** *************** ***************
| Think outside the box! |
************** *************** ***************
"Steven" <sedison@protro nix_nospam_.com wrote in message
news:%2******* *********@TK2MS FTNGP04.phx.gbl ...
>>>I have the following in my web.config:
<system.web >
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven





Oct 24 '08 #4
It's so odd. I found my temporary files, and the cs files have
the:

protected ProfileCommon Profile {
get {
return ((ProfileCommon )(this.Context. Profile));
}
}
for each of my files.

And the class ProfileCommon definition file, yet in my project
I can't seem to use ProfileCommon or Profile. They're not
in my autocomplete, and they won't compile. The ProfileCommon
definition file matches my web.config prefectly.

Can I just delete my temporary files and recompile?

Steven

"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamMwrote
in message news:uK******** ******@TK2MSFTN GP05.phx.gbl...
The class that holds the autogen stuff is called ProfileCommon, not
Profile. Not sure why, but I have not looked at what is going on. You use
it like this:

ProfileCommon profile =
(ProfileCommon) ProfileCommon.C reate("UserName Here", true);

You can then get at the custom profile elements you have created.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

*************** *************** **************
| Think outside the box! |
*************** *************** **************
"EdisonCPP" <Ed*******@news groups.nospamwr ote in message
news:er******** ******@TK2MSFTN GP06.phx.gbl...
>>I can't even do:
Profile.Anythi ng

I just want to add a couple of fields to the default user information
in the database using CreateUserWizar d and the Login control.

I wanted to assign the values in CreateUserWizar d::CreatedUser( ) and
save them to the database.

I was under the impression I could do something like:
Profile.FirstN ame = txtFirstName.Te xt;
Profile.Save() ;

But I get no intellisense with Profile. and anything I try to do with it
says it doesn't exist.

I can do:
HttpContext.Cu rrent.Profile
but my new fields aren't in that instance.

Have I mis-interpreted something, or just done something wrong?

Thanks again!

Steven

"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamM>
wrote in message news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>>First, I must say I am not particularly fond of the default
implementatio n of Profile. It is simple, but it is a tight box to fit
into. It also errors out and forces you to play games with Temporary
ASP.NET files at times, but deleting them generally clears things up.

At first blush, the config looks fine. What code are you using to try to
pull the ProfileCommon object?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

************* *************** *************** *
| Think outside the box! |
************* *************** *************** *
"Steven" <sedison@protro nix_nospam_.com wrote in message
news:%2****** **********@TK2M SFTNGP04.phx.gb l...
I have the following in my web.config:
<system.we b>
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven





Oct 24 '08 #5
I deleted my temporary files and recompiled. Still no luck.
"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamMwrote
in message news:uK******** ******@TK2MSFTN GP05.phx.gbl...
The class that holds the autogen stuff is called ProfileCommon, not
Profile. Not sure why, but I have not looked at what is going on. You use
it like this:

ProfileCommon profile =
(ProfileCommon) ProfileCommon.C reate("UserName Here", true);

You can then get at the custom profile elements you have created.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

*************** *************** **************
| Think outside the box! |
*************** *************** **************
"EdisonCPP" <Ed*******@news groups.nospamwr ote in message
news:er******** ******@TK2MSFTN GP06.phx.gbl...
>>I can't even do:
Profile.Anythi ng

I just want to add a couple of fields to the default user information
in the database using CreateUserWizar d and the Login control.

I wanted to assign the values in CreateUserWizar d::CreatedUser( ) and
save them to the database.

I was under the impression I could do something like:
Profile.FirstN ame = txtFirstName.Te xt;
Profile.Save() ;

But I get no intellisense with Profile. and anything I try to do with it
says it doesn't exist.

I can do:
HttpContext.Cu rrent.Profile
but my new fields aren't in that instance.

Have I mis-interpreted something, or just done something wrong?

Thanks again!

Steven

"Gregory A. Beamer (Cowboy) - MVP" <No************ @comcast.netNoS pamM>
wrote in message news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>>First, I must say I am not particularly fond of the default
implementatio n of Profile. It is simple, but it is a tight box to fit
into. It also errors out and forces you to play games with Temporary
ASP.NET files at times, but deleting them generally clears things up.

At first blush, the config looks fine. What code are you using to try to
pull the ProfileCommon object?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

************* *************** *************** *
| Think outside the box! |
************* *************** *************** *
"Steven" <sedison@protro nix_nospam_.com wrote in message
news:%2****** **********@TK2M SFTNGP04.phx.gb l...
I have the following in my web.config:
<system.we b>
<profile defaultProvider ="MyASPSqlProfi leProvider" enabled="true" >
<properties>
<add name="FirstName " defaultValue="" type="string"/>
<add name="MiddleIni tial" defaultValue="" type="string" />
<add name="LastName" defaultValue="" type="string"/>
<add name="Address1" defaultValue="" type="string"/>
<add name="Address2" defaultValue="" type="string"/>
<add name="City" defaultValue="" type="string"/>
<add name="State" defaultValue=""/>
<add name="Country" defaultValue="" type="string"/>
<add name="PostalCod e" defaultValue="" type="string"/>
<add name="Phone" defaultValue="" type="string"/>
<add name="NewsLette rOK" defaultValue="t rue" type="bool"/>
<add name="LastOrder " defaultValue="" type="System.Da teTime"/>
</properties>
</profile>

When I compile, I don't get a Profile class. If I try to use it anyway
I get compiler errors. What am I doing wrong?

Using VS2008.

Every site I visit says you simple add <profilewith some properties
and VS will generate the Profile class for you.

Thanks,

Steven





Oct 24 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2938
by: Google Mike | last post by:
I've got pyGTK 2-1.99.14 (which comes with my RH9 Linux). Does anyone know how to set the gtk.RadioButton font? I'm finding the font size too big for an application I need to build.
1
1337
by: VB Programmer | last post by:
My 2.0 webapp works great. I added a profile section and all of a sudden I get a slew of "Could not find schema information for the element...." errors/messages. Any ideas why? Here's part of my web.config.... : <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" />
34
18222
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
28
9123
by: Michael Primeaux | last post by:
What is the recommended pattern for implementing a synchronized (thread-safe) class that inherits from Collection<T>? For example, I want to implement a SyncRoot property . I do see where I can override (protected) the methods InsertItem, RemoveItem, ClearItems, and SetItem. However, I do not see an override for GetItem. Kindest regards, Michael
8
3019
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the way I'm going about doing this might be a little off. I'd appreciate some help. Below is the code I have thus far but I'm not sure how to reference the user control within the foreach loop. <asp:Panel ID="pnlRosterProfile" runat="Server" />
4
1916
by: Mike | last post by:
Hi all, In my recent ASP.NET 2.0 appl, I need to verify that the supplied email address is valid or not. So, here's my situation: - In my <profilearea, I created <isVerifiedproperty. - Suppose a new user has been created. I set the profile.isverified to false. OnCreatedUser event I'll send him an email (to the supplied email address) to verify their email address with a link in it to an ASPX page that'll do the verification, e.g:...
6
2508
by: Jeff | last post by:
Hey ASP.NET 2.0 I've added some extra properties to the Profile of users on my site. One of the new properties is of type "string" and it contain HTML data.... like for example "<div><small>Test</small></div>" My problem is that I don't know how to display this property on the page. I want the value to be displayed as any other html code... I don't want the
3
10717
by: Brad | last post by:
I have several movies being presented to the web on a single page and each one is dependant on a link selected. On the .aspx page I have the following code for a single movie. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <OBJECT id="fMovie" runat="server" codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,29,0 height=406 width=502 align=middle...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.