473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

ASP NET Profiles and Application Scope

I have a web app which is set-up to use the SQLProfileProvider model and the
site needs to be deployed in two seperate locations (Site1 & Site2). Now if
the user logs into Site1 a profile will be generated will be created for that
User using the ApplicationName within the provider applicationname. Now if
the user logs into Site2 another profile is created in the db under a new
application "/" which is automatically generated? First of all why is this
new application "/" created automatically and why does it not use the same
application name as the one specified in provide applicationname?

The reason I am curious is because Microsoft states that:

In addition to scoping profile data by user, SqlProfileProvider supports
scoping by application name. Websites that register profile providers with
identical applicationName attributes share profile data, whereas websites
that register profile providers with unique applicationNames do not. Scoping
by user name (or user ID) is facilitated by the user ID recorded with each
set of persisted profile properties, whereas scoping by application name is
facilitated by the application ID accompanying each user ID in the
aspnet_Users table.

So why can't I find my original profile as I created and possibly modified
within Site1. It generates a completely seperate profile???????? i tried
generating code to copy the profiles over but seems to be very tempremental.
Debugging works some times and running in deployment never works? I deployed
the sites with two seperate application names Site1 and Site2

private void Update(ProfileBase newProfile, string userName)
{
Profilebase oldProfile;
string site2AppName;

//get the provider
SqlProfileProvider provider =
(SqlProfileProvider)client.Providers["ProfileProvider"];

//get the current web application name;
site2AppName = provider.ApplicationName

//change the application name over so we can search
//through that application branch
provider.ApplicationName = Site1AppName; (from Somewhere)

//get a hold of the old profile
oldProfile = newProfile.GetProfile(userName);

//get the collection of properties
SettingsPropertyValueCollection profileProperties =
oldProfile.PropertyValues;

//set application back to original app
provider.ApplicationName = site2AppName;

provider.SetPropertyValues(newProfile.Context, profileProperties);

//save profile
newProfile.Save();

}

So, after all that what am I doing wrong?????
Nov 8 '06 #1
0 903

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

Similar topics

3
by: Test Test | last post by:
Hi, group! Here is some interesting problem: Our company has developed a large VB6 application that runs very smoothly on most environments. However, all of a sudden one of our customers...
0
by: Wayne Gibson | last post by:
Hi all, Please ignore the other post.. The cat jumped on the machine and sent it before I could stop it!! Was wondering if anybody has expericence this problem.. I am writting an application...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
0
by: Selden McCabe | last post by:
I have a VB6 application running on a number of computers at a school. These all have Microsoft Office (and also Outlook) installed. They are using an Exchange server. This app uses the...
1
by: Anurag | last post by:
Hi, I have 2 related questions. DB2 UDB ESE v8.x (8.1 till 8.2 FP2 - all fixpaks included) on AIX 5.4.x _____________________________________________________________________________ (QUESTION 1)...
0
by: george_Martinho | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older than a...
1
by: moondaddy | last post by:
I need to have multiple deployment profiles for a .net 2.0 winforms project. This is my requirement: 1) Re-use same project for multiple ClickOnce deployment profiles. 2) Each profile will...
0
by: jazeelkm | last post by:
Hi , I am developing a windows application using C#. In that I want to display all the outlook profiles in a listbox and on selecting one, The folder structure should be displayed on a treeview...
1
by: =?Utf-8?B?Y2hhcmxpc2E=?= | last post by:
We are developing a Web Application in which we would like to utilize the System.Web.Profile object. Unfortunately, .NET does not create the infrastructure for Profiles in a Web Application, only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.