473,624 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Authenticating user through more than one login page for mobile part of webpage, C#

6 New Member
Hi,

I'm currently working on creating a stripped down part of a company web page, that will be accessed from cellphone. The problem I have is that the Windows Forms authentication makes it difficult for me to create more than one login page. In my web.config file I have it set so that unauthenticated users will be directed to the default.aspx page which handles logging in. As part of the default.aspx Page_Load I transfer users to a mobile/login.aspx page in case the browser.IsMobil e is true.
However, before my login code in mobile/login can be executed, the forms authentication detects that I'm not logged in, and redirects me back to default.aspx, which in turn redirects me to mobile/login.

I have thought of several possible ways to solve this, but I haven't found any good information on it.

One way would be if it is possible to specify multiple login pages in the web.config file that would prevent default.aspx to load if I'm accessing the mobile login page. Can this be done?

Another thought was to make the default.aspx into both desktop and mobile login, by mixing asp: and mobile: content. Does anyone know if this is possible? Is it possible to have both a mobile:Form and an asp:content, the compiler seemed to dislike the idea. This would also require that I created a filter or devicefilter that detected all mobile devices and checked against it at the start of the default HTML code. Is there a clean way to do this or would I have to create a separate check with the compare argument against every brand and type of cellphone?

Best,

Erik
Aug 24 '07 #1
3 2528
kenobewan
4,871 Recognized Expert Specialist
Why wouldn't you have browser check in in your default page_load and redirect if browser.IsMobil e true?
Aug 24 '07 #2
Sleepwalker
6 New Member
Why wouldn't you have browser check in in your default page_load and redirect if browser.IsMobil e true?
The redirection works alright, but it still doesn't allow me to sign in through the mobile login when I'm using a cellphone emulator. The problem is that once I've attempted to login, I'm still directed back to the orignal login page withough authentication. I've fixed better redirection by using <location > tags in my web.config where I allow all users to access the mobile login. However, the problem still persists. At the end of my Authentication method, I add an auth cookie and a user preference cookie to the Response Cookie list, for a total of three cookies. I then redirect the user to the page they want to see, in this case mobile/home.aspx. However, after the Redirect, the two cookies are somehow deleted and since no auth cookie exist the browser defaults back to default.aspx once again. Does this behavior sound familiar? I'm using the latest OpenWave simulator and I've checked so that it accepts cookies, so that shouldn't be the problem.

Thanks,

Erik
Aug 24 '07 #3
Sleepwalker
6 New Member
I've tracked the problem a little further, and it seems that when the Application_Aut henticateReques t is called in Global.asax.cs, the cookies are all gone, and there is no HttpContext.Cur rent.User object, which there should be. Does this mean anything to anyone? Could it be some mobile specific thing?
Aug 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2271
by: Sophia | last post by:
I need to authenticate users to enter in a NTLM-protected virtual directory, but I can't pop up a NT-login dialogue box - I can only do a web-based username/password form (my client is a "usability" firm!). After searching and searching, I finally found up with this solution to use ADSI to authenticate users transparently: http://www.eggheadcafe.com/articles/20010126.asp I tried the script and I am able to authenticate that the user...
3
16432
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 But I am having a problem figuring out the LDAP:// The LDAP:// that I pass looks like this (i substitued generic the
1
1429
by: Larry Rekow | last post by:
I created a web application in classic ASP 6 months ago that had a login page which would only allow certain users to add, update or delete files from 6 different departments. (Windows 2000 server, NTFS, IIS5, not using Active Directory. After users are challenged for basic windows authentication, they get to the login page.) At the time, I set-up an Access db and a manager's page to add, delete and modify the permissions of users. When...
4
1351
by: Brent Waldrop | last post by:
Ok everyone, i have been pulling my hair out on this one. I have been working on it for 3 days with no sucess. This problem is occuring at home where i am running a workgroup. I have Windows 2003 Ent Server on one machine and windows xp sp2 on another. The db server is located on the Windows 2003 machine. I am working locally with asp.net 1.1 on the xp workstation and the web server is also locally on the xp workstation. Every time i try...
2
1308
by: H | last post by:
I have designed a C# application that will populate a database with customer information and email a randomly generated password to them. I would like them to have the ability to update their details on a form via secure login. I'm looking for a web tutorial or book recommendation that can explain the correct way to validate an email address and password from a database and allow the changed password to be written back. It would also be...
4
1965
by: SJ | last post by:
I have a mobile web application running on a server at work. There is a strange thing happening though: 1) I can access and login to my mobile web app from any internet browser. (good thing). 2) I can access and login to my mobile web app from any Palm Treo web browser. (good thing). 3) When I use a regular mobile phone (samsung/motorola...etc) and load up my website on the browser, it takes me to the login page. Now, when I enter my...
3
6217
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
4
1258
by: Nick | last post by:
Hi there, I have a website setup which uses the ASP.net login controls to manage user sessions. I would like to be able to login a user through a webservice situated on the same server. Although I can find the user by their username I am not entirely sure on how to authenticate the user, how can I do this via the username and password being supplied to the web service method?
5
3122
by: Manikrag | last post by:
Hi Team, I have copied one ASP.NET application on a new server and configured it all.Now I am getting below error when I am trying to authenticate users thru LdapAuthentication function. This function is authenticating user and thn reading data from datbase server. DOMAIN\WEBSERVER$' is nowhere in the picture but still I am not able to read the database. Here is the error. __________________________________________________________________...
0
8236
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.