Saturday, June 30, 2012

[sharepointdiscussions] Digest Number 4474

12 New Messages
Digest #4474
1
Approve a File using Lists.asmx in SP 2010 by "Venkatesh H" venkat_82_20012001
2a
Re: Login prompt for visiting mysites by "Alcock, Bruce G." brucealcock
2b
Re: Login prompt for visiting mysites by "brother.gabriel" brother.gabriel
2c
Re: Login prompt for visiting mysites by "Alcock, Bruce G." brucealcock
2e
2f
Re: Login prompt for visiting mysites by "Daniel A. Galant" figment16@att.net
2g
Re: Login prompt for visiting mysites by "Alcock, Bruce G." brucealcock
2h
Re: Login prompt for visiting mysites by "onewisegeek" onewisegeek
3b

Fri Jun 29, 2012 6:50 am (PDT) . Posted by: "Venkatesh H" venkat_82_20012001
Hi All,

I need one help. I am trying to upload a document into a SP 2010 Publishing
Site Document Library and check in and approve the file, through Lists.asmx
Web Service. I tried several ways and googled a lot without any success.
Can anyone please help me with this? For your reference, I am giving the
code below.

ListSvc.Lists client = new ListSvc.Lists();
client.PreAuthenticate = true;
client.Credentials = new
System.Net.NetworkCredential("tstmos30", "TSTMOS030", "northamerica");
client.Url = this.SITE_URL +
@"/_vti_bin/lists.asmx";

XmlNode docListNode =
client.GetList("Documents");
if (docListNode != null)
{
StringBuilder sbURL = new StringBuilder();
sbURL.Append(this.SITE_URL);
sbURL.Append("/");
sbURL.Append("Documents");
sbURL.Append("/");
string strFileURL = string.Empty;
foreach (string fileName in fileNameList)
{
FileStream oSourceFile = null;
WebRequest webReq = null;
byte[] oBytes = null;
StringBuilder oSb = null;
try
{
strFileURL = sbURL.ToString() +
fileName.Substring(fileName.LastIndexOf('\\') + 1);
//Create a filestream containing
the document you want to upload
oSourceFile =
File.OpenRead(fileName);

webReq =
WebRequest.Create(strFileURL);
webReq.Method = "PUT";
webReq.Headers.Add("Overwrite",
"F");
webReq.Credentials = new
System.Net.NetworkCredential("tstmos30", "TSTMOS030", "northamerica");
//Literally copy the bytes of the
filestream into the request stream to "upload" the document to the library
oBytes = new byte[1024];
using (Stream oRq =
webReq.GetRequestStream())
{
for (; ; )
{
int iBytes =
oSourceFile.Read(oBytes, 0, oBytes.Length);
if (iBytes <= 0)
break;
oRq.Write(oBytes, 0,
iBytes);
}
oSourceFile.Close();
}

string strFileWOUrl =
fileName.Substring(fileName.LastIndexOf('\\') + 1);
string strQuery =
"<mylistitemrequest><Query><Where><And><Eq><FieldRef Name=\"FileLeafRef\"
/><Value Type=\"Text\">" + strFileWOUrl + "</Value></Eq><Neq><FieldRef
Name=\"_ModerationStatus\" /><Value
Type=\"ModStat\">3</Value></Neq></And></Where><OrderBy><FieldRef
Name=\"Title\"/></OrderBy></Query><ViewFields><FieldRef
Name=\"Title\"/></ViewFields><QueryOptions><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns></QueryOptions></mylistitemrequest>";
XmlDocument docTitle = new
XmlDocument();
docTitle.LoadXml(strQuery);

XmlNode queryNode =
docTitle.SelectSingleNode("//Query");
XmlNode viewNode =
docTitle.SelectSingleNode("//ViewFields");
XmlNode optionNode =
docTitle.SelectSingleNode("//QueryOptions");

XmlNode opNode =
client.GetListItems("Documents", null, queryNode, viewNode, string.Empty,
optionNode, null);
//XmlNode opNode =
client.GetListItems("Documents", null, null, null, string.Empty, null,
null);
var uniqueVals = (from t in
XElement.Parse(opNode.InnerXml).Descendants().Attributes("ows_FileRef")
select t.Value.ToString()).Distinct();
if (uniqueVals.Count() == 1)
{
client.CheckOutFile(strFileURL,
"false", DateTime.Now.ToShortDateString());

}

WebResponse oResponse =
webReq.GetResponse();

oSb = new StringBuilder();
oSb.Append("<Method ID='1'
Cmd='Update'>");
oSb.Append(" <Field Name='ID'/>");
oSb.Append(" <Field
Name='FileRef'>'" + strFileURL + "'</Field>");

//Change the title of the document
- replace or add to the document properties as necessary
oSb.Append("</Method>");

XmlDocument oDoc = new
System.Xml.XmlDocument();
XmlElement oXBatch =
oDoc.CreateElement("Batch");
oXBatch.SetAttribute("OnError",
"Continue");
oXBatch.SetAttribute("PreCalc",
"TRUE");
oXBatch.SetAttribute("ListVersion",
"0");
oXBatch.InnerXml = oSb.ToString();

client.UseDefaultCredentials = true;
//Do the update replace the
ListWebService object with your web service object
XmlNode oRet =
client.UpdateListItems("Documents", oXBatch);

client.CheckInFile(strFileURL,
"Test Comment", "1");
File.Delete(fileName);
string xml = "<Method ID='1'
Cmd='Moderate'><Field Name='FileRef'>'" + strFileURL + "'</Field><Field
Name='hiddenmodstatus'>3</Field><Field
Name='urn:schemas-microsoft-com:office:office#_ModerationStatus'>0</Field><Field
Name='itemlevel'>2</Field></Method>";

XmlDocument doc = new XmlDocument();
XmlElement oXBatch1 =
doc.CreateElement("Batch");
oXBatch1.SetAttribute("OnError",
"Continue");
oXBatch1.SetAttribute("PreCalc",
"TRUE");

oXBatch1.SetAttribute("ListVersion", "0");
oXBatch1.InnerXml = xml;
client.Url = this.SITE_URL +
@"/_vti_bin/lists.asmx";
client.UseDefaultCredentials = true;
XmlNode resultNode =
client.UpdateListItems("Documents", oXBatch1);

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 6:55 am (PDT) . Posted by: "Alcock, Bruce G." brucealcock
Believe it - it makes sense when you think about the fact that going from your SharePoint site to the mysite means you changing web sites.
If they are using IE, the answer is simple - just put mysites into the local intranet zone and be sure the auto login for intranet zone is enabled. It's also a good practice to put your main SharePoint site into the local intranet zone so users don't get prompted when they want to download an Office file.
-bruce
Bruce Alcock
System Engineer
OU Information Technology

From: sharepointdiscussions@yahoogroups.com [mailto:sharepointdiscussions@yahoogroups.com] On Behalf Of brother.gabriel
Sent: Thursday, June 28, 2012 4:27 PM
To: sharepointdiscussions@yahoogroups.com
Subject: [sharepointdiscussions] Login prompt for visiting mysites

Salvete! I have this problem whereby if I view someone's user profile, and it has information linked to their profile in mysites, I am asked to login again - with the same credentials!

I found this link, but don't want to believe that this is the answer:
http://sharepoint.stackexchange.com/questions/26265/getting-prompted-for-password-when-going-to-my-sites?rq=1

It is enough to make you want to get rid of mysites altogether. My users have a hard enough time logging in the first time.

Can it be resolved?

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 7:18 am (PDT) . Posted by: "brother.gabriel" brother.gabriel
Thanks for confirming that for me. Adding the urls to the intranet zone does, indeed, work for IE-base browsers. That seems pretty lousy to have to do that on each individual browser, though, when the main portal depends on mysites for all the user profile stuff.

If I just disable mysites and don't use it, can I still use the "Edit Profile" panel to change AD profiles details?

--- In sharepointdiscussions@yahoogroups.com, "Alcock, Bruce G." <balcock@...> wrote:
>
> Believe it - it makes sense when you think about the fact that going from your SharePoint site to the mysite means you changing web sites.
> If they are using IE, the answer is simple - just put mysites into the local intranet zone and be sure the auto login for intranet zone is enabled. It's also a good practice to put your main SharePoint site into the local intranet zone so users don't get prompted when they want to download an Office file.
> -bruce
> Bruce Alcock
> System Engineer
> OU Information Technology
>
> From: sharepointdiscussions@yahoogroups.com [mailto:sharepointdiscussions@yahoogroups.com] On Behalf Of brother.gabriel
> Sent: Thursday, June 28, 2012 4:27 PM
> To: sharepointdiscussions@yahoogroups.com
> Subject: [sharepointdiscussions] Login prompt for visiting mysites
>
>
>
> Salvete! I have this problem whereby if I view someone's user profile, and it has information linked to their profile in mysites, I am asked to login again - with the same credentials!
>
> I found this link, but don't want to believe that this is the answer:
> http://sharepoint.stackexchange.com/questions/26265/getting-prompted-for-password-when-going-to-my-sites?rq=1
>
> It is enough to make you want to get rid of mysites altogether. My users have a hard enough time logging in the first time.
>
> Can it be resolved?
>
>
>
> [Non-text portions of this message have been removed]
>

Fri Jun 29, 2012 9:30 am (PDT) . Posted by: "Alcock, Bruce G." brucealcock
I believe you can have the IE setting performed through group policies. Check with your domain administrator.

Mysites are separate from User Profile services. UPS is a service that imports information into SharePoint from A/D or an external directory service.

Mysites are a way of implementing individual web sites for users.

-bruce

Bruce Alcock
System Engineer
OU Information Technology

________________________________
From: sharepointdiscussions@yahoogroups.com [sharepointdiscussions@yahoogroups.com] on behalf of brother.gabriel [brgabriel@sspx.org]
Sent: Friday, June 29, 2012 9:18 AM
To: sharepointdiscussions@yahoogroups.com
Subject: [sharepointdiscussions] Re: Login prompt for visiting mysites

Thanks for confirming that for me. Adding the urls to the intranet zone does, indeed, work for IE-base browsers. That seems pretty lousy to have to do that on each individual browser, though, when the main portal depends on mysites for all the user profile stuff.

If I just disable mysites and don't use it, can I still use the "Edit Profile" panel to change AD profiles details?

--- In sharepointdiscussions@yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>, "Alcock, Bruce G." <balcock@...> wrote:
>
> Believe it - it makes sense when you think about the fact that going from your SharePoint site to the mysite means you changing web sites.
> If they are using IE, the answer is simple - just put mysites into the local intranet zone and be sure the auto login for intranet zone is enabled. It's also a good practice to put your main SharePoint site into the local intranet zone so users don't get prompted when they want to download an Office file.
> -bruce
> Bruce Alcock
> System Engineer
> OU Information Technology
>
> From: sharepointdiscussions@yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com> [mailto:sharepointdiscussions@yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>] On Behalf Of brother.gabriel
> Sent: Thursday, June 28, 2012 4:27 PM
> To: sharepointdiscussions@yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>
> Subject: [sharepointdiscussions] Login prompt for visiting mysites
>
>
>
> Salvete! I have this problem whereby if I view someone's user profile, and it has information linked to their profile in mysites, I am asked to login again - with the same credentials!
>
> I found this link, but don't want to believe that this is the answer:
> http://sharepoint.stackexchange.com/questions/26265/getting-prompted-for-password-when-going-to-my-sites?rq=1
>
> It is enough to make you want to get rid of mysites altogether. My users have a hard enough time logging in the first time.
>
> Can it be resolved?
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 9:53 am (PDT) . Posted by: "Mark Todd" fwambo
I'm not sure you can have profiles without MySites, though.  The last time I did a deployment MySites were a direct requirement to move forward with UPS.

________________________________
From: "Alcock, Bruce G." <balcock@ou.edu>
To: "sharepointdiscussions@yahoogroups.com" <sharepointdiscussions@yahoogroups.com>
Sent: Friday, June 29, 2012 8:47 AM
Subject: RE: [sharepointdiscussions] Re: Login prompt for visiting mysites

 
I believe you can have the IE setting performed through group policies. Check with your domain administrator.

Mysites are separate from User Profile services. UPS is a service that imports information into SharePoint from A/D or an external directory service.

Mysites are a way of implementing individual web sites for users.

-bruce

Bruce Alcock
System Engineer
OU Information Technology

________________________________
From: mailto:sharepointdiscussions%40yahoogroups.com [mailto:sharepointdiscussions%40yahoogroups.com] on behalf of brother.gabriel [mailto:brgabriel%40sspx.org]
Sent: Friday, June 29, 2012 9:18 AM
To: mailto:sharepointdiscussions%40yahoogroups.com
Subject: [sharepointdiscussions] Re: Login prompt for visiting mysites

Thanks for confirming that for me. Adding the urls to the intranet zone does, indeed, work for IE-base browsers. That seems pretty lousy to have to do that on each individual browser, though, when the main portal depends on mysites for all the user profile stuff.

If I just disable mysites and don't use it, can I still use the "Edit Profile" panel to change AD profiles details?

--- In mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>, "Alcock, Bruce G." <balcock@...> wrote:
>
> Believe it - it makes sense when you think about the fact that going from your SharePoint site to the mysite means you changing web sites.
> If they are using IE, the answer is simple - just put mysites into the local intranet zone and be sure the auto login for intranet zone is enabled. It's also a good practice to put your main SharePoint site into the local intranet zone so users don't get prompted when they want to download an Office file.
> -bruce
> Bruce Alcock
> System Engineer
> OU Information Technology
>
> From: mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com> [mailto:mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>] On Behalf Of brother.gabriel
> Sent: Thursday, June 28, 2012 4:27 PM
> To: mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>
> Subject: [sharepointdiscussions] Login prompt for visiting mysites
>
>
>
> Salvete! I have this problem whereby if I view someone's user profile, and it has information linked to their profile in mysites, I am asked to login again - with the same credentials!
>
> I found this link, but don't want to believe that this is the answer:
> http://sharepoint.stackexchange.com/questions/26265/getting-prompted-for-password-when-going-to-my-sites?rq=1
>
> It is enough to make you want to get rid of mysites altogether. My users have a hard enough time logging in the first time.
>
> Can it be resolved?
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 10:17 am (PDT) . Posted by: "Paul Stork" pstorkoh
You can't access profiles without a my sites host. But you can the.permissions required to create individual nysites to prevent user from creating their own. That's just the Mycontent portion of mysites

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 10:29 am (PDT) . Posted by: "Daniel A. Galant" figment16@att.net
My Sites are separate from the user profiles, but are part of the same service. You do not have to configure My Sites when setting up a UPS however.

Daniel A. Galant
Sent from my iPhone
(636)448-3240

On Jun 29, 2012, at 9:53 AM, Mark Todd <sandpiper_sj@yahoo.com> wrote:

> I'm not sure you can have profiles without MySites, though. The last time I did a deployment MySites were a direct requirement to move forward with UPS.
>
> ________________________________
> From: "Alcock, Bruce G." <balcock@ou.edu>
> To: "sharepointdiscussions@yahoogroups.com" <sharepointdiscussions@yahoogroups.com>
> Sent: Friday, June 29, 2012 8:47 AM
> Subject: RE: [sharepointdiscussions] Re: Login prompt for visiting mysites
>
>
> I believe you can have the IE setting performed through group policies. Check with your domain administrator.
>
> Mysites are separate from User Profile services. UPS is a service that imports information into SharePoint from A/D or an external directory service.
>
> Mysites are a way of implementing individual web sites for users.
>
> -bruce
>
> Bruce Alcock
> System Engineer
> OU Information Technology
>
> ________________________________
> From: mailto:sharepointdiscussions%40yahoogroups.com [mailto:sharepointdiscussions%40yahoogroups.com] on behalf of brother.gabriel [mailto:brgabriel%40sspx.org]
> Sent: Friday, June 29, 2012 9:18 AM
> To: mailto:sharepointdiscussions%40yahoogroups.com
> Subject: [sharepointdiscussions] Re: Login prompt for visiting mysites
>
> Thanks for confirming that for me. Adding the urls to the intranet zone does, indeed, work for IE-base browsers. That seems pretty lousy to have to do that on each individual browser, though, when the main portal depends on mysites for all the user profile stuff.
>
> If I just disable mysites and don't use it, can I still use the "Edit Profile" panel to change AD profiles details?
>
> --- In mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>, "Alcock, Bruce G." <balcock@...> wrote:
> >
> > Believe it - it makes sense when you think about the fact that going from your SharePoint site to the mysite means you changing web sites.
> > If they are using IE, the answer is simple - just put mysites into the local intranet zone and be sure the auto login for intranet zone is enabled. It's also a good practice to put your main SharePoint site into the local intranet zone so users don't get prompted when they want to download an Office file.
> > -bruce
> > Bruce Alcock
> > System Engineer
> > OU Information Technology
> >
> > From: mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com> [mailto:mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>] On Behalf Of brother.gabriel
> > Sent: Thursday, June 28, 2012 4:27 PM
> > To: mailto:sharepointdiscussions%40yahoogroups.com<mailto:sharepointdiscussions%40yahoogroups.com>
> > Subject: [sharepointdiscussions] Login prompt for visiting mysites
> >
> >
> >
> > Salvete! I have this problem whereby if I view someone's user profile, and it has information linked to their profile in mysites, I am asked to login again - with the same credentials!
> >
> > I found this link, but don't want to believe that this is the answer:
> > http://sharepoint.stackexchange.com/questions/26265/getting-prompted-for-password-when-going-to-my-sites?rq=1
> >
> > It is enough to make you want to get rid of mysites altogether. My users have a hard enough time logging in the first time.
> >
> > Can it be resolved?
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 11:25 am (PDT) . Posted by: "Alcock, Bruce G." brucealcock
Thanks, Paul. I think that was what I was trying to say.

-bruce

Bruce Alcock
System Engineer
OU Information Technology

________________________________
From: sharepointdiscussions@yahoogroups.com [sharepointdiscussions@yahoogroups.com] on behalf of Paul Stork [pstork@att.net]
Sent: Friday, June 29, 2012 12:17 PM
To: sharepointdiscussions@yahoogroups.com
Subject: RE: [sharepointdiscussions] Re: Login prompt for visiting mysites

You can't access profiles without a my sites host. But you can the.permissions required to create individual nysites to prevent user from creating their own. That's just the Mycontent portion of mysites

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Fri Jun 29, 2012 1:37 pm (PDT) . Posted by: "onewisegeek" onewisegeek
Dumb content filter... Can't get to a good tech site.

Here is a Word doc on GPMC and adding sites to different zones.

www.education.ky.gov/nr/rdonlyres/8ceda60b-c4e3-4921-8292-a2985784280b/0/usinggpmctoaddtrustedsitetointranetzonev02.doc

Fri Jun 29, 2012 8:13 am (PDT) . Posted by: "imstac" imstac
Hi,
I had a user call me this week because his 'Open in Windows Explorer' option is missing from the Actions list and is replaced with 'Connect to Client'. I have not seen this issue before and he is the only one having the problem so I'm thinking it is client machine related.

We are using SharePoint 2007. He has Windows 7, Office 2010 installed. Using IE 9. I looked at his toolbars in IE and noticed that Groove was listed but when I went to Add/Remove programs to remove it I did not see it in the Office features list to remove.

Has anyone else ran into this problem?

Fri Jun 29, 2012 2:00 pm (PDT) . Posted by: "onewisegeek" onewisegeek
I think you have to resynch the profiles

No comments: