.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Password protecting entire website (that already has a login feature)?

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net


I have a website that's still in development however I've placed it up onto our new domain name to allow a few others to see what's going on with the site development.

I want to prevent anyone else from coming in to see the site just yet however, so I want to have the site redirect to a login whenever you try to hit any page within the site.  Here's the problem though....my website already has it's own login included as part of the website in order for a member to get to their account info.  So I essentially want 2 separate logins: 1 just to see the site and a 2nd one as part of my overall website user account details section.  My concern is if I develop this new login to block users to see the site, my other login may experience issues.

How can I create this login to protect my entire site while still in development and yet keep login credentials separate from my actual website's login feature?  Or even better yet, is there some 3rd party tool I can implement to do this for me?


View Complete Post

More Related Resource Links

Login database with visual studio 2010 asp website template


Has anyone deployed a website using the login database in the visual studio 2010 asp website template? I was wondering if I could look at someone's example to see how the integrated this into their website.

how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

>>> Open a Popup window on Successful Login if something new added to website.

Hi, I would like to open a Popup window in Parallel if user Login successfully. The popup will give updates to the user that what's new added to the website. The popup will open only once if user login. If he logout and will re-login then it should not popup as we'll assume that he has been notified earlier. I have users table with user id's. It is for information that I am working in Framework 2.0 and not allowed to use any third party or AjaxToolkit. Therefore javascript or any other technique will resolve the issue. Any idea with coding example would be helpful.

Login to SPSite\SPWeb through console app using user/password

Hi,I'm developing some basic console application which interacts with SharePoint site through the object mode. I'm using:SPSite site = new SPSite(MySiteUrl); SPWeb web = site.OpenWeb(); This way, current windows user is acessing the site. Is it possible to supply the user with username/password to be able to acess with different credentials than current?Thanks in advance!

return url in aspx refreshes the page when I click login after entering user name and password

Hello,   I need help as I am struggling to login into my web portal on my new sony vaio laptop. I think that I need to do some settings, or download some plugin. Infact I don't know what to do, as I have spent many hours trying to login, but no success. Below is my office website:   http://www.lantec-uk.net/SignIn.aspx?ReturnUrl=%2fdefault.aspx When I enter my credentials and click login, the web page gets refreshed, i.e username and password get erased, rather than taking me into my web-portal. The laptop is having windows 7 home premium, with ie8. I have also tried installing firefox, chrome, opera and safari, but same problem. Somebody please help, as sony has refused to take the laptop back and they are saying that there is problem with website. Similarly, website staff are saying that there is a problem with the laptop and not with the website.   Any help highly appreciated. 

Can I have an SQL Express database open in VS2010E along with the website? "Login failed for user ..

Hi, as the topic says..Whenever I have my database open in Visual Studio 2010 Express, I get this error:Cannot open user default database. Login failed.Login failed for user 'IIS APPPOOL\DefaultAppPool'.Cannot open user default database. Login failed.Login failed for user 'IIS APPPOOL\DefaultAppPool'.

Get Login in Application without Entering username and password in Digest Authntication.

Hello Frd'si am using Form authntication and Digest authntication mode. Foe getting Logon computer username i m using digest authntication mode. But when i browse website it's asking for username and password. while already windows login with the same username.I understood that in this auhtntication mode it's required. But r there any configuration with it i am not getting this Prompt ? Any group ploicy ??For IE i have added website into trusted zone but still it's asking for username and password.R there any other way i getting Computer logon name in asp.net application. There are But only work when i run from Editor from IIS it's not retuning value.If you give me some hint or articals link then i m very thnak ful to you.Thank you.

Forgot Password link in Sharepoint FBA login page

Hi All,      I want to keep the Forgot Password link in the login page of the Sharepoint FBA Site.     For this, i have make a copy of the login page in the 12 Hive and added an anchor tag by giving link to Forgot Password (FP) page in custom login page. The FP page is located in one of the document library, for which i have given anonymous access to view items there. Its all good, and i am able to navigate to FP page. But i dont want to show any other controls in the master page also to the anonymous user. And one more thing, i have two zones 1)Intranet and 2)extranet, i want to show different FP pages for both. How can i do this...? Please suggest me with this issue...... Thanks in advance

how to get user name in window login and show in our website


if any one login how to get user name and show in our web page

and how to get location of client side (Physically Ex-India -Delhi-Anand Vihar)

Login from another domain to my website


Hello every one and thanks in advance any help is much appreciated.

I have a small website that uses the asp login control and now i want to allow a user login from another website that i have. The problem is the other website is only html not aspx and i'm not sure how to write the form to login. here is the login i'm currently using:

  <asp:Login ID="Login1" runat="server" onauthenticate="Login1_Authenticate" Width="235px">
                                        <table border="0" cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
                                                    <table border="0" cellpadding="0">
                                                            <td align="center" colspan="2">
                                                                Customer Login</td>

Authentication (login - username/password)



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 godaddy.com so I'm also getting used to their way of doing things.

Hope someone can help.


Find User Password by Username Before Login


hi guys,

I have only username. and want to check and grab the password from the database. It is BEFORE LOGGING IN. so I don't think the build-in asp.net functions could be used, right?

thanks a lot!!

Login Control Works But Can't Log Back In with Password


Good Day,


This is weird:

website: icethestore.com (I know the site is not visually appealing, I'm just trying to get the functionality correct for now!

If you click my login link, you are taken to the login.aspx page - which I have named The Membership Center.

If you create an account - you account information will be sent to the email address you registered with.

After getting the email and copying the password, I return to the membership page and change the password, and get a message that my password change was successful.

Now here is what is strange:

If I use the original password sent (meaning I did not change it) or even if I changed it and I use the password I changed it to (with no errors) i only get a message : Your login attempt was not successful. Please try again.

I am just using default login control, createnewuserwizard control and password change control.

Yet, if I choose to recover my password (again using the default control) - I do get an email with my account name and a new password that it has been changed to, but, still can not login with that password either, still get: Your login attempt was not successful. Please try again.

I check my database and the memberships and users are there!

Please, any help on what could be wrong is appreciated!


Add ReportViewer httphandler and entire website errors


I have a site thats working fine - I added a page with a reportviewer control and get the error message

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file.  Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file.

I added this to the system.web section of web.config, and when I do - the entire site no longer works, I get a "500 - Internal server error." 

The web.config currently reads:

<?xml version="1.0"?>
		<add connectionString="Server=server;
         User ID=user;
         Password= password" 

unable to login into website on iis 6.0


I have created a website that uses the default aspnetdb.mdf database for membership and I have a login control on my index.aspx page. I have restricted access to certain pages through using roles and it all works fine. But when I deploy the website to my iis site that uses the C:\Inetpub\wwwroot i am simply unable to login. It does not come up with an error it just says my username or password were unsuccessful. I cannot find why it is not working. I believe iis is configured correctly, and I have made sure all my application names are correct as per scott guthrie's blog on the subject. My site still implements an authentication system because i cannot type in a page in the url that is restricted, its just that i cannot login myself.

 Any help would be very much appreciated i am struggling with this.

 Thanks in advance


p.s if there is any part of my web config or anything that you need me to post please tell me.

Can't login to website from Visual Studio 2010


I created a local copy of my website, so I could work on it in Visual Studio 2010. I am using a SQL membership provider that is running on discountAsp.net's SQL Server 2008 R2. The website works fine online, but when I run the website from Visual Studio, I can't log in. It's strange because if I open up my website in Visual Studio I can still use my admin pages to add and delete users, view users info, change passwords, etc., but I just can't get authenticated. This just makes it hard to test my pages that are restricted to certain users and roles.


Anybody know what this might be? Thanks in advance.

How to check (login Credentials) user name and password to access sharepoint server 2007 programmati

my issue is...

while user entered his/her Username:xyz
i need to check programmatically either username & password exists ot not in sharepoint server 2007 from windows form application.

and i know how to check username,but i don't know how to check password.

you can check username in below ways..

 SPSite SharepointSiteObj = new SPSite(SiteUrl);
 SPWeb SharepointWebObj = SharepointSiteObj.OpenWeb("/");

 SPUserToken token=SharepointWebObj.AllUsers[userName]

from this i can get user name..




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend