Solved

Asp Log-In control working differently on 2 servers

Posted on 2012-12-24
10
405 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
 

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
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: 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Read about why website design really matters in today's demanding market.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

22 Experts available now in Live!

Get 1:1 Help Now