Security :: Getting Error When Editing The User Details?
Feb 20, 2011
I am trying to edit and update a selected users details, following the tutorial [URL]
I get the following errors in the Error List in VS 2010:
Error 6 'Comment' is not a member of 'System.Security.Principal.IPrincipal'. C:projectsFPOS_v2FamilyAdminedit_user.aspx.vb 21 9 C:projectsFPOS_v2
Error 5 'Email' is not a member of 'System.Security.Principal.IPrincipal'. C:projectsFPOS_v2FamilyAdminedit_user.aspx.vb 20 9 C:projectsFPOS_v2
Error 2 'FamilyAdmin_edit_user.Private Sub DeleteUser(sender As Object, e As System.EventArgs)' is not accessible in this context because it is 'Private'. C:projectsFPOS_v2FamilyAdminedit_user.aspx 140
Error 1 'FamilyAdmin_edit_user.Private Sub UnlockUser(sender As Object, e As System.EventArgs)' is not accessible in this context because it is 'Private'. C:projectsFPOS_v2FamilyAdminedit_user.aspx 138
Error 7 'IsApproved' is not a member of 'System.Security.Principal.IPrincipal'. C:projectsFPOS_v2FamilyAdminedit_user.aspx.vb 22 9 C:projectsFPOS_v2
Error 8 'UnlockUser' is not a member of 'System.Security.Principal.IPrincipal'. C:projectsFPOS_v2FamilyAdminedit_user.aspx.vb 88 9 C:projectsFPOS_v2
Error 4 Property 'User' is 'ReadOnly'. C:projectsFPOS_v2FamilyAdminedit_user.aspx.vb 11 9 C:projectsFPOS_v2
The code for the edit_user.aspx is:
[Code]....
The code for the edit_user.aspx.vb is which is where I am getting the error:
[Code]....
The problem is with the User. But I don't know how to sort this as im new to all this.
View 1 Replies
Similar Messages:
Nov 10, 2010
Our application lets the administrator create new users. Since the administrator is logged in, I have set Logincreateduser = false so that the administrator is not logged out even after creating the new user.
The problem is :I need the userid of the newly created user to store additional details of the user in another database table. I see that i can get the username using Createuserwizard1.username; but how do I get the userID?
View 2 Replies
Jan 13, 2010
i have a login form where it validates 'username' and 'password' against a datbase table. After a user logs in, i would like to show their details such as image, name, etc in a detailsview.
View 16 Replies
Mar 9, 2010
Im working on an application that has a login section that accepts a username and password. On successful login a userid is returned and encrypted with TripleDesKey. The user details are then stored in a session object. We already have a class library that performs encryption and decryption using a key in the web.config file. I basically want to be able to access the user details of the currently logged in user in a page accessed from the main site that may be in a different domain, but is effectively part of the same site, so I wont have access to the session object from the main site. so basically a user logs in, I have the user details stored in a session object, I also have access to the encrypted userid also in a session object. If a user then clicks a link to another page that is in a different domain, how do I persist the userID?
I suppose I could I tag the encrypted userid to the querystring, but security could be an issue here (even though the id is encrypted, someone could still modify it)
View 2 Replies
Sep 5, 2010
We will put the active directory logon when the user access the website, the user needs to fill in his user name and password.
How do we store/get the details of the logon user once the user is logged in?
View 2 Replies
Mar 22, 2011
I new to ASP.net and have created the registration form and login using the wizzard. This data is now stored in the relevent tables provided by asp. I also have created an extra table with profile information like address, phone number etc and a USer ID field that links with the aspnet_users table.
I am trying to display the details of the user when they log in so for example...
User logs on, clicks profile page, profile information can be added and viewed.
Now the problem is I am using a Select statement to get the data but when I do a Where statement im not sure what to put to basically say where userid = current user id logged on.
View 5 Replies
Feb 21, 2011
I am using asp.net membership and trying to update a users details but get the following error:
Error2 Overload resolution failed because no accessible 'New' accepts this number of arguments.
Below is the full .vb code:
Partial Class FamilyAdmin_edit_user
Inherits System.Web.UI.Page
Private username As String
Dim user As MembershipUser
[Code]...
I apologise for my lack of programming knowledge.
View 1 Replies
Jun 6, 2010
I wan to be able to allow a user to edit their profile in a details for or other controlLooking at the ASPNETDB tables is is not clear to me how to do this.
View 3 Replies
Sep 11, 2010
I have written an application that user the MemberShip provide.
i have a page that needs to retrieve user information, such last activity, isOnlineStatus, CreateDate etc.
when i use the following code the status of the user changes.
[Code]....
i can retrieve all the required information for the user whose GUID i provide in Line1, however irrespective of if the user is online or not the status changes to Online.
i need to get the user details without updating the userIsOnline and the lastActivity stamps.
View 8 Replies
Dec 29, 2010
I have a form that has a detailsview. In that detailview I have and edit button that is visible only when a condition is met. I made the edit command field a template to achive this. My Question is can I have multiple conditions that make the edit button visible. Attached is my current linkbutton with the current variable.
[Code]....
View 5 Replies
Jan 18, 2010
I am using access database with asp.net C# page.
I have multiple amounts that I need to display and edit. I am trying to understand the best way to do this..
In MSAccess:
Should I define them as currency or number?
ASP.net
if I use formatting for the field as {0:C}, it works fine in View mode. However, i am unable to update the field in Edit mode for an amount with decimal places. In Edit mode, I can only enter whole numbers(ex: I can enter 123, but not 1.23).
If I set the ApplyFormattingInEditMode=True, I am unable to save data entered in any format($123.23, 123, 123.23, all of them cause the error).
The error I am getting is "Input string is not in a correct format".
View 1 Replies
Mar 11, 2011
I have a gridview control with a details column. I want the user to click details and it give me a pop-up showing details of the particular row. Any idea on how to do this using JQuery?? Looking for an example with code..
View 1 Replies
Apr 14, 2014
I gone through your "Display details of ASP.Net DataList Item in jQuery Dialog Modal popup on button click" Example it is very nice but i want to Display image also With the information it can display i assign image src like
$("#imgpopup").html($("[id*=img]", $(this).closest("tr")).html());
imgpopp is the id belong from pop up. But Image canot be Display I tried it from te last Five Days. How to assign image source.
View 1 Replies
Oct 29, 2012
how to restrict the other user if one works on the particular record.
i am having a table with the name tblProduct and i used to edit the records from the code behind using my website.
When one user login into the site and search for the particular products and edits the product and at the same time other user log in and try to edit the same product, i need to show the alert message, "the user (username) is already working on this. please wait for a while."
View 1 Replies
Apr 27, 2016
Into below code which is working fine, but the last section which started from using (SqlCommand SendMailcmd ... update it as i want when the user click on the button the code take the AdsID and (QAdsEmail "the user email") and send an e-mail to user depending on QAdsEmail and inside the email create a link to URL... so the user when he receive the mail he can click on it and move to the page to edit his Ad info ...
The table where below info will store in is called "ads" and the column that's need for sending email with ad info/the E-mail part of the code below i just copy it from another part of my application ...
protected void adNewQdadsbtn_Click(object sender, EventArgs e)
{
string FileExtentio = System.IO.Path.GetExtension(RegInteFileUploadImg1.FileName);
string FileExtentio2 = System.IO.Path.GetExtension(RegInteFileUploadImg2.FileName);
string FileExtentio3 = System.IO.Path.GetExtension(RegInteFileUploadImg3.FileName);
string FileExtentio4 = System.IO.Path.GetExtension(RegInteFileUploadImg4.FileName);
string FileExtentio5 = System.IO.Path.GetExtension(RegInteFileUploadImg5.FileName);
[code]...
View 1 Replies
Dec 25, 2013
I have one application form in which i want to store image of student with enrollment no and when i submit i want to store that image and take that image on another page on submit button two things should be done
1. storing the image and enrollment no
2. passing enrollment no and image to another page
View 1 Replies
Jul 2, 2012
I am trying to handle the unhandled exceptions in my project.I tried with this following code in my web.config filebut it is not at all redirecting to an error page which i have created instead of that it is throwing an exception in my code itselef. How to print the error description over therein my custom error page.
---------------------------------------------------------------------------------------------------
<sys.web>......<customErrors mode="On" defaultRedirect="~/Error.aspx"></customErrors>...</sys.web>
---------------------------------------------------------------------------------------------------
And even i tried in Global.asax page in Application_Error() method like below
Exception ex = Server.GetLastError();Response.Redirect("~/Error.aspx?errmsg="+ex.message);Server.ClearError();
And in my Error.aspx.cs page i have placed a label and i have written code like this
protected void Page_Load(object sender, EventArgs e) {
Label1.Text=Request["errmsg"];
}
But it is not getting redirected my error page and not displaying anything on it.
View 1 Replies
Oct 1, 2010
I get an error only when Same User Name was created in Different Application ID.
Input string was not in a correct format.
line- gluserID = Convert.ToString(command.ExecuteScalar())
Here is my code
If User.Identity.IsAuthenticated Then
Dim UserIdentity As MembershipUser = Membership.Providers("CustMembershipProvider").GetUser(HttpContext.Current.User.Identity.Name, False) [code].....
View 10 Replies
Sep 8, 2010
I have a problem with SqlMembershipProvider. I have already created database aspnetdb. I need to add new user to database however one error occured. This is my web.config file:
[Code]....
and this is my application code:
[Code]....
the error occured in this statement:
[Code]....
View 1 Replies
Apr 10, 2010
i am using membership to create an account page that a user enters after logging on.
In the page load of "MyAccountPage.aspx" I have the following which gets the userid and add it as a paremeter
Guid userid = (Guid)Membership.GetUser().ProviderUserKey;"ClientId"].DefaultValue
= userid.ToString();
ObjectDataSource7.SelectParameters[
"ClientId"].DefaultValue = userid.ToString();
This works fine - I have now added to the page a LoginStatus as when they arrive they are loggen in. The problem is when the user clicks the Logg off link I get the error on the page below -
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[Code]....
Is this because the page load is trying to get the logged on user ID
but they have just logged out?
How can I allow the User to logg out without getting the error?
View 4 Replies
Jul 21, 2010
I have a gridview with edit and delete. When i click Edit, I donot get all the textboxes. I just get 1. on top of that, when I try to update anything in that textbox, I get object Reference not set to an instance of object. my aspx for gridview is:
<asp:GridView ID="grdItems" runat="server" AllowSorting="True"
BackColor="White" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
CellPadding="4" ForeColor="Black" GridLines="Vertical" width="670px" OnRowCancelingEdit="grdItems_RowCancelingEdit" OnRowEditing="grdItems_RowEditing" OnRowUpdating="grdItems_RowUpdating" DataKeyNames="rowid" AutoGenerateColumns="False" OnRowDeleting="grdItems_RowDeleting" Font-Size="Smaller" ShowFooter="True" OnRowCreated="grdItems_RowCreated">
<Columns>
<asp:TemplateField HeaderText="ROWID" SortExpression="rowid" Visible="False">
[code]...
View 2 Replies
Jul 2, 2010
I needed a way to let the people who use my websites edit certain content.
I had no luck in dealing with DotNetnuke, Umbraco and other CMS packages out.
So what I did instead was, I used labels to hold the content of certain pages, and I allow users, only if they have administrator rights, to edit that content by using a free text editor called FreeTextBox, which is an state of the art control.
it works like this:
If (admin)
{
textEditor.visible = true;
lblContent.text = textEditor.text;
}
It does what I want it to do.
Since I'm not very experinced I'm worried that this approach may expose my web application to security risks, or there might be a better way of doing this.
View 1 Replies
Sep 20, 2010
i have used createuserwizard control in my project (v.s 2010 ) using c# and i want to do some modifications like i have to set user roles automatically while registering,
View 1 Replies
Oct 14, 2010
I had gridview which retrieve Products from database by sqldatasource1 ,and my manager asked me to filter this gridview by DDL to filter gridview with specfic Model ,I add some function on gridview as edit,paging .I did my code well and gridview filtred by the Model_Id which come from DDL .But when I tried to edit any product or navigate through paging I faced this error (The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. )when paging ,And this for editing (The GridView 'GridView1' fired event RowEditing which wasn't handled.)
protected void Page_Load(object sender, EventArgs e)
BindGridFunction();
[code]...
View 1 Replies
Oct 3, 2010
I have a website developed in ASP.NET created by someone else, sitting on another server... until now... a simple(ish) setup with login to update content. The site was zipped up and I was told it would be a simple case of uploading all the files onto the new server. I've managed to upload the site and it works fine... but I can't access the editing pages as it will no longer accept the username and password when I go to login. The host server is running ASP.NET v4 and IIS v7. Hosting is with [URL] so I'm also getting used to their way of doing things.
View 1 Replies