Solved

Asp Log-In control working differently on 2 servers

Posted on 2012-12-24
10
401 Views
Last Modified: 2013-11-19
My VB web ap has an asp log-in control in two places: 1) Home Page, and on a 2) a Log-in page.

I can publish (VS2010) my ap to either of two servers (almost identical?) (WS2003, iis 6, and Net 4).

On my workstation (localhost testing), and on Server #1 both Log-in controls work fine.

On Server #2 the Log-in control on the Home Page works fine.  However, the Log-in control on the "Log-in" page does not work.  When I press the Log-in button the screen flickers normally, but it does not perform the Log-in. It does not throw an exception.  The remainder of my web pages seem to work just fine wherever they are run.

Thanks in advance for some clues.
Frank
0
Comment
Question by:FrankBabz
  • 5
  • 5
10 Comments
 
LVL 19

Expert Comment

by:Melih SARICA
Comment Utility
do u ave an subdirectory for login page ? If so check if there is an web.config file in the sub directory of the login page.

and also check that login pages on ur local and deployed are the same.

And also try to deploy with deleting everything( especially bin directory)
0
 

Author Comment

by:FrankBabz
Comment Utility
Thanks for your assistance and questions.....

My 'home page'  (default.asp) is in my root directory.   Default.asp contains the log-in control that always works fine.  All my web site pages perform under a common MasterPage.master also located in this root directory. My Web.config is also in that same root directory.    

A subdirectory of the root is titled 'bin' that I never mess with.

I have a subdirectory of the root titled 'LogIn' that contains all my pages associated with managing authentication, passwords, new accounts, roles, etc.  In the 'LogIn' directory is 'LogIn.asp' that contains the LogIn control that has the problem.

My MasterPage contains a button that when clicked summons 'LogIn.asp'

When I publish, it is always a full publish of evertything. When I am asked if OK to delete, I always say Yes.    I have never tried No.

Aside from above login.asp problem, a new publish causes another problem for me as one of my pages tries to build an XML file into the root that will always fail due to a permission problem.  For now, and to make it work, I always have to add permissions manually.   My reason for mentioning this is making me wonder if there is a similar permission problem with Login.asp... and for some reason the log-in control ignores the problem and it just fails without throwing an exception.

Thanks,
Frank
0
 
LVL 19

Expert Comment

by:Melih SARICA
Comment Utility
are we talking about asp or aspx files? ur login control is .Net framewaork Login control or a custom login control ?
0
 

Author Comment

by:FrankBabz
Comment Utility
All web pages are aspx... The <asp:Login></asp:Login> controls used are those found in the toolbox "Login" folder in VS2010

Sorry if I wasn't clear.....    Frank
0
 
LVL 19

Expert Comment

by:Melih SARICA
Comment Utility
ok.. dou ave a web.config file in ur login folder?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:FrankBabz
Comment Utility
No.

I only have a web.config file in the root with my default.aspx and some other aspx files.

Frank
0
 
LVL 19

Expert Comment

by:Melih SARICA
Comment Utility
Check Login pages login control did u set any membershipprovider.

Can u send the aspx page source of both login controls
0
 

Author Comment

by:FrankBabz
Comment Utility
I appreciate your offer to debug my code, and please accept that I want to figure this out with your much appreciated assistance.  Here is what I have done:

In "Page_Load" I added this code:

    If IsPostback then exit sub

    Dim MU As MembershipUser = Membership.GetUser(My.User.Name)
    Dim MyUser As String = "", MyUserMsg As String = ""
    If Not IsNothing(MU) Then MyUser = MU.UserName
    If MyUser = "" Then MyUserMsg = "You need to LogIn " Else MyUserMsg = "Logged in as '" & MyUser & "' "
    '
    Dim ProvMsg As String = ""
    Dim MembProvName As String = Membership.Provider.Name
    If IsNothing(MembProvName) Then ProvMsg = "No Provider" Else ProvMsg = "Provider: " & MembProvName
    ' ...above should be: 'AspNetSqlMembershipProvider
    ' ...see what we have collected and show in debug message
    Master.MasterINFOmsg = MyUserMsg & "; " & ProvMsg   ' Show this message

I have run the above at home in localhost debug and it is giving the proper answers.  As soon as I provide credentials and click the login button, it advises correctly with my user name.  It all cases it provides I am usiing the 'AspNetSqlMembershipProvider'

My next step would be to take code to office to try it there in localhost, and if OK, publish to my office web site to see if all responses remain the same or change.

If you concur or would like to change some code, or my plan, please let me know.  Please know I appreciate your help.

Thanks,
Frank
0
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 500 total points
Comment Utility
this seems like a custom handling..
Let ASP:logincontrol handle that for u ..

Set asp:login control parameters correctly then it ll work..
0
 

Author Closing Comment

by:FrankBabz
Comment Utility
I fixed my asp:login control parameters correctly.

Thanks for the clue (:-)
Frank
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now