possible to authentificate in both mode together: windows and forms?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,

we run a webapplication where users must log in. So the web.config contains:
<authentication mode="Forms"/> and IIS is set to Anonymous authentification.

Now we want the same application to run inside our intranet. In this case,
windows authentification must be used, avoiding to have to log a second
time.

Is it possible to put together in web.config both
<authentication mode="Forms"/>
and
<authentication mode="Windows"/>?

Also, ist it allowed in IIS to take two authentification modes together
(Anonymous and Windows Integrated auth.)?

thanks
chris
 
there is no built-in support for this. the easiest is two vdirs with the
same code.

otherwise, setup the vdir with windows authentication and anonymous
access in iis and set forms authentication in web.config. in the login
page, check the incoming ipaddress to see if its an intranet address. if
it is, check for a windows identity. if none, then return a 401
response. if you have an identity fill in the cookie authentication
token and perform the redirect.

you should read the doc on forms autheication becuase you want to
control the logic.

-- bruce (sqlwork.com)
 
thanks

bruce barker said:
there is no built-in support for this. the easiest is two vdirs with the
same code.

otherwise, setup the vdir with windows authentication and anonymous access
in iis and set forms authentication in web.config. in the login page,
check the incoming ipaddress to see if its an intranet address. if it is,
check for a windows identity. if none, then return a 401 response. if you
have an identity fill in the cookie authentication token and perform the
redirect.

you should read the doc on forms autheication becuase you want to control
the logic.

-- bruce (sqlwork.com)
 
Back
Top