Security :: Accessing The Profile Class From A VB.Net / VS.Net 2008 Web App?
Mar 29, 2010
I am using VB.Net/ASP.Net 2008/3.5 to create a Web Application and I am trying to access the Profile Class.
I notice that unlike a "Website" that you cannot access the Profile class from a "Web Application" and I was wondering what is the best way of adding the Profile class to a Web application?
View 4 Replies
Similar Messages:
Mar 5, 2010
We have added some custom profile properties to the web.config - what we want to do is have the code access them once (when user logs in) and cache this so that the code doesn't have to hit the database each time we call Profile.<our custom profile property name>
What we see is a call to GetProperties or GetProfile each time we access Profile. <our custom profile property name> - whats the recommended way to do this?
View 4 Replies
Dec 17, 2010
I am using my aspnet membership for storing user profile related information in the database and I am looking for a way to access that information out of database from a function like Member.GetProfile. I am just wondering of any of the membership classes give thet functionality that I can actually access the information out of Membership database.
Somebody suggested me follwowing thread:
[Code]....
I am "Profile" object is not recognized in my code I think they are trying to refer to some some instance of a class here by the word Profile but I am not sure what instance is that.
View 2 Replies
Feb 18, 2010
I'm new to this forum, Ok here is the problem. I tried to implement the user profile pattern that provided by ASP.Net 2.0, first I added this couple of tags to the web.config
<system.web>
<anonymousIdentification
enabled="true"/>
<profile>
<properties>
<add
name="Name"
allowAnonymous="true"/>
<add
name="Age"
allowAnonymous="true"
type="System.Int16"/>
<group
name="User">
<add
name="Category"
allowAnonymous="true"/>
<add
name="MemberSince"
allowAnonymous="true"
type="System.DateTime"/>
<group>
<properties>
<profile>
Then I buit the project and moved to the page code behind, the surpise is that I didn't have the Profile object in the intellisense.
View 3 Replies
Feb 4, 2010
I am logged in as user1, and while creating a user in which I have additional information which would store first and last name into the profile database. I have the following code
[Code]....
But because I just have profile like that, it is updating the profile of user1 not the new user i just created
[Code]....
View 5 Replies
Dec 5, 2010
I'm being stupid but don't know what I'm missing.I want to use asp.net profile and have a profile property.So in the webconfig for my site I've added:
<profile>
<properties>
<add name="Name"/>
</properties>
</profile>
But in the code behind a page I cannot use Profile.Visual Studio is just saying the Profile is not known in the current context.Thus I cannot do
Profile.Name = ....
or
x = Profile.GetPropertyValue(....)
View 13 Replies
Jul 7, 2010
I've added sone profile properties.
[Code]....
I get a error that raid does not exist. I've tried both ways t and
[Code]....
View 5 Replies
Sep 10, 2010
1) I am making use of Profile class in my application, and using System.Web namespace, but intellisense is not able to recognize it. But when I make use of System.Web.Profile, it is working properly. What is the reason of this?
2) System.Web.Profile is not able to recognize IsAnonymous property, why is it not recognizing?
View 2 Replies
May 13, 2010
I'm trying to store some business objects in a SQLProfileProvider Profile property, however my business objects use public properties, not fields. This means I can't serialize as binary (correct?) so I'm serializing as XML. I've got the basic XML.Serialization attributes on the business objects, basically just XMLRoot and XMLElements with Type properties and an XMLArray attribute for a collection<T>. When I look at the data in the aspnet_Profile table, sure enough, it looks like an XML representation of my BOs:
[Code]....
Additionally, it works fine while the user is logged in.However, if the user logs out and logs back in, the profile property is a new instance of the BO, not what was saved in the profile. What am I missing here?
View 1 Replies
Jun 1, 2010
I know it's possible to use this information in a winform, wpf or console application. But I rather to determine which user with what roles are running a sepecific method, so I could decide upon them and run different codes. In addition in a desktop app. how a user can login? Is there any special winform or wpf login control?
View 1 Replies
Nov 24, 2010
I want to access the functions defined in ADO.vb file in my Default.aspx.vb file. note that the ADO.vb file is in the root directory. I can access it if it is in the App_Code directory. It it is in the root directory how can i access that?
View 9 Replies
Mar 18, 2010
I've been working on this for a while now and nothing has been a bigger pain in asp.net. I'm trying to implement custom profile fields in my visual studio 2008 web application project. I've read a lot of tutorials but they all seem to be either out dated or don't apply to web application projects. Last night I got a little closer to solving the problem when I found the "Web Profile Builder" for web applications. I've successfully set this up and can handle static profile data.I've got my web.config file setup and I can access my custom profile fields by Profile.CustomField. Now I want to figure out how I integrate this with the database and data connection. I know there are two standard ways to handle this, I would like to create new columns in the aspnet_Profile database (rather than the delimited key/value option).I'm pretty new to asp.net and this is my first project with c#, .net, and asp.
View 3 Replies
Mar 15, 2011
So i have some existing functionality from an older ASP.Net app that is a static class.
Say there's a static method in that class that returns a dataset that I would like to bind to something like a gridview or whatever I can build using MVC3.
View 2 Replies
Apr 15, 2010
I am unsure of how to reference the properties of my class in a function. Here is how I see it in my head, but how do i go about this?
WebService.vb
[Code]....
UserClasses.vb
[Code]....
View 4 Replies
Jul 1, 2010
While working on my FTP server, I am trying to access a class within my App_Code, but it is not working.When writing, the class is accessible/usable in the code like shown in picture. I get no build errors.But when I run it in the browser, I get an error stating that it cannot find my class.I've looked around some other posts on the forum, like using namespace, but it didn't work.
View 8 Replies
Jun 9, 2010
I set up various global parameters in Global.asax, as such:
Application["PagePolicies"] = "~/Lab/Policies.aspx";
Application["PageShare"] = "/Share.aspx";
Application["FileSearchQueries"] = Server.MapPath("~/Resources/SearchQueries.xml");
I have no problem accessing these variables form .ascx.cs or .aspx.cs file -- ie. files that are part of the Web content. However, I can't seem to access 'Application' from basic class objects (ie. standalone .cs files). I read somewhere to use a slight variations in .cs files, as follows, but it always comes throws an exception when in use:
String file = (String)System.Web.HttpContext.Current.Application["FileSearchQueries"];
View 1 Replies
May 17, 2010
I need to be able to access simple page controls like a textbox from my page class. So if I have a simple aspx page with a textbox on it, I'm trying to do something like this. i'm not using codebehind btw:
[Code]....
I thought maybe I could pass a reference to the page into the class, something like:
[Code]....
But that's not working either. How can I access page controls from my class?
View 5 Replies
Nov 12, 2010
Currently, I am accessing the property by creating a static method like the one below.
public static class CartCollection : List<Cart>
{
public static void Add(Cart Cart)
[code]...
View 3 Replies
Aug 6, 2010
I'm wondering how I can go about accessing page controls from a separate class I've made. I've tried a few things I found using google, but no luck :(
What I'm trying to do is keep a function that is used often, in a global class.
The function then accesses a page literal and calls ScriptManager.RegisterStartupScript. I was hoping this is possible, so then this function wouldn't have to be copied to all of the pages.
View 4 Replies
Mar 27, 2010
I have several .aspx pages that all have identical code behind pages.For ease of maintenance,I would like all the aspx pages to share a common code behind page.
To do this I have created a MyCommonClass class,which contains the common code.In the code behind of the .aspx pages, I have:
Partial class MyPage
Inherits MyCommonClass
End Class
But now the controls declared in the .aspx pages are not accessible in MyCommonClass.fix this?
View 6 Replies
Sep 4, 2011
I'm changing the CSS of my menu items during runtime to reflect which page is currently being viewed. It works fine. But, I have a nested master page that needs to change the CSS of the master page's items. How I can access the master page's menu items?
Here's the menu:
Code:
<div class="Menu" id="TopMenu" runat="server">
<ul>
<li><a href="../Default.aspx" runat="server" id="HomeButton" class="ActiveMenuButton">
<span>Home</span></a></li>
[Code] ....
I need to access the InventoryButton ID, but am unable to directly.
View 3 Replies
Mar 3, 2010
I'm making another attempt to find out how to use a different profile in the web application. I though it would be quite simple. but couldn't find an answer anywhere.
All I need to know is how to call "i90ProfileProvider" instead of default "i90PartnerProfileProvider" in C# or VB.
<profile defaultProvider="i90PartnerProfileProvider">
<providers>
<clear/>
<add name="i90PartnerProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90Partner"/>
<add name="i90ProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90"/>
</providers>
There must be the way to do this. For user it works just fine:
MembershipUser user=
Membership.Providers["providername"].GetUser("username",false);
If there is a way to add a name for Profile Provider in web.config, then there must be a way to use it.
Or I should do something entirely different to retrieve the user profile form another database?
View 5 Replies
Mar 7, 2010
1. i use the profile feature and i noticed that the profile cant work with anonymus users . and i can understand why now it leads me to a nother problem , in the creatUserWizard i added another step wich take the personal details of the user like firstName LastName and ect... and i wanted to store the details in the profile feature...
but it wont pass me to the second step it just give me an erorr that the service can work with anonymus or something like that .
2. i stored a datetime detail in the profile and when i tried to get it it gave me the date + the hour i put the date like : 29/12/1989 18:18:00 and i want to see just the date ...
View 4 Replies
Oct 25, 2010
Last night you guys here on this forum helped me in accessing properties of a dynamically loaded UC in an aspx page. Now i am facing another hiccup.
My code behind is : public partial class SiteUserControls_Message_Messages : BaseControl
In one of the click events i am loading three web users controls:
protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
{
SiteUserControls_Message_Create CreateNewMessageUC = Page.LoadControl(CreateMsgControl) as
SiteUserControls_Message_Create; // typecasting the UC
[Code]....
Now i want to access this variable CreateNewMessageUC in another event like this:
protected void MarkAsUnreadLinkButton_OnClick(object sender, EventArgs e)
{
CreateNewMessage.CreateNewMessageUC.RefreshSendTo();
[Code]....
But when i access teh variable in another event it is always null.
View 3 Replies
Jun 8, 2010
I have one C# windows class library type project which has a web reference whose settings are automatically added in to settings.settings file( Webservice name, type, scope, value).
I also have one separate ASP.net project which has let us as suppose, one page with a button. When I click this button, it calls a method of referred DLL of previous project and control goes there.
When in that project, when control goes in to location where I use this web reference, it tries to get the URL of web reference from settings file and raises an exception - 'The current configuration system does not support user-scoped settings'.
So, What is the way for me to call a c# project having web service in a asp.net project ? This is really a source stopper for our development.
View 1 Replies