Security :: Get An Error Only When Same User Name Was Created In Different Application ID?
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
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
Mar 23, 2011
How to get UserId registered user and log in UserId? My new table tbl_Employees, column:
UserId, UserIdNewRegister
Eg.:
1. Log in UserId is: 76F31C27-9AA4-4968-AEAB-8B5DFEED16E7
2. Register a new user, UserId is: 20T31C27-9AA4-4968-83RR-8B5DFEED1632
How to get UserId: 76F31C27-9AA4-4968-AEAB-8B5DFEED16E7 and UserId new user: 20T31C27-9AA4-4968-83RR-8B5DFEED1632. I want to put the user is stored under UserId 76F31C27-9AA4-4968-AEAB-8B5DFEED16E7 and UserId: 20T31C27-9AA4-4968-83RR-8B5DFEED1632 new user.
LoginCreatedUser is "False" LoginCreatedUser = "False"
View 2 Replies
Nov 9, 2010
The app requires user (mainUser) to login. Once logged in, the user can create users (subUser). I use the CreateUserWizard Control for this. I need to get the UserID of the subUser. HOw can I do this. I'm not sure of how to do it without confusing ASP of which userId I want. Is this a case for sessions? Or is there a more direct way?
View 2 Replies
Jan 30, 2011
I have created a web application through VS2010, with defined tables in the database for username, password, etc.,
As well as in the project, VS2010 created templates,Views, Master pages,etc.,
Now I want to implement the Role based access in my application. For Example, Adminstrator can view all the page, But the user can view only few pages.
I don't know how to try implement the user roles, Since I cant get the value of Username and password since access by this line.
RegisterHyperLink.NavigateUrl =
"Register.aspx?ReturnUrl=" +
HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
//To load the custom page, Change it in the Web.Config File [<authentication mode="Forms">]
My Query:
1. How to implement the uerroles in this application.
2.Client needs the admin intreface to create the user by the adminstrator.How can i provide the from for accessing the tables whaich are created by VS2010, when the web application is created.
View 3 Replies
Feb 10, 2011
I created online store following MvcMusicStore tutorial in MVC 2. Used standard login view as shown in tutorial. I created database on new server and it's working well - I can search for albums etc. The problem is when I am trying to register new user - I am getting error listed below (can't log in too). I created new database using aspnet_regsql.exe. Server authentication is set to SQL Server and Windows authentication mode. Server Error in '/' Application. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Source Error:
[Code]....
Line 125:Line 126: MembershipCreateStatus status;Line 127: _provider.CreateUser(userName, password, email, null, null, true, null, out status);Line 128: return status;Line 129: }
[Code]....
View 3 Replies
Feb 15, 2011
I have created my own form for creating a new user and collecting data, I just need to do one thing, find the UserID of the newly created user before they have logged in
Here is the Code: [Code]....
How do I get the UserID of the just created user?
View 6 Replies
Oct 10, 2010
How do i set the default profile when a user logs in. I have an application where the users (once they are authenticated) are in either the logged in, premium, or promotion profile. right now it assigns none. How do i make every user automatically be part of the promotion profile.
View 2 Replies
Jun 17, 2010
I know this sounds simple, but I can't find the answer anywhere. How do I edit a user profile once it has already been created?
View 2 Replies
Jul 29, 2010
After a user has finished registration, i want to show an info message and redirect the user to the site's main page after 5 seconds. I can do a delayed redirect easily:
[Code]....
How can i call this method only when the user was succesfully created?
View 2 Replies
Jan 6, 2010
I want to change my registration control to direct users back to the page they came from before registering.
The markup looks like this:
<asp:CreateUserWizard
ID="CreateUserWizard1"
runat="server"
CompleteSuccessText="Thank you for registering" CreateUserButtonText="Submit"
CreatingUser="CreateUserWizard1_CreatingUser"
ActiveStepIndex="0"
LoginCreatedUser="true">
[code]....
View 4 Replies
Jan 30, 2010
I have two .NET applications X and Y
a. I want to have User A as a common user for both application X and Y.
b. User A can have different roles on X and Y. Eg. Read permission on Y and Write Permission on Y.
How do i configure ASP.NET membership to achieve about functionality.
View 3 Replies
Mar 17, 2011
We are using membership provider for LDAP authentication. It is working as it should.
But what all configuration settings I have to do so that
all the future requests to this application run under the security context of the Logged in user account not through the some default user set in IIS.
We need to have this working because all the permissions on the database are based on the logged in user.
We are using form authentication for LDAP authentication. And having impersonation = true in web.config.
View 1 Replies
Mar 10, 2011
I'm working on an application, where several products has their own website/application, while everything is stored in one SQL 2008 database.
When someone wants to buy a product (software licenses) they fill out a form and their info is transmitted to another site where all administration and payment is handled.
When the customer has payed with Paypal and is returned to the payment page, their info is saved to database, and a user account is created.
In order to create the user for the correct application, I use the following code to change the application name, create the user there, and change back.
[Code]....
This goes partly fine. The user is created in the aspnet_Users (in the wanted application) and assigned a role correctlu. When trying to approve the user, however, an error is thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
The user is never created in the aspnet_Membership table.
View 1 Replies
Mar 11, 2010
We are developing for a customer a series of .NET intranet applications currentlydeveloped in ASP. However we would like to avoid the users the annoyance of having of login twice when they pass from one .NET application to an ASP one, Is there any way to export the session data from one application to the other?
View 1 Replies
Oct 25, 2010
I am developing a web application. This application is fully customised based on the user settings. Suppose, application hosted on [URL] and user can signup on the website and it will get the domain like [URL] and for user2 will be [URL] so and so forth. so in this case how would I maintain the session for each user? each user will be representing a single website along with public interface and admin pages.
what I am thinking is to store all the setting (for each user) in the database and then when ever server received request then get the user info from the URL (first time only and after get it from the session) and get user details but I am not very much satisfied with this approach.
View 5 Replies
Jan 12, 2010
I am working on windows Mobile 6. I have created Mobile Application which is receiving data from webservice. Web service is working on Development End and also in UK on Mobile Device. Same application is tried from Dubai to recieve same data but an error occured to receive data. What could be problem? Application from Dubai is accessing My PC service but server at Germany is not accessible. Is there ant blockage issue from server to specific Global IP. User is accesing using Wi Fi.
View 1 Replies
Sep 12, 2010
I have an application which is installed on local pc and is using SQL db. It is a client management system where I want to add capability to register new clients and give them access to my web site which is sharing the same SQL database with local application.
At the moment clients can register on the web site and I have ASP.NET authorisation system set up with aspnetdb_user, aspnetdb_membership and etc tables. But sometimes it happens that I need to register clients on my local application on PC and ideally would like that registration to create online account for the client as well. Then I want to be able to send him user id and password by email and let him know that he has been registered in my database and online account is ready for him as well.
Basically I want to have full synchronization between asp.net membership service and local application through SQL db. As I said both online and local apps are shareing the same SQL database. what would be the best practice to implement it.
View 1 Replies
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
Mar 6, 2010
I can't catch what error is causing my web app to go to the user's error page when I use Profile.Save. I use the following code and nothing is caught:
[Code]....
Any ideas on why this doesn't catch the error, or where the error might be coming from?
View 5 Replies
Dec 23, 2010
I am looking for an opensource .Net 4.0 user profile and role management module. I need to manage basic user profile updates and management. Does any body know if such a thing exist?
View 1 Replies
May 15, 2010
Error Description while browsing the website under IIS "The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file." Initially I deleted the virtual directory, created again, set the permission to anonymous, set the browse and execute permissions, no solution. Then after doing many trials, I found out the basic problem reading the error "not allowed by the security policy". In web configuration file if we set the security policy to Fully Trusted, then problem solved and application working fine. or Set the trust level to the main configuration file in he "C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGweb.config"
View 1 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
Mar 12, 2010
The user is geeting following error while uploading a file to the asp.net page. But when I try to upload the same file, I don't get this error. Is there a way to troubleshoot this problem? Also is there a way to capture exact error? I tried to have custom error page.
Runtime error
Description
Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
View 15 Replies