I'm developing full trust web part deployed in GAC that access soap web service on localhost. Web service uses windows authentication. SP 2010 web part impersonates current user while SP 2013 sends app pool identity?
On both SP's NTML authentication is configured.
This is web.config portion for 2010
<authentication mode="Windows">
<identity impersonate="true">
<authorization>
<allow users="*">
</authorization>
And in 2013 I have this:
<authentication mode="Forms">
<forms loginUrl="/_login/default.aspx">
</authentication>
<identity impersonate="true">
<authorization>
<allow users="*">
</authorization>
<add key="aspnet:AllowAnonymousImpersonation" value="false">
It does't help if I change it to windows auth like in 2010?
Impersonating spuser doesn't help olso:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(siteid, SPContext.Current.Web.CurrentUser.UserToken))
{
using (SPWeb web = site.OpenWeb(webid))
{
SOAPService ws = new SOAPService() { UseDefaultCredentials = true };
var res = ws.BugGetAllBugs();
GridView1.DataSource = res;
GridView1.DataBind();
}
}
});