Re: Restricting webservice..

Tech-Archive recommends: Fix windows errors by optimizing your registry



Ann,

The way that ASP.NET handles authentication for web sites is completely
different from how authentication/authorization is handled on web services.
If anything, you should be using WSE (Web Services Enhancements) or Windows
Communications Foundation to handle your security needs.

Also, if these classes are in the same web app, then why are you
redirecting to the web service? Why not just call the class directly?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Ann" <Ann@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FC264D0F-9709-4655-8352-9895A0699003@xxxxxxxxxxxxxxxx
Hi all,
My prj has a login form(Login.aspx).It uses Form authentication(Credential
stored in web.config).Once user is authenticated,it redirects to a
webservice(service.asmx)
that has a method that does some database operation.

this is the code..

if (FormsAuthentication.Authenticate(UsrNameTextBox.Text,
PwdTextBox.Text))
Response.Redirect("Service.asmx");
else
FormsAuthentication.RedirectToLoginPage();


My problem is,when the user types the asmx url directly in the
browser(localhost/service.asmx...) ,it should prompt for authentication
and
if its not a valid user,i need to redirect him to login page

any suggestion,on how to do this???

Thnks


.



Relevant Pages

  • Re: Windows Authentication, Single sign on and Active Directory
    ... your web server is probably a workgroup mode machine. ... Co-author of "The .NET Developer's Guide to Directory Services ... web service proxy client fails to connect due to authentication failure ... Windows authentication on the web services. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Windows Authentication, Single sign on and Active Directory
    ... web service proxy client fails to connect due to authentication failure ... the web services anyway, as it is generally important to protect any ... web server is also a member of the domain). ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Architecture Advice
    ... WSE3 is only a framework that adds WS-* support to the Web services stack. ... WS-Federation with SAML has the following benefits over Kerberos: ... Could you point out the benefits of sts over Kerberos authentication in ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Windows Authentication, Single sign on and Active Directory
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... your web server is probably a workgroup mode machine. ... web service proxy client fails to connect due to authentication failure ... Windows authentication on the web services. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Trying to determine best strategy for web service security
    ... I would check out the Hands On Labs for WSE 2.0. ... > I have a group of web services which provide a facade for a COM+ ... The only clients of the web services will be ASP.NET ... > What I would like to have is an authentication web service that would ...
    (microsoft.public.dotnet.framework.webservices.enhancements)