ASP.NET MVC Returns Unauthorized (401) for redirect when accessing with WebClient

Taccerceliory

New Member
I have a simple ASP.NET MVC site with a single controller and some actions in it. A user needs to log in to access any action (Windows Authentication, 'AUthorize' attribue on the controller class). When accessing the site via a browser everything works fine.On the client, I would also like to access the site via System.Net.WebClient. I set the credentials and all actions that return a View work just fine.But when I try to access a action, that tries to make a redirect (using Controller's Rediret() method) the server returns a 401 Unauthorized.I've read about problem's with WebClient and Windows authentication but the stuff I found does not seem to apply here, because everything works except for the redirects.Any help would be appreciated, thanks.
 
Back
Top