Click here to Skip to main content
15,885,366 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: C# asp.et web form Pin
Morgs Morgan13-Oct-11 20:03
Morgs Morgan13-Oct-11 20:03 
QuestionGrid view Pin
reyhane ramezanian12-Oct-11 19:12
reyhane ramezanian12-Oct-11 19:12 
Questionhow to use the IIS of a system Pin
MalarGayu12-Oct-11 14:03
MalarGayu12-Oct-11 14:03 
AnswerRe: how to use the IIS of a system Pin
uspatel12-Oct-11 18:56
professionaluspatel12-Oct-11 18:56 
QuestionASP.Net Report Generation Pin
eddieangel12-Oct-11 7:05
eddieangel12-Oct-11 7:05 
AnswerRe: ASP.Net Report Generation Pin
David Mujica12-Oct-11 7:43
David Mujica12-Oct-11 7:43 
GeneralRe: ASP.Net Report Generation Pin
eddieangel12-Oct-11 7:46
eddieangel12-Oct-11 7:46 
QuestionIssue with 401 unauthorized. Double Hop Pin
sheldons12-Oct-11 6:27
sheldons12-Oct-11 6:27 
Hey all,

Im still fairly jr to the whole development thing and I'm having an issue with double hop impersonation.

Unfortunately, kerberos is not running on our network and from what I have read this is what is stopping me from doing what I need to do.

What my code is doing is calling a WCF proxy service and getting member data and then using that to get items from SharePoint using the Lists.GetListItems() SharePoint web service.

I am able to get my member data from WCF proxy but when I call the GetListItems() I get the 401 because impersonation is not working.

- Impersonation is "true" in web.config
- Authentication mode is set to "Windows" in web.config
- I have set the WindowsIdentity

I CANNOT manually enter the credentials and HAVE to use impersonation.


Possible?


XmlDocument xmlDoc = new System.Xml.XmlDocument();

XmlNode query = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode viewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
XmlNode queryOptions = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "");

string listName = "{89ddecff-9716-4b4f-ac64-3e7f3491fc05}";
string viewName = "{69326313-a982-41d3-be58-7ce7c06b5693}";
string rowLimit = "150";

queryOptions.InnerXml = "<includemandatorycolumns>FALSE<dateinutc>TRUE";
viewFields.InnerXml = EcmQuery.GetViewFields();
query.InnerXml = EcmQuery.GetQuery(rowno);

System.Security.Principal.WindowsIdentity wId = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
System.Security.Principal.WindowsImpersonationContext ctx = null;

ctx = wId.Impersonate();

ListsWebReference.Lists list = new ListsWebReference.Lists();
list.Credentials = System.Net.CredentialCache.DefaultCredentials;

XmlNode items = list.GetListItems(listName, viewName, query, viewFields, rowLimit, queryOptions, null);



Thanks in advance for ANY help!!!!!
Questionalignment of controls Pin
jassiedog12-Oct-11 5:43
jassiedog12-Oct-11 5:43 
AnswerRe: alignment of controls Pin
Not Active12-Oct-11 7:00
mentorNot Active12-Oct-11 7:00 
AnswerRe: alignment of controls Pin
Dennis E White13-Oct-11 7:58
professionalDennis E White13-Oct-11 7:58 
AnswerRe: alignment of controls Pin
Morgs Morgan13-Oct-11 19:48
Morgs Morgan13-Oct-11 19:48 
QuestionThe state information is invalid for this page and might be corrupted Pin
uspatel11-Oct-11 22:59
professionaluspatel11-Oct-11 22:59 
QuestionDisable checkbox in gridview Pin
Member 322226411-Oct-11 14:54
Member 322226411-Oct-11 14:54 
AnswerRe: Disable checkbox in gridview Pin
_Tushar Patil11-Oct-11 20:04
_Tushar Patil11-Oct-11 20:04 
AnswerRe: Disable checkbox in gridview Pin
Ali Al Omairi(Abu AlHassan)11-Oct-11 20:09
professionalAli Al Omairi(Abu AlHassan)11-Oct-11 20:09 
Questionaccess to ajax controls on toolbox Pin
Member 821751711-Oct-11 12:17
Member 821751711-Oct-11 12:17 
Questionadd master page to new web form Pin
Member 821751711-Oct-11 4:49
Member 821751711-Oct-11 4:49 
QuestionSiteMapPath does NOT display while the url end with a slash Pin
zhgfsh11-Oct-11 3:36
zhgfsh11-Oct-11 3:36 
Questionhow to create a download feature in asp,net? Pin
John Lao10-Oct-11 17:32
John Lao10-Oct-11 17:32 
AnswerRe: how to create a download feature in asp,net? Pin
Morgs Morgan10-Oct-11 20:58
Morgs Morgan10-Oct-11 20:58 
AnswerRe: how to create a download feature in asp,net? Pin
Not Active11-Oct-11 1:37
mentorNot Active11-Oct-11 1:37 
Questionhow to set the start up page once for all Pin
MalarGayu10-Oct-11 14:59
MalarGayu10-Oct-11 14:59 
AnswerRe: how to set the start up page once for all Pin
Parwej Ahamad10-Oct-11 17:47
professionalParwej Ahamad10-Oct-11 17:47 
GeneralRe: how to set the start up page once for all Pin
MalarGayu10-Oct-11 22:10
MalarGayu10-Oct-11 22:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.