PDA

View Full Version : Login Redirects to Wrong Domain


wisemx
01-23-2008, 01:08 AM
Possibly in your web.config?

wdarnellg
01-23-2008, 01:55 AM
I can't find anything in the web.config that would cause that. Membership and Role providers look normal and appropriate. I removed all of the files from the remote site and I thought it interesting that the home page still came up despite it 'not being there'. I am fairly new to this, and amazed at the baffling things I am encountering.

wisemx
01-23-2008, 01:58 AM
Use a good code editor, Visual Studio, Dreamweaver or even Windows Search...
Look for the resulting domain name in your entire project, all folders.
That's a place to start anyway.

I mention Dreamweaver because it has unreal search capabilities.
Visual Studio is what I use for coding but to Find or Replace inside projects I use Dreamweaver MX 2004.

wdarnellg
01-23-2008, 02:37 AM
I used Visual Studio, (I don't have Dreamweaver) and the referrences to the 'other site' are in the form of links and should NOT be the result of simply logging in. But also I may not be using the search correctly. I simply typed in "bbitennis.com" and had it 'Find All' in the entire solution. It just found the links in the Master pages button links.
Also, I don't have that login problem on my machine, it is onmy discountasp.net site that I am having the issue. Is there a way to search the files up there?

wdarnellg
01-23-2008, 02:59 AM
Ok, I don't know why this wasn't obvious to me from the beginning, but I did a 'sync' of the entire site and set any differences to default to my local files. That seems to have done the trick. At least the 'Find All' idea got me paying attention to the tools in front of me a little closer.


Thanks man.

wdarnellg
01-23-2008, 03:59 AM
I have a problem somewhere in my code that seems to be very well hidden. My login contro is supposed to send users to one page or a different page depending on their role. Somehow, however, when the user is logged in, they are sent to a completely different site and page that I also manage. None of the properties or code points to this domain or page that I can see, yet it happens. I must add that this happens from discountasp.net, I can run everything perfectly from my localhost machine.Joe from discountasp was able to duplicate the behavior, but not able to help with any possible causes or solutions.



<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div class="contentbox2-full">
<asp:Login ID="HOTTLogin" runat="server" CreateUserText="Join HOTTennis"
CreateUserUrl="~/JoinHOTT.aspx"
DisplayRememberMe="False" Width="100%" Font-Bold="True" Font-Size="Small"
Height="158px" FailureAction="RedirectToLoginPage"
DestinationPageUrl="~/Default.aspx">
</asp:Login>
</div>


************************************ Default.aspx ************************************************


************************************ Default Page After Login ***************************************

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If User.IsInRole("HOTTAdmin") Or User.IsInRole("HOTTDarnell") Then
Response.Redirect("~/Administr/ViewPlayersParents.aspx")
End If

End Sub

wdarnellg
01-23-2008, 05:31 AM
OOOOps... Spoke too soon. I DID work for a couple of logins. But the behavior is back. I just don't get it.