Using Profiles In ASP.NET?
Aug 31, 2011in my vb code i'm trying to add to the profile by using this code:
profile.FirstName = "John"
But I keep getting an error saying:
FirstName is not a member of profile.
in my vb code i'm trying to add to the profile by using this code:
profile.FirstName = "John"
But I keep getting an error saying:
FirstName is not a member of profile.
I am creating a website using asp.net mvc model. When you create an mvc application asp.net automatically creates roles/profiles for user and admins (as far as i know) and corresponding tables in sql server database.I a need a new profile/role names "sponsor" that has all the benefits of users/admins (like authorization etc).
View 1 RepliesWe have an application that's installed at several locations but we are having an issue at one particular site. In short the application settings (My.) are not being saved after a reboot. The application is build in VB.Net v3.5 Framework and we are not experiencing any issues elsewhere.
This particular site is using roaming profiles and the network administrator ensures us that the correct permissions are applied to the user account(s) and all application data is being saved to the server. I've asked the network admin to check for the existence of the user settings file user.config in the Application Data directory and he says it doesn't exist.
In our application we store the connection string to the database in the application settings under the user scope. If no connection string is present or if one is present and a connection to the database cannot be made then a form is shown asking the user for the database credentials. Each morning when the users boot the machine and opens the application for the first time they are asked for these credentials but if they close the application and restart it they are not asked for them. This indicates to us that the settings are being saved but once the pc is rebooted and the application is opened for the first time they are asked for the database credentials. This seems like the settings are not persisting after a reboot.
I have vbscript code that enumerates user profiles from this registry path:
HKLMSOFTWAREMicrosoftWindows NTCurrentVersionProfileList.
How can this be done using Visual Basic 2010? Is there a class or method that I would use to accomplish the same thing or would I have to read the registry path into an array as you do with vbscript? My application will be ran on the local computer just so you know this information is not being gathered from across the network. I have been looking for awhile and haven't found anything that will work so far.Once I have the user profiles from the computer, I will populate this list into a drop-down combo box.
I am attempting to create a basic program and I need to know how to incorporate INI files for profiles in order to quickly pull up data from one person to the next.
Public Class IniFile
' API functions
Private Declare Ansi Function GetPrivateProfileString _
Lib "kernel32.dll" Alias "GetPrivateProfileStringA" _
[code]....
And placed it into a module, which I then wen't to my main program and attempted to place this:
Dim ini As New IniFile(Profiles.ini)
Dim value As String = ini.GetString("Names", "1", "Default Value")
To attempt to retrieve the data, but I get no error or information from it. The ini file is inside the folder of the project and I set the SectionName and KeyValue to the corresponding names. I think I am having trouble with syntax? Not 100% sure. This is the code that I got from the same source as the module for using the module.
Dim ini As New IniFile(FileName)
Dim value As String = ini.GetString("SectionName", "KeyName", "Default Value")
And I adjusted to what I believed would be the proper format.
I want my program to open a specific tab in condition that "Profiles.txt" is not found. It already opens the Control Panel, but it needs to go to the "Add Players" Tab in the Control Panel automatically.
Is there a way to do that?
Also, I have a couple of advanced tabs that should be disabled or hidden until certain conditions are met.