Search code examples
c#asp.nethandlerwindows-authenticationhttp-redirect

Windows authentication only for a webpage within solution


I had a requirement like a solution was there along with 4 projects. Webapp, re-routing Handlers ( which redirect request to my WCF service), Business, Database. am referencing other projects in my webapp which is having only 1 web page.

Now i need to provide a windows authentication for this web app.

if i implement Windows auth then the existing access from smart devices are not able to connect to the routing handlers.

So i have few Questions which i did some home work and found

Enabling PUT on IIS 7.5 for an ASHX handler using Windows Authentication

How can I grant anonymous access to an httpHandler that uses wildcards in a site that requires authentication?

So now my doubt is 1. can we bypass the authentication for handlers? 2. can we access it without changing anything in the proxy from smart devices?


Solution

  • So no responses from any one here. anyway i found a workaround. i guess it might be helpful for others.

    I created a loginpage which accepts only windows credentials. i removed web.config entry to accept only windows authentications.

    for the aspx pages what ever the operations am doing. am checking a authentication of the user.

    for the remaining pages/handlers am avoiding this cross check so that my service or download request handlers will work without any problem.