CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 8/3/2007 8:17:16 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 15 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
sleekdigital
Asp.Net User
login control in IE with host header8/3/2007 8:17:16 PM

0/0

Quick description of the problem...

In IE the login control is not working when I use a host header to access a site I am developing.

Longer explaination...

I'm playing around with the membership provider in ASP.NET 2.0.  So I download the code from the "getting started" video tutorials... http://download.microsoft.com/download/2/3/4/2340602d-ed7b-48b4-a4a1-ba303a5ef296/Membership_CS.msi

When I access the site as a file system site or using localhost as an http site, the login works fine.  But I like to use host headers so I can access the site by a specific name.  When I set that up the login no longer works in IE.

I did some investigating with Fiddler and I notice that when I visit the site initially with localhost, a number of cookies are set, including .aspxanonymous.  When I use the my host header, the cookies are not there.  Same goes for the .aspxauth cookie that you normally see during login... I can see the "set cookie" in the response header, but I never see it in subsequent request headers.

Anyone know what is going on here?  Why would using a host header cause a problem like this?

Freakyuno
Asp.Net User
Re: login control in IE with host header8/3/2007 8:29:29 PM

0/0

It's actually a pissy little problem caused by the way the .net 2.0 membership sets up registered users.  At the root of the membership tables is an application table.  Normally, for generic type sites or single domain sites, there's only one application listed, wtih a key.  The "/" application.  What happens, especially if you've modified provider settings at all, is users created through the asp.net admin pages are assigned to the "/directoryname" site, and then when you use host headers, you're back at the "/" site.

I'd bet dollars to donughts thats whats happening.  Inspect your membership table and I bet under applications you'll see 2.  One will be "/" and one will be something like "/projectname"


Bryan Sampica
Foto's Starter Kit |
My Blog
sleekdigital
Asp.Net User
Re: login control in IE with host header8/7/2007 1:58:47 AM

0/0

Thanks very much for the reply, but I think my problem is something different.  I have had my application name set to "/" from the start, and there is only one entry in the application table.  I do have a little more information to report.  I tested the same code on my home pc, and it worked fine.  My home PC has IE 7, while my work pc has IE 6.  As I mentioned before, it works fine in firefox even on my work pc.  So, it seems to be something specific to IE 6 or maybe some specific security settings related to IE 6 on my work pc.  I tried messing with some cookie related settings, but nothing seemed to work.  Any other ideas?

Freakyuno
Asp.Net User
Re: login control in IE with host header8/7/2007 2:57:09 AM

0/0

Well, if it works in Firefox, but not IE - then it has to be a cookie problem of some sort, so you're headed down the right path.  The next thing I think I'd probably try, is manually setting a cookie from code, and then getting it back on another page - you can determine if thats the hangup.  I think I'd probably add your site to IE's trusted sites as well, and see if that makes any difference.


Bryan Sampica
Foto's Starter Kit |
My Blog
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Tomcat Kick Start: Kick Start Authors: Martin Bond, Debbie Law, Pages: 552, Published: 2002
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006
Internet Technologies Handbook: Optimizing the IP Network Authors: Mark Miller, Pages: 955, Published: 2004
Handbook of Information Security: Threats, Vulnerabilities, Prevention, Detection, and Management Authors: Hossein Bidgoli, Pages: 3366, Published: 2006
Proceedings Authors: Robert William Taylor, Institute of Electrical and Electronics Engineers, Pages: 173, Published: 1984
Practical Industrial Data Communications: Best Practice Techniques Authors: Deon Reynders, Steve Mackay, Edwin Wright, Pages: 432, Published: 2005
Linux Administration Handbook Authors: Evi Nemeth, Garth Snyder, Trent R. Hein, Pages: 1001, Published: 2006
TCP/IP Illustrated Authors: W. Richard Stevens, Gary R. Wright, Pages: 0, Published: 1994

Web:
login control in IE with host header - ASP.NET Forums In IE the login control is not working when I use a host header to access a site I am developing. Longer explaination. ...
login control in IE with host header - ASP.NET Forums login control in IE with host header. Last post 08-06-2007 10:57 PM by Freakyuno . ... In IE the login control is not working when I use a host header to ...
Zupancic Perspective (v2.0) - Monday, 26 November 2007 NET Login control to assist in user authentication on the site. ..... My first line of defense is to add the host header to IE's list of local intranet ...
15KB Of Fame: HTTP Cache Poisoning via Host Header Injection Jun 10, 2008 ... login">Login Looks familiar? This turns out to be a very, very bad idea in any language. The HTTP Host header is arbitrary text ...
Enterhost :: Dedicated Windows Hosting Solutions The Login Button on SmarterMail/SmarterStats does not work correctly. ... helm. daisyflowershop.com for helm control panel. Once this host header is added, ...
IIS 6 - Host header w/ DNS redirect - prompts users for Windows ... Now I tested that host header by making an entry in my local machine's ... If I enter it then it works fine, until I close IE and go back to ...
eNom - domain name, web site hosting, email, registration ... These settings can be found at the Hosting Control Panel. Note: For every host header you setup, you will need to create a corresponding host record. ...
inetserver iis URL to test host headers But I just wanted to test the host headers were working. ... So I wanted to try to test before initiating the change control just to make ...
Web proxy redirect loops and the Host: header (www.shop.com) The problem has been traced to the Host: header in the web proxy's request. ... Cache-Control: no-cache Pragma: no-cache ...
DotNetNuke ..." target="_" >"Host header"... "Sub domain"? (Q's from Issue 17) > DotNetNuke ... ... adding a new HOST HEADER to the domain name through the control ... You need to Register for free and Login to post a message in the ...

Videos:
How To Break Web Software - A look at security vulnerabilities in web software Google TechTalks April 13, 2006 Mike Andrews Mike Andrews is a senior consultant who specializes in software security and leads the web application...
Build a Website - Easy & Quick http://www.Easy-DIY-Websites.com Look at this chap build a web site in a few minutes flat! It looks like anyone can now have a really good looking w...




Search This Site:










"discussions" module doesn't work

dotnetnuke error: multiple controls with the same id

web parts

hardcode page name or tab id in skin?

back button issues

how to retrieve windows user login name in intranet with windows ad network?

can't reach profile form the codebehind file

crosspageconnection

cannot login after publishing website in asp.net

javascript in dnn module

sql access from 1.1 to 2.0?

composite control causing datagrid to not render

how to setup pop3?

please help......can not convert from asp.net 1.1 to asp.net 2.0

must read before installing express beta2

object reference not set to an instance of an object.

where to store database passwords

static tabid & dyanmic tabid...

how to integrate a js file with dnn?

html designer control properties problem after sp1

link click and search engines

xcopy way to deploy web app

paypal starter kit

can some one verify this return value behaviour?

checkboxes in asp.net 2.0 menu control

why are methods in controller class not shared?

problem using linkclick.aspx

unable to change webpartdisplaymode when webform uses master page

need urgently-syntax to get the tabid?

help selecting a web hosting company

 
All Times Are GMT