Web Forms :: User Name Not Authenticating?

Oct 20, 2010

I have a website that requires a login. I'm used the login wizard in asp.net 2008. The site is in vesion 2.0 as that is what the hosting company allows. The login scipt apprears to work appropriately in that if the the wrong username or password is entered the error appears and the url for the login page doesn't work. Once the correct identification info is entered, the user is taken to the correct url.

The problem is that the username does not seem to "stick" for lack of a better word. The site is used to order wedding photos. The user selects the photos and all the required date EXCEPT the user name is entered into the database. This is a problem since there is no way to filter the order when the person goes to the shopping cart therefore the shopping cart opens with no product in it. To make matters more frustrating, IT USED TO WORK! I don't understand why its not working now.

The hosting company, 1and1.com has looked over the code and can't find anything wrong with it. Their one suggestion was to add the following "patch" code to the web.config file as a "work around", and if that didn't work to try using vwd 2010. I'm hesitant to do that since I've not used it before and don't want to make matters worse.

I'm including my web.config page as well as a sample of the code behind to see

[Code]....

View 9 Replies


Similar Messages:

Authenticating An User Via Wcf?

Sep 5, 2010

I have a java app with a .net application running in the java applications embedded browser.

I want the java application to call a .net WCF or web service with a username and password.

The wcf will set the user to authorized in forms authentication.

In the java desktop application I will then load a .aspx page that was protected via forms authentication.

How can I accomplish this? Is it even possible...?

View 1 Replies

Security :: User Login Fails When Authenticating A Users?

Apr 25, 2010

I have a website that requires users to login, but I am having problems when authenticating a users.I create a user which works fine, I then test the login on the development machine and everything works fine the user is logged in.But if a try to login the user in via the live website (same database) I get errors stating that the login attempt has failed.I don't understand why it would work on the development machine but won't work with the live version of the website.

View 5 Replies

Security :: Authenticating User After Logout And Redirect To Login Page

Dec 20, 2010

In my web application when I start my webpage from Visual Studio the URL to my ligin page looks like this:

[Code]....

And when logging out, the following are executed:

[Code]....

Question: I need to have the return URL set to Default.aspx as it is when logging in the first time. Does anyone know how I can achieve that?

View 1 Replies

Security :: Authenticating User - Textbox Shouldn't Display Current Windows Login Name

Jun 3, 2010

I am using Login control and validationg the user against SQL datasource. below is the code:

Protected
Sub Login1_Authenticate(ByVal sender
As
Object,
ByVal e
As System.Web.UI.WebControls.AuthenticateEventArgs)
Handles Login1.Authenticate
e.Authenticated = IsValidUser()If IsValidUser() =
True
Then
Response.Redirect("Orders.aspx")End
If
End
Sub
Here is IsValidUser
Private Function IsValidUser() As Boolean
Try
Dim sql As String = String.Empty
Dim RecCount As Integer = 0
sql = "Select count(*) from UserLogins where UserName='" & clsDB.RemoveQuote(Me.Login1.UserName.Trim) & "'"
sql = sql & " AND UserPass='" & Me.Login1.Password.Trim & "'"
RecCount = clsDB.ExeScalar(sql)
'If Invalid ==> 0 means no record is being returned by Query
If RecCount = 0 Then
IsValidUser = False
'MessageBox.Show("Invalid User Name/Password.", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Function
End If
If RecCount = 1 Then
IsValidUser = True
Exit Function
End If
'Error handler
Catch ex As Exception
End Try
End Function

Here comes the problem validation code is working fine and it validates the user and redirects the user to the "Order.aspx" page

For example: I type
Login Name: Nashy
Password: 1234

Order.aspx page has a textbox which supposed to display the current user login name and i am usiong the following code for that

textbox1.text=Web.HttpContext.Current.User.Identity.Name.tostring()

when i test it on my local PC it shows the current user like this DOMAIN ashyMastrew.. what i want that the textbox should disply "nashy" not my current windows login name. and when i deploy it to the server and access it from other pc textbox does not show anything.

View 5 Replies

Security :: Trouble Authenticating From Non-SSL To SSL?

Mar 21, 2010

I have an ASP.NET 3.5 Web Application using the Default membership provide provided by .NET - I have created a login page and create user page, etc. etc... The problem is, if you're on the site and you are authenticated, and then you go to a link on the same authenticated folder (Called MemberPages) but you go to a SSL location, it asks you to enter your username and password again! Is there anyway to fix this bug.HomePage -> Login.aspx -> Enter your username and password -> Access MemberPages/Default.aspx -> Then a link called Purchase a Product -> suppose to take you to[URL]

View 1 Replies

.net - Authenticating A Mobile App Against A WCF Service?

Jun 4, 2010

We are working with a vendor to develop a mobile app and plan on using WCF services to handle operations. What are some types of authentication I can use with a WCF service? Would we send a user name and password through the SOAP header? How can we accomplish this securely?

Also, this will be authenticated against our .NET membership database using the Membership classes.

View 1 Replies

Security :: Authenticating Through A Webservice?

Jun 9, 2010

Does anyone have an example of authenticating through a webservice ?I have a website that allows users to login in using the <asp:Login> control.After they are authenticated I want them to use a webservice to add records, modify records. (The web service will be used later by external sites).I have a webservice up and running which the aspx page "authenticates" to using Profile.UserName.Is there a way to get the aspx page to send the username and password used at log on without having the user enter it each time ?And then how do I authenticate them ? (maybe using Membership.ValidateUser ?)

View 1 Replies

Authenticating SQL Connection Using Certificates In .NET?

Jun 8, 2010

I've noticed that it is possible SQL Server 2005/2008 to authenticate replication accounts using certificates. Is it possible to authenticate .NET SqlConnection in the same manor?

Ideally, I'd like to do away with password authentication completely and have the aspnet user connect using a certificate stored against its account.

View 2 Replies

Controls :: Cannot Get Message Count Without Authenticating Yourself Towards Server First

Oct 21, 2015

I used your url...to read mail and I downloaded your project when I run project I filled my gmail credential : smtp.gmail.com, uid, password and port=995 and checked SSL but I gor error.You cannot get the message count without authenticating yourself towards the server first.

View 1 Replies

Membership Provider Authentication Not Working Authenticating WCF Service

Oct 27, 2010

I have a SqlMembershipProvider store with Roles enabled. This is configured and has the user "devtest" in the roles "xxUser" and "xxAdmin".

I also have a WCF service, which I want to authenticate and authorize against. My problem is that:

the authorisation is not happening, code just executes despite the policy attribute I don't get any identity or security context so do not know who is calling the service I need: to know which user is calling the
method some degree of rejecting users if permissions don't match (ideally this should be performed
within the RoleProvider/MembershipProvider/WCF but can do it myself if I have to) SSL in transport

I have my service contract set up thus:

[ServiceContract]
public interface ISupportService
{
[OperationContract]
[PrincipalPermission(SecurityAction.Demand, Role = "ThisRoleDoesNotExist")]
List<BaseInterestRate> GetAllBaseInterestRates();
}
the code is simple enough:
public class SupportService : ISupportService
{
public List<BaseInterestRate> GetAllBaseInterestRates()
{
OperationContext operationContext = OperationContext.Current;
ServiceSecurityContext serviceSecurityContext = ServiceSecurityContext.Current; // is always null
using (xxxEntities entities = new xxxEntities())
{
return new List<BaseInterestRate>(entities.BaseInterestRates);
}
}}
My service configuration is thus:
-->
<behaviors>
<serviceBehaviors>
<behavior name="SupportServiceBehavior">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="SqlMembershipProvider" />
</serviceCredentials>
</behavior>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Having already configured the MembershipProvider:

<membership defaultProvider="SqlMembershipProvider" >
<providers>
<clear/>
<add name="SqlMembershipProvider"
connectionStringName="SqlMembershipProvider"
applicationName="xxx"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager enabled="true">
<providers>
<clear />
<add connectionStringName="SqlMembershipProvider" applicationName="xxx"
name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
<add applicationName="xxx" name="AspNetWindowsTokenRoleProvider
type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>

I have followed the instructions at these pages to the letter:

How to: Use the SQL Server Role Provider with Windows Authentication in WCF Calling from Windows Forms (MSDN)
How to: Create and Install Temporary Client Certificates in WCF During Development (MSDN)
How to: Use wsHttpBinding with Username Authentication and TransportWithMessageCredentials in WCF Calling from Windows Forms (MSDN)
Also quite useful found via SO: Use Asp.Net Membership provider with a WCF .svc service (Alkampfer's Place)

I would at lest expect an issue with certificates/transport/etc. to fail with exceptions, but I can debug right in and over the WCF call. I have no security context/ user context available to me and when I use a user not in the two mentioned roles (which I do in the code example above), I don't get "kicked out".

My client app is currently a Web App, but will ultimately also serve a Windows Forms app and Test suite. I'm currently using the ASP.NET WebDev server and am running .NET 4.0.

Am I missing something?

View 1 Replies

SQL Server :: How To Create A Stored Procedure For Authenticating Users

Nov 11, 2010

trying to create a stored procedure to authenticate users, if users are authenticated their data like userid, first name, etc are returned in a cursor. However, if users are not authenticated an error is returned or something that indicates users were not authenticated.

But I don't know how to do this in a stored procedure.

View 2 Replies

State Management :: Authenticating Users In Multiple Subdomains?

Aug 31, 2010

I have a main website say www.main.com which is developed in asp.net. We have used forms authetications here.

Now the thing is I have a no of subdomains on the same server say domain1.main.com, domain2.main.com, domain3.main.com etc.

I had put some functionality there. What i want is when i redirect my users to the subdomains user has to log in again.

what are the method where i can preserve the users state in my subdomains also.

View 5 Replies

Security :: Authenticating Internal Users Against Active Directory?

Mar 23, 2011

I have a asp.net (3.5) web-app that will be used in an intranet. I need to enforce that users type in their network credentials (windows credentials) before they can log into this application. I intentionally need to disallow Integrated Windows Authentication. I need to authenticate these users against my company's Active Directory, that is obviously on the same network as my .net web app.

I have been reading a bit about Forms Authentication using ActiveDirectoryMembershipProvider - [URL]. I also stumbled upon this - [URL]. Based on what I can tell, both seem to do what I need to get done. Could somebody tell me what are the major differences, pros/cons and when you would use which method? Or are these exactly identical, and both achieve the exact same results?

From the security perspective...what do I need to watch for? I am assuming if I use SSL that will cover me for when I pass the username/pwd to AD for verification?

View 1 Replies

C# - On Server Side, It's Authenticating Google Service, It's Receiving Auth Code Then It's Invoking To C2dm Send Url?

Dec 22, 2010

I have created an android app, that registering to google c2dm service. And It's getting a registration_id token from c2dm services successfully. I already signed Android Cloud to Device Messaging form and I received confirmation email from c2dm service.Everything seems ok in client side, it's getting registration_id in simulator environment. So, it's ok. But, On server side, It's authenticating google service, it's receiving Auth code then it's invoking to c2dm send url with below code.

public void SendMessage(string registrationId, string data)
{
ServicePointManager.ServerCertificateValidationCallback += delegate(

[code]...

View 2 Replies

Security :: Redirect After Re-authenticating Back To "Page B" And An Error Is Produced Because A Session Variable Wasn't Loaded?

Mar 29, 2011

For my current project I am using form authentication.What occasionally will happen is a user will timeout (unbeknownst to them),they try navigating to a different page (call it Page B) and they get kicked back to the login screen.This is fine and I have no problems with this.

However,after they enter their credentials and are authenticated they are redirected back to "Page B" and an error is produced because a session variable wasn't loaded. This is due to the fact that they were redirected to "Page B" instead of the page they would normally hit after a login (call it Page A).Is there anyway to force the user to go to Page A instead of Page B in these situation to avoid these errors?

View 2 Replies

Web Forms :: User Controls Are Null When Referenced Inside The Code Behind For The User Control?

Sep 1, 2010

I have an ASP.NET 4.0 application with some simple user controls. The user controls work fine on the design surface (VS.NET 2010), but when they're loaded during application execution, nothing shows up.

Futhermore, the various child controls of the user controls are null when referenced inside the code behind for the user control.

The code behind for the user control executes as expected, but any reference to child controls are null.

It's like ASP.NET is never parsing the ASCX to create the instances of the child controls.

View 4 Replies

User Controls :: How To Track And Save Time User Uses Application In Windows Forms

May 7, 2015

I did a winforms applicaion using C#. I has 'n' number of forms.I like to track application usage time from user login to application exit.

View 1 Replies

Web Forms :: When New User Register / Get Pre-designed Page From Where User Can Update Profile?

Apr 20, 2010

I am working on Social Networking Website. My problem is that

when new user will register he/she will get Pre-designed Profile page from where user can update profile.

View 5 Replies

Web Forms :: Web Parts And Anonymous User And Authenticated User Is Displayed Differently?

Mar 21, 2011

the Web Part for anonymous user and authenticated user is displayed differently. I faced this problem twise. First time when used Silverlight control in the Web Part and second time when used devexpress control in the Web Part. In both cases problem was with displaying for anonymous user. Silverlight control didn't display. Devexpress control lost it's styles. Both controls had properties that pointed to files. Silverlight control property pointed to the XAP file, and Devexpress control property pointed to the CSS file. It seems to me, that for anonymous user the Web Part cannot find this path or doesn't allow to link to other files.

View 1 Replies

Web Forms :: Force User Change Password When User Logs In First Time

Oct 11, 2012

if user login first time in application in how i promot for change password in Asp.Net C#.

View 1 Replies

Web Forms :: Restrict User To Edit Particular Records If Other User Is Editing Them In SQL Server?

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

User Controls :: Automatically Login User Using Forms Authentication And Cookies

May 7, 2015

i develope asp.net web site based on users authentication.

How can i promiss that user who logins to the site and closes and explorer, could reopen it and be connected without insert his user & password again.

View 1 Replies

Web Forms :: Account Page Shows Only Information For First Created User, Not The Info On Logged In User?

Mar 4, 2010

I have the membership provider and the create user with tow steps, one of the steps contains a custom registration form, for each created user data will be in the database, and there is an account page shows the data that the new created user did insert during the registration process on the custom registration page,

the problem, when the user is created and logged into his account page, this account page shows only the information for the first created user, not the info on the logged in user , but the logged in user data still saved in database and not showing on his account page?

This is web.confg code:

<?xml version="1.0"?>

View 22 Replies

Web Forms :: On Logout Redirect User To Login Page If User Clicks Back Button Of The Browser

Jul 9, 2010

after user loggs out if he clicks the browsers back button then users had to be redirected to login page

doenst matter how many time the user clicks on back button take him to login page

how to achieve this let me know

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved