I'm using web.Site.MakeFullUrl((new SPFieldLookupValue(row["FileRef"] as string).LookupValue))
to get the URL to results in a GetSiteData query.
For some items this works fine, but for others I get results like http://server/Lists/My%20Message%20Board/Test/9_.000 - which always 404s. The urls always end in n_.0000.
Does anybody know why this is happening and how to get the correct URL?
The items generating the weird url are not items in a Document Library that have a file associated with the actual SPListItem. The "normal" urls are urls to files in a doc lib, the weird ones are urls to items in a regular list. Just check for the type of item in the webpart / control / xsl to render the results.
If it is an item from a regular list (with the weird url), just replace it and make the url look like so:
http://server/Lists/My%20Message%20Board/Test/9_.000 should be:
http://server/Lists/My%20Message%20Board/Test/AllItems.aspx?ID=ITEMID