0

I have an MVC page that I want to take the contents of and put into a div on a WebForms page using javascript. I've done this once before without any problem, except when I did it before the MVC page allowed anonymous access.

Is there a way to pass on the logged in user's credentials in order to access an MVC page whose action has the [Authorized] attribute?

ekad
  • 14,436
  • 26
  • 44
  • 46
BVernon
  • 3,205
  • 5
  • 28
  • 64
  • Is the WebForms and mvc page in the same project? –  Apr 02 '15 at 16:15
  • @gerdi Yes they are. – BVernon Apr 02 '15 at 16:25
  • Isnt the logged user data stored in a cookie though, which means you shouldnt have to pass an authorize. _Sorry i have never worked with a hybrid site before_ –  Apr 02 '15 at 16:37
  • @gerdi It works that way with redirects, but a javascript call doesn't include the cookie. I found this though that I think will work: http://stackoverflow.com/questions/5258721/authorize-attribute-and-jquery-ajax-in-asp-net-mvc – BVernon Apr 02 '15 at 17:38

0 Answers0