Security :: Login Controls Not Working Properly On Textbox Modification In Javascript?

Jun 23, 2010

I am using membership management and role management. As login controls transfer data in plain text, I am encrypting userid/password in javascript and decrypting in serverside code.

Client side javascript:

[Code]....

If i am commenting these last two lines in javascript code.

[Code]....

View 2 Replies


Similar Messages:

Javascript - Accordion Not Working Properly

Mar 7, 2011

I have to show some functionality similar to accordion that is of jquery so i made a custom function of jquery to produce the effect. there is a grid view in which there are two div's here is the code.

<asp:GridView ID="grdAccordion" runat="server" AutoGenerateColumns="false" Width="200px">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<div class="myFirstDiv" onclick="testToggle(this)">
<%#Eval("Name")%>
<div class="mySecondDiv" style="display:none">
<%#Eval("Person_Name")%>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

The second div has style property display none. by default all the div are closed.
than i have made a js function that uses the toggle function to perform the action code.

function testToggle(testDiv) {
debugger
var sntHdnValue = $('#hdnSetFlag').val();
if (sntHdnValue == 1) {
$(testDiv).find('div:first').show().attr('isOpen', 'true');
}
else {
$(testDiv)
.parents('table:first')
.find('div[isOpen=true]').removeAttr('isOpen').toggle('slow');
$(testDiv).find('div:first').show().attr('isOpen', 'true');
}
sntHdnValue++;
$('#hdnSetFlag').val(sntHdnValue);
}

here i have made use of the hidden field that let's me know that it is the initial state every thing is closed i am adding a custom attr isopen for my identification

1)the current situation is this At load everty thing should be closed.
2)than at a time only single div should be open. this is working fine. The problem is if i click on the same div that i clicked to open than it has two custom attr isopen now it breaks the second case. how to solve it.

View 1 Replies

Security :: Login The Account With The Modified username properly?

Aug 31, 2010

I have a site where I am using asp.net membership login. I have multiple companies creating login accounts, to minimize name collision I would like to append the company name on the end of the username during the login process. I can determine the company based on the url. I am able to authenticate the user in onauthenticate, but I am not sure how to actually login the account with the modified username properly.

Example: I use login JohnSmith

I append JohnSmith@company1 behind the scenes. And I authenticate the user in the onauthenticate event using validate user with this modified name.However, I really haven't stopped the JohnSmith account from being used so none of the Profile stuff works. this ability located in on loggingin or onlogged in events?

View 5 Replies

Javascript - Why ClientValidationFunction Function Is Not Working Properly

Jan 29, 2011

javascript - Why ClientValidationFunction function is not working properly

<script type="text/javascript">
function clientValidation(sender, arguments)
{
if (arguments.value == "hello world")
arguments.isvalid = true;
else
arguments.isvalid = false;
alert(arguments.isvalid);
}
</script>
<asp:Label ID="lblName" runat="server" Text="Enter Your Name" />
<asp:TextBox ID="txtbxName" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="You are Not allowed" Display="None" ClientValidationFunction="clientValidation" ValidationGroup="ValidationSummary1" />
<br />
<asp:Label ID="lblClass" runat="server" Text="Class" />
<asp:TextBox ID="txtClass" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter Clas" ControlToValidate="txtClass" Display="None" ValidationGroup="ValidationSummary1" />
<br />
<asp:ValidationSummary ValidationGroup="ValidationSummary1" ID="ValidationSummary1" runat="server" />
<br />
<asp:Button ID="Button1" runat="server" Text="Validate" ValidationGroup="ValidationSummary1" />

View 1 Replies

Security :: Logout Is Not Working Properly?

Feb 22, 2011

the web application was designed using asp.net 4.0/C# with form authentication .

logout is not working. After deleting web history, cookies, passwords, then also logout is not working.

My code is

[Code]....

View 2 Replies

Security :: Login Controls Is Not Working?

Jun 18, 2010

I know that the login controls provide some powerful "straight out of the box" functionality for creating functionality for storing and logging in users. However, all of this fucntionality seems to be based upon having a unique username, and the users email address is stored separately. The login control, http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.login.aspx, automatically creates a database http://msdn.microsoft.com/en-us/library/ms178329.aspx#the_login_control to store the user information, and looking at the table definitions, there are separate entries for the username and password in different tables.

View 5 Replies

VS 2005 Textbox Incrementation - Smallest Snippet Of Code Not Working Properly

Jan 11, 2010

I have written the code below to generate an XML document and it works a charm however the smallest snippet of code is causing me a major headache:

SNOMlabel.text += 1

For some reason this is doubling up and SNOMlabel equals 2 i have debugged the code on this line and it appears to be something to do with when it leaves the Sub btnSave_Click and enters and returns from CreateBookNode, CreateBookNode2, CreateBookNode3.

Code:

Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click
' Name of xml file to create
Dim subs = SubscriberID.Text
Dim name2 As String
Dim fdate As String
Dim length As Integer
length = Len(Page.User.Identity.Name)..........

View 8 Replies

Security :: Login Control - Redirect Not Working On Server - Working On Localhost

Feb 21, 2011

I have a login control that is working beautifully on my localhost, but not working on the server. It validates my username & password - and gives me an error if I enter an invalid username/password. However, if I enter the correct username/password, the page refreshes, but does not redirect me to the "ReturnUrl" that I see in the URL. I've seen posts on this, but nothing that I tried worked. I've tried setting the 'MembershipProvider'attribute of the login control. I don't want to set the DestinationUrl...I want it to take what is in the ReturnUrl in the querystring. I don't think it's a web.config issue cuz it works on localhost??

View 3 Replies

Forms Data Controls :: Javascript Not Working On Textbox In Repeater?

Jan 13, 2011

I have a javascript in a .js file to pad zeros to the left of a number in a textbox. I have a textbox on a search screen for which this function works just fine. But when I tried to apply the same function to a textbox in a repeater on the data entry screen, it just does nothing. I get no errors, but it doesn't pad the field when I leave it.avascript function:

function pad(tb, length) {
var str =
'' + tb.value;

[code]...

View 9 Replies

Security :: Working With Login Page,but Is Not Working?

Feb 8, 2011

am working with Login page,but is not working.so what can i do. This is my code.

string connect = ConfigurationManager.ConnectionStrings["CarsalesConnectionString"].ToString(); protected void btnLogin_Click(object sender, EventArgs e) { Session["Username"] = txtUsername.Text; Session["Password"] = txtPassword.Text; string status = "Active";
string Query = "Select * from tbl_User where Username = '" + txtUsername.Text + "' and Password = '" + txtPassword.Text + "' and Active = 1 and Status ='" + status + "' "; SqlDataAdapter cnAccess = new SqlDataAdapter(Query, connect); DataSet myAccessDataSet
= new DataSet(); cnAccess.Fill(myAccessDataSet, "tbl_User"); if (myAccessDataSet.Tables["tbl_User"].Rows.Count != 0) { //condition A lblErr.Text = "Invalid Username and Password!"; //Response.Redirect("~/Customer/CustomerForm.aspx"); //Response.Redirect("~/Mainpage.aspx");
} else { //condition B Response.Redirect("~/Mainpage.aspx"); //lblErr.Text = "Invalid Username and Password!"; }

View 2 Replies

Javascript - Event Handler For Page Modification?

Feb 10, 2011

i want to handle events that are occuring on a aspx Page specifically sharepoint webpart page .

i ddnt find anything in visual studio event receivers .

is there any way to achieve this ?

View 2 Replies

Security :: How To Disable Aspx File Modification

Apr 22, 2010

it's possible to protect aspx page from modification in a production environment?

I explain: We are developping a web application that is installed in our customers environments so once it's installed we don't manage it.

This application manages critical and encrypted data that the IT (of our customer) should not have access to, for instance their customer's password. So I would like to know if it's possible to prevent any modification of the aspx page to insert script to retrieve session data or catch keyboard entries once the web application is installed.

View 4 Replies

Security :: File Listing And Session Modification?

Oct 18, 2010

I have started to get confused with the setting and security issues of asp.net. Hope someone could answer me. Problem 1: I am curious why we have to encrypt connection string, appsetting and more in the web.config file even though file listing is set to "not allowed" on server setting. Does it mean some strangers can still view and steal such file from server? Problem 2: I know that session id is sort of protected but could
hacker be able to change the information inside ? Let say hacker browser my webpage and some data are stored in the session cookies, could they change the information inside the session cookies?

View 1 Replies

Security :: IIS Login Form Not Working

Jul 8, 2010

I am working on an e-commerce project using ASP.Net and C#.Net (Visual Studio 2005-Windows XP).

I am facing problems in the login module. I created the login accounts using the roles and users in the ASP.Net Website Administration Tool. The login module is working fine when I test the website within the Visual Studio. I mean the login form is working properly under the Development Server integrated in the Visual Studio. What I want is to make this work properly under IIS (i.e. the Production Server). When I deployed the project to the IIS, the login form with the login control is displayed, but cannot login and gives a login failed message. . I have searched about this issue in Google and they are providing good tutorial links to solve this issue. Even after reading those I couldn't solve this as I am new to Web Development. Can you provide me a sample source code with the web.config and also a description of the major steps in configuring IIS to support the role based login?

I had gone through the following titles under google

"Always set the "applicationName" property when configuring ASP.NET 2.0 Membership and other Providers".

View 35 Replies

Security :: Login Control Not Working With IIS 5.1?

Dec 28, 2010

I was hoping someone could run me through how to get the login control working properly on my website. I have seen many people's posts on a similar issue, but nothing seems to have worked, and I think I may have been doing something wrong.

Here's what I've done:-

MY SETUP

I am using my laptop with Windows XP Professional Edition, which is running IIS 5.1. I have setup my system with the Web Platform Installer, which uses Visual Web Developer and SQL Server Express 2008.

I added a database in SQL Management Studio, and created an ASP.NET Membership Schema to it using the aspnet_regsql.exe tool. In my web.config file, I created a connection string to this database used both in the code, and with the asp membership.

<add name="ManagementCentral" connectionString="Data Source=localhostSQLEXPRESS;Initial Catalog=ManagementCentral;Integrated Security=TRUE;" providerName="System.Data.SqlClient" />

According to all tutorials I have seen on the ASP.NET login control, I am using <authentication mode="Forms"> in my web.config.

TESTING:

When I run my website via debugging in Visual Web Developer, everything works fine. I can view my site, log in, and it all works as expected.

MOVING TO IIS:

I have set up my site in IIS 5.1, and can access my site through a browser by going to ttp://website.local, as set up in IIS and my hosts file. The site comes up fine, but when I try to login through the login control, I now get the error:-

Cannot open database "ManagementCentral" requested by the login. The login failed.
Login failed for user 'LAPTOPASPNET'.

FIXING ATTEMPTS:-

I have looked through numerous posts and blogs saying that to fix this, I need to grant database access to my ASPNET user, or set up 'impersonation'. The problem is, as you can tell by my connection string, I don't actually have a user called 'ASPNET'. I have checked this in my database.

I tried adding a new user, which has a SQL Server Authentication and password, and db_owner access to my 'Management Central' database. I then added this information into my web.config connection string, which now looks like this:-

<add name="ManagementCentral" connectionString="Data Source=localhostSQLEXPRESS;Initial Catalog=ManagementCentral;Integrated Security=TRUE;Uid=ASPNET;Pwd=p@ssword" providerName="System.Data.SqlClient" />

I also added a line for 'impersonation':-

<identity impersonate="false" userName="localhostASPNET" password="p@ssword" />

View 1 Replies

Security :: Membership Login Stoped Working?

Sep 30, 2010

I have a web app that uses the Membership Provider to authenticate users.Everything worked fine until today... when I tryed to log in it failed. I looked in the database if something went wrong there and the user is deleted but everything looks fine there.I tryed to recover the password using the user name and i got an error that the user is not recognized.I tyed to recover the password (even though I am sure what the password is) but still no luck... (I get an error that hased passwords can not be decrypted)I triyed it in local host and guess what ... still the same... this is the provider section in my web config

[Code]....

View 6 Replies

Security :: Login Control Not Working After Deployment

Dec 11, 2010

just basically as it says in the subject. After I deploy my asp.net 4.0 website, the login control just refreshes itself after a valid username and password have been filled in instead of doing a redirect. The connection to the database works, because I can register and stuff from the database shows up in my website.

View 4 Replies

Security :: 'Remeber Me ' Is Not Working In Login Control?

Mar 15, 2010

In my login control the 'Remember Me' is not working . Can anyone say what is the problem?

i have coded as below:

[Code]....

View 7 Replies

Security :: Login Control Not Working On The Server?

Feb 9, 2010

I made a login control in a webapplication with a membership provider and a role provider. The problem is when I enter the username and the password in the login control (on my system i.e localhost) the user authenticated and redirected without any problem, but when I deploy my webapplication with my database on a host server the login control cant authenticate the same user and tells me "Login attempt was not successful".

View 8 Replies

Security :: Redirect To Login Page Not Working?

Jun 7, 2010

I have a web application where all the pages inherit from a base class, where i have written some methods common to all pagesHere is the code i have written for logout event.

this.Session.Abandon();
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();

My expectation is once the user logs out and if he tries to access any url directly by typing in the browser he should be redirect to login page.But this is not happening now. I have checked the session. it is getting cleared properly while logout. But the user is take in to the screen. How can i fix this? I am looking for something which i can write in the base class so thati need to have to write the same in all the pages. Also this should work in the case of login page(it should not redirect to login page again if try to access login page once user logs out. please not login page also inherits base class).

View 4 Replies

Security :: Login Plus Custom Login Using The Standaard Login Controls?

Apr 12, 2010

After reading a book I brought on ASP.net I fould the login controls to be very nice.I have set it up in my application so that customers can login using the standaard login controls and things were going smooth.But in my schema for my application I also have a table for customers (firstName, LastName, DOB, etc).And of course the customersID is used as a foreign key to tables such as Orders, Addresses (Home, Work, Postal).

The thing is how to i associate an asp.net login to a customer name in my table so that the CustomerID can be used through the application by knowing who is logged in.

View 7 Replies

Security :: Login Control DestinationPageUrl Override Not Working?

Feb 5, 2011

When a user logs in I check whether they have the minimum profile info entered. If they do not then I want to redirect them to the account maintenance page, otherwise I want to redirect them to the page where the login link was clicked. To accomplish this. I am trying to override DestinationPageUrl at the LoggedIn event. Isn't working ... the redirect is always to the page where the login link was clicked. Here's my (relevant) code:

[Code]....

View 2 Replies

Security :: Login Control Page Remember Me Not Working?

Aug 12, 2010

why the remember me option of the login control would not be working? Are there some special settings we need to set?

View 13 Replies

Web Forms :: Controls In Different Panels Not Working Properly

Aug 12, 2010

controls in different panels not working properly

View 1 Replies

Security :: Adding A Textbox To A Login Control?

May 18, 2010

i would like to add another text box to the login control and pass the contents to a variable. how do you access the text property of the text box after you have added it to the template view? i am using asp.net 2.0

View 3 Replies







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