Showing posts from July, 2014

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

this blog is for any1 who get the ThreadAbortException when caling Response.End(), and then tried the other options such as HttpContext.Current.ApplicationInstance.CompleteRequest() and found out that there was no replacement.

i'll start with the bottom line: if you want to stop right now your response and send it as is you dont have any other option other than Response.End(), period and it's the right thing to throw that EX in that case.

the answer is its because there is the "HTTP pipeline" and the "Asp.Net pipeline", and CompleteRequest() cuts the HTTP pipeline but not the Asp.Net one so everything that is from handlers forwars (including all page events) continues but your part, the asp one, stays in your hands so that no information will be lost, so ur suppose to manage your code currectly, since information lost is really a bad thing, although in most cases we use Response.End() we know what we are losing and we want it.

see this short article about t…

Create Handler tutorial and example

creating a handler is a super simple task - if u know what that task needs

there are 2 options to create the same thing.

right click and add new item from your visual studio and there will be 2 options, one named "Generic Handler" and the other "IISHandler", both will create a .cs file and a class inheriting from IHTTPHandler.

the Generic Handler also creates an ashx file, which will save you another line in your web config, so after creating ur generic handler go to ur web config and find the <handlers> tag and add the following:
<add name="myHandler" verb="*" path="myHandler.ashx" type="myNamespace.myHandler" />

in case you are working with GAC than you must add to type the assembly info like this
type="myNamespace.myHandler, myNamespace, Version=, PublicKeyToken=71e9bce111e9429c " />
of course that the data i put here is totally random, so learn how to get yourself ur real assembly info

sharepoint 2013 - cross site publishing for the anonymous site

you can have it in 2 ways.
the easy one is to extent your web application and basically all problems solved, since you have all ur data with an anon face.

but if you want to have 2 different site collections, 1 anonymous for the public facing and another dedicated for the catalog(s) then there is a catch - for the items themselves of the cataloged list you can leave the anonymous access and everything will be alright, but if you use the dedicated site's resources than ur in for a login promt. and giving the anon users lists and libraries only doesnt fix that, so ur in for 2 anon sites.

for example i have 2 catalogs lists, one have its images as links and secondary as images from an image library. the 1st list items are shown in the public site, but the 2snd list items are not unless i give it full anon access.

and dont forget - you must also cancel the break inheritance in the master pages gallery, and either publish all the new stuff or cancel versioning (the publish/version is e…

Sharepoint Connect to Catalog Error

Terms can not be shared multiple times in the same term set.

i thought mine was because the Metadata Column wasnt really connected to my Term Store, and that caused that i chose terms existing in the term set yet he didnt find them and tried to recreate them.
all that started cuz i didnt check the Available For Tagging checkbox.

note that he creates teh pages anyway again and again.

then i just deleted the terms i originally put and it worked, but now i am without terms...

so something is just wrong and i'll go find myself a new tutorial

after some extra play i think i got it
if in your navigation settings you set for structural navigation then you get an error: "We could not find the navigation term set for this site. Navigation integration and friendly URLs will not be configured"

so to fix that you need to go back to navigation settings and set the navigation to managed navigation. but there if you choose the term set that the catalog is going to use (cuz its the only one th…

Sharepoint Search Crawl Exception, Search not crawling documents

The content processing pipeline failed to process the item.
( The type initializer for 'Microsoft.Office.Server.Search.LocStringIdLookupTable' threw an exception.
 SearchID = C7F1F2A7-1EF3-4D78-A0BF-E93A752C6236 ).

mine was because i limited the noderunner.

C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config
set <nodeRunnerSettings memoryLimitMegabytes="0" />

anyway for these kinda problems restart the search service and iisreset

Sharepoint Anonymous Search Rest not working

status 500, Microsoft.Office.Server.Search.REST.SearchServiceException, unknown error occurred.
if that's what you get, then go take a look at the ULS logs, there is a lot of info there.
one of them might be "An XML declaration with an encoding is required for all non-UTF8 documents." that mean that the queryparametertemplate.xml is encoded with something that is not UTF-8, so download it, and save it again as UTF-8 (preferred to delete the old copy from all recycles before)

See Database (SQL / WCF) data in Sharepoint - Implement BDC and Search

Scenario - we have an SQL DB with a lot of data, and we want to put it in a sharepoint site, and even more we want to show it to our Anon user (wwwhhooooooo!!!)
*this article was tester in SP 2013 but is valid for 2010 too.
*BDC = Business Data Connectivity
so minimal background:
1. Anon users cannot see anything but pages. we shall see how to overcome this.
2. BDC is a magic tool that with it you can introduce you database to sharepoint and teach them to play toghether.
3. you can search and index the BDC data.

conclusion: we want to index our BDC and with Content Search WP or Rest show the data to the anon users, so lets go:

1. Start the services:
we must make sure that the sharepoint BDC and search service are up: Central Admin -> Application Management -> Manage services on server:

2. Provision service applications:
the fact that the services are now up and running means that there is a platform ready to use, we now need to make instances,  Central Admin -> Application Ma…