473,714 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect when using Windows (Basic) Authentication?

Hi,

Is there anyway to mimic forms authentication' s loginUrl
and RedirectFromLog inPage functionality using Windows
authentication?

We are developing intranet sites using basic
authentication and we want to always redirect a user to a
default 'splash' or welcome page that is set to anonymous
if they are not logged in. This page would have
graphics, news, company announcements, etc along with a
link that states "To login, click here." which would open
the basic authentication dialog.

I thought there may be a way to use HttpModules to do
this but I don't think IIS will allow the http request to
make that far in the pipeline.

I've heard ISAPI filters may be able to do this but I not
too familiar with writing those. Can anyone offer any
ideas?

Thanks, Dave.
Nov 18 '05 #1
4 4834
Dave wrote:
Hi,

Is there anyway to mimic forms authentication' s loginUrl
and RedirectFromLog inPage functionality using Windows
authentication?
Yes, I think it is possible.
On Your Login page:

OnLogin_Click() {
string login = Login.Text;
string password = Password.Text;
// authenticate using Win
...
if (isValid) {
FormsAuthenicat ion.SetAuthCook ie(login, true);
Redirect("/Main.aspx");
}
else {
Redirect("/Splash.aspx");
}
}
We are developing intranet sites using basic
authentication and we want to always redirect a user to a
default 'splash' or welcome page that is set to anonymous
if they are not logged in. This page would have
graphics, news, company announcements, etc along with a
link that states "To login, click here." which would open
the basic authentication dialog.

I thought there may be a way to use HttpModules to do
this but I don't think IIS will allow the http request to
make that far in the pipeline.
That far as what?
IIS passes _all_ *.aspx requests (and many other) to asp.net, you can
see more details in IIS config. And you can do whatever you want with
this query.
I've heard ISAPI filters may be able to do this but I not
too familiar with writing those. Can anyone offer any
ideas?


As far as I see only functionality you need is to redirect not logged
users to "login" page. But this is managed by standart Form authentication.

Of course you can write your own module and implement all
FormsAuthentica tion by yourself, but what for?

Vadim Chekan.

Nov 18 '05 #2
i don't think that 'll do the job. it looks like dave wants to use basic
authentication, not forms authentication. probably he has some files to
secure other that aspx files, like pdf, word, excel etc. sort of the same
scenario i have on some intranets.

"Vadim Chekan" <re************ *****@rogers.co m> wrote in message
news:lH******** *********@news0 1.bloor.is.net. cable.rogers.co m...
Dave wrote:
Hi,

Is there anyway to mimic forms authentication' s loginUrl
and RedirectFromLog inPage functionality using Windows
authentication?
Yes, I think it is possible.
On Your Login page:

OnLogin_Click() {
string login = Login.Text;
string password = Password.Text;
// authenticate using Win
...
if (isValid) {
FormsAuthenicat ion.SetAuthCook ie(login, true);
Redirect("/Main.aspx");
}
else {
Redirect("/Splash.aspx");
}
}
We are developing intranet sites using basic
authentication and we want to always redirect a user to a
default 'splash' or welcome page that is set to anonymous
if they are not logged in. This page would have
graphics, news, company announcements, etc along with a
link that states "To login, click here." which would open
the basic authentication dialog.

I thought there may be a way to use HttpModules to do
this but I don't think IIS will allow the http request to
make that far in the pipeline.


That far as what?
IIS passes _all_ *.aspx requests (and many other) to asp.net, you can
see more details in IIS config. And you can do whatever you want with
this query.
I've heard ISAPI filters may be able to do this but I not
too familiar with writing those. Can anyone offer any
ideas?


As far as I see only functionality you need is to redirect not logged
users to "login" page. But this is managed by standart Form

authentication.
Of course you can write your own module and implement all
FormsAuthentica tion by yourself, but what for?

Vadim Chekan.

Nov 18 '05 #3
Harley,

You are correct, the scenerio I want uses Basic
Authentication, not Forms. We often upload other types
of files that will require this of security.

Do you know of any solutions since it sounds like you
work in a similar environment? Thanks for your
response. Dave.
-----Original Message-----
i don't think that 'll do the job. it looks like dave wants to use basicauthentication , not forms authentication. probably he has some files tosecure other that aspx files, like pdf, word, excel etc. sort of the samescenario i have on some intranets.

"Vadim Chekan" <re************ *****@rogers.co m> wrote in messagenews:lHxwb.840 9 $m*******@news0 1.bloor.is.net. cable.rogers.co m...
Dave wrote:
> Hi,
>
> Is there anyway to mimic forms authentication' s loginUrl > and RedirectFromLog inPage functionality using Windows
> authentication?


Yes, I think it is possible.
On Your Login page:

OnLogin_Click() {
string login = Login.Text;
string password = Password.Text;
// authenticate using Win
...
if (isValid) {
FormsAuthenicat ion.SetAuthCook ie(login, true);
Redirect("/Main.aspx");
}
else {
Redirect("/Splash.aspx");
}
}
> We are developing intranet sites using basic
> authentication and we want to always redirect a user to a > default 'splash' or welcome page that is set to anonymous > if they are not logged in. This page would have
> graphics, news, company announcements, etc along with a > link that states "To login, click here." which would open > the basic authentication dialog.
>
> I thought there may be a way to use HttpModules to do
> this but I don't think IIS will allow the http request to > make that far in the pipeline.


That far as what?
IIS passes _all_ *.aspx requests (and many other) to asp.net, you can see more details in IIS config. And you can do whatever you want with this query.
> I've heard ISAPI filters may be able to do this but I not > too familiar with writing those. Can anyone offer any > ideas?


As far as I see only functionality you need is to redirect not logged users to "login" page. But this is managed by standart Formauthentication .

Of course you can write your own module and implement

all FormsAuthentica tion by yourself, but what for?

Vadim Chekan.

.

Nov 18 '05 #4
See Harley's response. I'm referring to Windows
Authentication in conjunction with IIS Basic
Authentication. Not Forms Authentication.
-----Original Message-----
Dave wrote:
Hi,

Is there anyway to mimic forms authentication' s loginUrl and RedirectFromLog inPage functionality using Windows
authentication?
Yes, I think it is possible.
On Your Login page:

OnLogin_Click( ) {
string login = Login.Text;
string password = Password.Text;
// authenticate using Win
...
if (isValid) {
FormsAuthenicat ion.SetAuthCook ie(login,

true); Redirect("/Main.aspx");
}
else {
Redirect("/Splash.aspx");
}
}
We are developing intranet sites using basic
authentication and we want to always redirect a user to a default 'splash' or welcome page that is set to anonymous if they are not logged in. This page would have
graphics, news, company announcements, etc along with a link that states "To login, click here." which would open the basic authentication dialog.

I thought there may be a way to use HttpModules to do
this but I don't think IIS will allow the http request to make that far in the pipeline.
That far as what?
IIS passes _all_ *.aspx requests (and many other) to

asp.net, you cansee more details in IIS config. And you can do whatever you want withthis query.
I've heard ISAPI filters may be able to do this but I not too familiar with writing those. Can anyone offer any
ideas?
As far as I see only functionality you need is to

redirect not loggedusers to "login" page. But this is managed by standart Form authentication.
Of course you can write your own module and implement allFormsAuthentic ation by yourself, but what for?

Vadim Chekan.

.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4825
by: Crazy Monkey | last post by:
Hi: I am new to Perl. I need to write a Perl page on the server that will do an auto login to a site. I have got the following code. It works for the first page, but on subsequent page, user is prompted for credential again. I suspected the issue has something to do with cookies. I want to pass the header from the secure site to the client, but I don't know how to do it. May be I approached the problem the wrong way. Thanks for...
3
7873
by: Peter Row | last post by:
Hi, I better get the background stuff out the way first, so here goes: - Porting a VB6 webclass app to VB.NET using HttpHandlers and FormsAuthentication - When someone visits my site unbeknown to them they are automatically logged in as a guest via the .NET forms authentication.
2
344
by: Q. John Chen | last post by:
All, I am using Form Authentication with Roles. E.G. PageA.aspx is permitted for Role "Admin", and PageB.aspx is permitted for Role "Basic". When a user of "Basic" role try to access an "Admin" page directly, Login From shown and he enters his username and password. He is then AUTHENTICATED but stays on the Login form because he is not permitted to view the "Admin" pages.
1
2702
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. Page.SmartNavigation = False FormsAuthentication.SetAuthCookie(txtCustID.Text, False)
8
2483
by: Stimp | last post by:
I need to take my website offline for an hour or so while I perform some maintenance... is it possible to create a 'catch-all' redirect to a temporary page (i.e. something in Web.config or global.asax.vb) ? People access my site through several different pages, so I couldn't put a redirect on the homepage, and taking my server offline is out the question. Thanks, Peter
9
2037
by: antonyliu2002 | last post by:
I am not sure how to google this concept. Basically, what I wanna do is to direct different users to different pages. I do not have a whole lot users. For example, if user name 'tomcat' logins successfully with the correct password, I want to direct this guy to 'tomcat_page.aspx'. And if the user name 'jerrymouse' logins successfully with the right password, I want to direct him to 'jerrymouse_page.aspx'.
0
864
by: giodo | last post by:
Hi ALL When we try to get an access to a secure content in a IIS with "Basic Authentication" IE shows a dialog box to set user ID and pass. After that IE (any browser) adds a special HTTPHeader for each request: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== where QWxhZGRpbjpvcGVuIHNlc2FtZQ== is Base64("userID:pass")
1
1561
by: giodo | last post by:
Hi ALL When we try to get an access to a secure content in a IIS with "Basic Authentication" IE shows a dialog box to set user ID and pass. After correct authentication IE (all browsers) adds a special HTTPHeader for each request: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== where QWxhZGRpbjpvcGVuIHNlc2FtZQ== is Base64("userID:pass")
10
9774
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and entering the username and password manually, the wsdl is returned. So the username and password should be ok. I'm using this code: Merchant myMerch = new Merchant(); myMerch.merchantIdentifier=merchantId;
0
8795
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
9306
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
9009
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7942
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...
1
6621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4462
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
4715
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2103
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.