Solved

Asp Log-In control working differently on 2 servers

Posted on 2012-12-24
10
406 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
ID: 38719992
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
ID: 38720069
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
ID: 38720135
are we talking about asp or aspx files? ur login control is .Net framewaork Login control or a custom login control ?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:FrankBabz
ID: 38720340
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
ID: 38720362
ok.. dou ave a web.config file in ur login folder?
0
 

Author Comment

by:FrankBabz
ID: 38720448
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
ID: 38720839
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
ID: 38721781
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
ID: 38723389
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
ID: 38725728
I fixed my asp:login control parameters correctly.

Thanks for the clue (:-)
Frank
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

815 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