I don't think you can do this as a built in feature of asp.net. However,
you should be able to easily add the IP check into your forms authentication
code. Add a key to your web.config file with the IP Address:
<appSettings>
<add key="AdminIPAddress" value="a.b.c.d" />
</appSettings>
In the login check, check the remote IP Address against the allowed IP
Address:
string remoteIP = Request.ServerVariables["remote_addr"];
string allowedIP =
System.Configuration.ConfigurationSettings.AppSett ings["AdminIPAddress"];
if (remoteIP == allowedIP)
{
bool isAuthenticated = FormsAuthentication.Authenticate(username,
password);
if (isAuthenticated)
{
// User logged in successfully and IP Address is valid
}
else
{
// User login failed, but IP Address is valid
}
}
else
{
// User login failed. IP Address is invalid
}
Hope this helps,
Mun
--
Munsifali Rashid
http://www.munsplace.com/
"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:Z0*********************@news-text.cableinet.net...
That's what I was thinking. I've got my authorisation set to forms in
their and that's working fine for this directory, I just want to add the IP as
an extra measure.
Is this possibe anyone?