|
 |
|
|
Where to write code in sharepoint designer? Where should I add server side code(code behind C# code) on the page in sharepoint designer(MOSS 2007)
Thanks Prakash
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am using your code CmsHttpContext.Current.UserHasRightToBrowse(resultRow("DAV%3ahref").ToString()) to filter postings returned by the search query. It always returns true when in fact the user has no right to browse this channel/posting.
I wonder if it has something to do with my navigation permission set-up. The posting in question has this generic url: https://company/dep1/sec1/area1/special/virtual
The special channel is restricted only to a particular group and so is the virtual channel, but the channels above special are accessible to all subscribers.
What shall I do to fix this? Thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Could someone tell me what my web.config would look like if I just used SearchSetup.exe cmd line to create my search. "CMSChannels" as my index doesn't return any results, but the MS search control on my site does, so I must be doing something wrong.
Thanks ~James jcoleman@agency.com
___________________________ J A M E S C O L E M A N Practice Director, Microsoft AGENCY.COM jcoleman@agency.com http://www.agency.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi Stephen,
I'm getting "The Local Security Authority cannot be contacted" every time when I try to do a search. Would you be able to shed some light? My SP server is in a VM environment, not sure if that makes any difference.
Thanks, Jeff
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
>> Would you be able to shed some light? >>
Not really, I am afraid. It does look like it has something to do with the VM.
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Stephen,
I was hoping you had some insight into this issue. I seem to pre-authenticate just fine, but get an Internal Server Error from this line from the queryservice.cs ->
object[] results = this.Invoke("QueryEx", new object[] {queryXml});
Everything looks correct, but I can't find out what the problem is. Any ideas? I haven't modified the query btw.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
btw both the CMS & SPS are running on different VPCs.
Here's the stack:
[SoapException: Server was unable to process request. --> Internal server error] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) www.wellmont.org.Classes.QueryService.QueryEx(String queryXml) in c:\inetpub\wwwroot\www.wellmont.org\classes\queryservice.cs:113 www.wellmont.org.controls.SearchResults.GetResultTable(QueryService queryWS) in c:\inetpub\wwwroot\www.wellmont.org\controls\searchresults.ascx.cs:310 www.wellmont.org.controls.SearchResults.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\www.wellmont.org\controls\searchresults.ascx.cs:187 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Control.LoadRecursive() System.Web.UI.Control.LoadRecursive() System.Web.UI.Control.LoadRecursive() System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain()
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This usually means the query's syntax is incorrect. In SearchResults.ascx.cs:
string queryXML = String.Format(searchXml.InnerXml.ToString(), GetSearchSource(searchIndex), searchTerms); DataSet resultData = queryWS.QueryEx(queryXML);
try setting an break point to find out what the value of queryXML is.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am getting the same error. I don't know exactly what to look for in the query's syntax that could be incorrect. This is the queryXML (within the Watch window because xml didn't paste too well in this forum - so I am leaving the escape characters) for when I typed in 'Featured'. Any help would be greatly appreciated.
queryXML "<Format>urn:Microsoft.Search.Response.Document.Document</Format><![CDATA[SELECT \"DAV:href\",\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:displaytitle\",\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:description\"\r\n\t\t\t\tFROM All..Scope()\r\n\t\t\t\tWHERE\r\n\t\t\t\tWITH (\r\n\t\t\t\t\"DAV:contentclass\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:description\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:sourcegroup\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:cataloggroup\" ,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Keywords\":1.0,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Title\" .9,\r\n\t\t\t\t\"DAV:displayname\" .9,\r\n\t\t\t\t\"urn:schemas-microsoft-com:publishing:Category\" .8,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Subject\" .8,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Author\" .7,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Description\" .5,\r\n\t\t\t\t\"urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName\" .2,\r\n\t\t\t\tcontents .1,\r\n\t\t\t\t* .05) AS #WeightedProps\r\n\t\t\t\tFREETEXT(#WeightedProps, 'Featured')\r\n\t\t\t\tORDER BY \"urn:schemas.microsoft.com:fulltextqueryinfo:rank\" DESC ]]>150" string
___________________________ J A M E S C O L E M A N Practice Director, Microsoft AGENCY.COM jcoleman@agency.com http://www.agency.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
could someone post a queryXML string that works for them so I can use it to troubleshoot where the error is occuring.
___________________________ J A M E S C O L E M A N Practice Director, Microsoft AGENCY.COM jcoleman@agency.com http://www.agency.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
The following is the queryXML searching "Featured" on a content index "WoodgroveNet":
"<?xml version=\"1.0\" encoding=\"utf-8\"?><QueryPacket xmlns=\"urn:Microsoft.Search.Query\" Revision=\"1000\"><Query domain=\"QDomain\"><SupportedFormats><Format>urn:Microsoft.Search.Response.Document.Document</Format></SupportedFormats><Context><QueryText language=\"en-US\" type=\"MSSQLFT\"><![CDATA[SELECT \"DAV:href\",\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:displaytitle\",\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:description\"\r\n\t\t\t\tFROM WoodgroveNet..Scope()\r\n\t\t\t\tWHERE\r\n\t\t\t\tWITH (\r\n\t\t\t\t\"DAV:contentclass\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:description\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:sourcegroup\" ,\r\n\t\t\t\t\"urn:schemas.microsoft.com:fulltextqueryinfo:cataloggroup\" ,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Keywords\":1.0,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Title\" .9,\r\n\t\t\t\t\"DAV:displayname\" .9,\r\n\t\t\t\t\"urn:schemas-microsoft-com:publishing:Category\" .8,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Subject\" .8,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Author\" .7,\r\n\t\t\t\t\"urn:schemas-microsoft-com:office:office#Description\" .5,\r\n\t\t\t\t\"urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName\" .2,\r\n\t\t\t\tcontents .1,\r\n\t\t\t\t* .05) AS #WeightedProps\r\n\t\t\t\tFREETEXT(#WeightedProps, 'Featured')\r\n\t\t\t\tORDER BY \"urn:schemas.microsoft.com:fulltextqueryinfo:rank\" DESC ]]></QueryText></Context><Range><StartAt>1</StartAt><Count>500</Count></Range></Query></QueryPacket>"
Your XML seems to indicate that you have a content index called "All". "All" is a special keyword if you have multiple content indexes listed in web.config. Hope this helps.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
That definitely helps. How do I know what my content index is called?
Thanks
___________________________ J A M E S C O L E M A N Practice Director, Microsoft AGENCY.COM jcoleman@agency.com http://www.agency.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
In your code you have this line: queryWS.Credentials = CredentialCache.DefaultCredentials.GetCredential(New Uri(queryWS.Url), "NTLM")
Since we're using basic authentication, the "NTLM" becomes "Basic", correct? I tried this but it still doesn't work. According to msdn, "The DefaultCredentials property applies only to NTLM, negotiate, and Kerberos-based authentication". I am using IIS5.
My CMS site is on a separate server from the SPS portal. I am able to get it to work if I hardcode the credentials using the NetworkCredentials class. I don't understand why hardcoding would work but not your original code.
How should I rewrite the above line of code to accomodate basic authentication?
Thanks for your help.
Pete
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
OK so I've modified the code to accept hardcoded credentials. But it only works when SPS is set to anonymous access [Site Settings, Manage security ..., Change anonymous access settings]. As soon as I turn anonymous setting off, the search doesn't work anymore although I'm still passing the correct credentials. Stephen, will you pls explain to me how the search page connects to the web service on SPS? How excatly does the search page work? Thanks for your help.
Pete
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Ok, I did a step through the code (with the crdentials hardcoded in it) and here is where it's failing: queryWS.queryEx(queryXML) and the error I get is http status: 401 unauthorized. Again, I don't get this error when I have anonymous setting ON.
Pls help. Thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Did you get this working , i seem to be at the same stage of fail!
Dim resultData As DataSet = queryWS.QueryEx(queryXML)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |