Solved

Asp Log-In control working differently on 2 servers

Posted on 2012-12-24
10
410 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

624 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