Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine >  accessing WebMethod through jquery ajax Authentication Failed problem View modes: 
User avatar
Member
Member
shootermv-gmail - 3/19/2012 5:26:23 AM
   
accessing WebMethod through jquery ajax Authentication Failed problem
I'm tring to access WebMethod defined on ServicePage.aspx(with pagemethods exposed) i have added through jquery ajax.
The things workingfine as long as i place the ServicePage inside CMSModules directory.
But i want theServicePage to be in Extentions directory which i created in site root
(same level that CMSModules )
But when i try to access the same ServicePage in Extentions directory, i'm getting ajax error:'Authentication Failed'

Please help
Thanks Frowards

Moshe

User avatar
Member
Member
shootermv-gmail - 3/19/2012 5:56:48 AM
   
RE: accessing WebMethod through jquery ajax Authentication Failed problem
shootermv-gmail wrote: I'm tring to access WebMethod defined on ServicePage.aspx i have added(with pagemethods exposed), through jquery ajax.
The things working fine as long as i place the ServicePage inside CMSModules directory.
But i want theServicePage to be in Extentions directory which i created in site root
(same level as CMSModules )
But when i try to access the same ServicePage in Extentions directory, i'm getting ajax error:'Authentication Failed'

Please help
Thanks Frowards

Moshe

User avatar
Member
Member
kentico_michal - 3/21/2012 3:15:48 AM
   
RE: accessing WebMethod through jquery ajax Authentication Failed problem
Hello,

You should allow anonymous users to access the ServicePage.aspx by doing this in your web.config in the same directory as the ServicePage.aspx:

  <location path="ServicePage.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>


For more information, I would like to point you to the following forum: ASP.NET Webmethod - Authentication failed.

Best regards,
Michal Legen