1
Vote

Document Link Handler does not link to documents on other URL's

description

Hi Corey.
 
We have just tested your document link handler web part in our development environment. While it is working well for documents in the same Web Application, it does not work well for documents in other web applications. Eg:
 
Searching from
http://spdev for "testfile" returns http://spdev/doclib/testfile.docx
http://AUPIA53SHS14:5001/subweb/projectdocs/testfile.docx
 
The "Document Link Handler" links above the second URL (http://AUPIA53SHS14:5001/blah blah) do not work and throw an error:   Could not create type 'DotNetMafia.Office.Server.Search.Handlers.DocumentLink'. at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
In the ULS logs you also see:
Exception Type: System.Web.HttpParseException Exception Message: Could not create type 'DotNetMafia.Office.Server.Search.Handlers.DocumentLink'.
 
Thanks
Brad

file attachments

comments

SPArch wrote Feb 17, 2010 at 1:50 AM

Hi - it seems that the underlying problem is that the solution is trying to access the other Web Application using the current web application's credentials. So... This solution would work just fine if both sites existed under the one Web application. We've just tested and giving the http://spdev web app account rights to access the http://AUPIA53SHS14:5001/ web app's database makes the solution work.

So... it looks like there might be an opportunity to improve the way the solution works so it uses an account that would have access to more than just the current web application?

cdog wrote Jul 25, 2010 at 10:28 PM

I think you are right. It does have an issue that is tied to the current web application. In indexes with multiple web applications, I need to come up with a way to lookup the IDs of the document. I may consider having it call the web services instead of using the API.

wrote Feb 13, 2013 at 2:29 AM