473,956 Members | 5,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simple profile question

Am i missing somthing simple?
I can't access any of the profile names in my code behind i.e;

textBox1.text = Profile.test = "some text"

here's the web.config:
<?xml version="1.0"?>

<configuratio n>

<appSettings/>
<connectionStri ngs/>

<system.web>
<compilation debug="true" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="Syst em" />
<add namespace="Syst em.Collections" />
<add namespace="Syst em.Collections. Specialized" />
<add namespace="Syst em.Configuratio n" />
<add namespace="Syst em.Text" />
<add namespace="Syst em.Text.Regular Expressions" />
<add namespace="Syst em.Web" />
<add namespace="Syst em.Web.Caching" />
<add namespace="Syst em.Web.SessionS tate" />
<add namespace="Syst em.Web.Security " />
<add namespace="Syst em.Web.Profile" />
<add namespace="Syst em.Web.UI" />
<add namespace="Syst em.Web.UI.WebCo ntrols" />
<add namespace="Syst em.Web.UI.WebCo ntrols.WebParts " />
<add namespace="Syst em.Web.UI.HtmlC ontrols" />
</namespaces>
</pages>

<authenticati on mode="Forms" />
<anonymousIdent ification enabled="true"/>

<profile>
<properties>
<add name="test" allowAnonymous= "true"/>
</properties>
</profile>

</system.web>
</configuration>

I'm using VS2005

Any ideas - its been a long day!!

Sep 8 '07 #1
4 1365
Are you using Web Application Projects? The Profile was compiled on the fly
for the Web Site Projects, but because the web application projects don't do
dynamic compilation, something different needs to be done. You'll need to
generate a strongly typed class to represent the profile. Luckily, there's
an add-in to VS to handle this for web application projects. You can get the
add-in at: http://www.codeplex.com/WebProfile
--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"James Page" <Ja*******@disc ussions.microso ft.comwrote in message
news:E2******** *************** ***********@mic rosoft.com...
Am i missing somthing simple?
I can't access any of the profile names in my code behind i.e;

textBox1.text = Profile.test = "some text"

here's the web.config:
<?xml version="1.0"?>

<configuratio n>

<appSettings/>
<connectionStri ngs/>

<system.web>
<compilation debug="true" strict="false" explicit="true" />
<pages>
<namespaces>
<clear />
<add namespace="Syst em" />
<add namespace="Syst em.Collections" />
<add namespace="Syst em.Collections. Specialized" />
<add namespace="Syst em.Configuratio n" />
<add namespace="Syst em.Text" />
<add namespace="Syst em.Text.Regular Expressions" />
<add namespace="Syst em.Web" />
<add namespace="Syst em.Web.Caching" />
<add namespace="Syst em.Web.SessionS tate" />
<add namespace="Syst em.Web.Security " />
<add namespace="Syst em.Web.Profile" />
<add namespace="Syst em.Web.UI" />
<add namespace="Syst em.Web.UI.WebCo ntrols" />
<add namespace="Syst em.Web.UI.WebCo ntrols.WebParts " />
<add namespace="Syst em.Web.UI.HtmlC ontrols" />
</namespaces>
</pages>

<authenticati on mode="Forms" />
<anonymousIdent ification enabled="true"/>

<profile>
<properties>
<add name="test" allowAnonymous= "true"/>
</properties>
</profile>

</system.web>
</configuration>

I'm using VS2005

Any ideas - its been a long day!!

Sep 8 '07 #2
Thanks Mark that works a treat.

Yet another Microsoft "one of those things". I wonder if they will overcome
this in VS 2008??

Regards

James
Sep 9 '07 #3
PS Do you know of any other useful add-ins for VS2005?
Sep 9 '07 #4
There's the visual studio power toys at:
http://msdn2.microsoft.com/en-us/vstudio/aa718340.aspx

There's a book called "Windows Developer Power Tools" by O'Reilly that has a
lot of awesome utilities for doing windows development as well as tools for
use with VS.

--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"James Page" <Ja*******@disc ussions.microso ft.comwrote in message
news:94******** *************** ***********@mic rosoft.com...
PS Do you know of any other useful add-ins for VS2005?

Sep 9 '07 #5

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

Similar topics

1
1278
by: slchen | last post by:
Now, I have a question about profile. I write a program as below: file name: pro.py ------------------------------- import profile import string,re,sys,random,time import main,read_dont #Read the data
51
8351
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct code? many thx!
1
2343
by: VB Programmer | last post by:
I am using personalization/profile to store info for the user that is not contained in the aspnet_Users or aspnet_Membership tables. This info includes, firstname, lastname, and phonenumber. On my "signup" page I ask for all their info at one time, including username, password, firstname, lastname, etc.... After I do a Membership.CreateUser and Roles.AddUserToRole I want to store the profile information. But, the code still thinks...
5
1292
by: cipcip | last post by:
By default profile use sql server xpress provider and probabily, caches stored data when they are requested for the first time, So the question is: why we should use profile instead of storyng, retrieving and caching user data manually from a database? Is it only for an easier approach of state maintenance, or are there other advantages?
1
1619
by: Max2006 | last post by:
Hi, Do I need to be worry about WS-Profiling or it already had been taken care in ASP.NET asmx web services platform? Thank you, Max
0
1159
by: ashish | last post by:
hi all, I am working with a custom profile provider that stores my business object as profile with anonymous identification turned on. I have a question regarding how it is supposed to work with forms authentication etc We want to remember user settings every time they visit the site, anonymous or not
1
1363
by: shapper | last post by:
Hello, I have a profile with multiple profile properties in my Web.Config: <add allowAnonymous="false" name="Contact" type="Contact" serializeAs="Binary"/> <add allowAnonymous="false" name="Options" type="Options" serializeAs="Binary"/> Where each profile property is class, as follows:
11
2115
by: Weston Weems | last post by:
I've got the need to have user information for logged in user in a readily avaliable page context (a lot like how Profile is) except not suck. Before we jump to any conclusions, from what I gathered, the implementation of the provider model is absolute garbage. While I've seen microsoft employees make other questionable design decisions, I cant possibly fathom why a user profile cant be derived as some other object.
1
3570
by: Rusty Hill | last post by:
My site does not allow anonymous users. After a user has logged in and been authenticated I need to access some information in their profile object. I thought I would do this in the LoggedIn event of the Login object but when that event fires the user is still not authenticated so the profile is null. Where and how should I be doing this? Should I be checking the ProfileModule.MigrateAnonymous Event in the global.asax? Remember I do...
0
10224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11652
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...
1
8323
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
7485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6271
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
6396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5010
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
4595
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3604
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.