Free Support Forum - groupdocs.com

StructureMap configuration failures: Error: 170


#1

I have developed the asp.net web application. It’s working in the localhost without any issues. But Once its hosted on a .Net server it gives the following error.

Server Error in ‘/’ Application.

        <h2> <i>StructureMap configuration failures:<br>Error:  170<br>Source:

Registry: StructureMap.Configuration.DSL.Registry, StructureMap,
Version=2.6.3.0, Culture=neutral, PublicKeyToken=e60ad81abae3c223
Unable
to find the exported Type’s in assembly Groupdocs.Web.UI.Comparison,
Version=2.0.5205.21794, Culture=neutral,
PublicKeyToken=c9073b8a6a9c78c8. One or more of the assembly’s
dependencies may be missing.

Could not load file or assembly
‘System.Web.Mvc, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system
cannot find the file specified.
System.IO.FileNotFoundException:
Could not load file or assembly ‘System.Web.Mvc, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its
dependencies. The system cannot find the file specified.
File name: ‘System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at StructureMap.Graph.TypePool.<>c__DisplayClass2.<.ctor>b__0(Assembly assembly)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

My project files can be downloaded from the link below.

https://www.dropbox.com/sh/j3e1645s5tr5v5y/AAASIXdcnzbNOra45B8z2RGja

please help me to fix this issue.

Thanks,

Srinath


#2

Hello Srinath,

We are sorry to hear that you have such issue. We have downloaded and investigated your ASP.NET WebForms project. Code base of your project is absolutely correct, in other words, there are no errors inside it.

The problem is that GroupDocs.Comparison for .NET requires ASP.NET MVC Framework to be installed. Basically, a ASP.NET WebForms web-application should not be dependent on the System.Web.Mvc assembly, but unfortunately the reference to System.Web.Mvc comes from Groupdocs.Web.UI which is the “core” of GroupDocs.Comparison. The main reason of your issue is that there is code that automatically detects the environment in which the product is running and uses the needed classes.

So in order to fix it, you should install the ASP.NET MVC Framework even if you want to use GroupDocs.Comparison in a ASP.NET WebForms project. It can be easily done using NuGet or manually.

If you will have more questions please feel free to contact us.


#3

Hi,

I did everything that was mentioned above. The error seems to be fixed now.
But the view isn’t loading.
It gives the following error.
The template widgets/diff-explorer could not be loaded. HTTP Status code: 404

What should I do fix that.

Thanks,
Srinath


#4

Hello Srinath,

We are sorry to hear that you have such issue.

We visited your web-site http://www.greatstone.uk/ and a web-page where GroupDocs.Comparison for .NET is intended to be: http://www.greatstone.uk/comparison/

We saw that you are using IIS 8.0 and we suppose that in the IIS you are using Virtual Directory system for different parts of your web-site. You have http://www.greatstone.uk/viewer/ for Viewer, http://www.greatstone.uk/anotation/ for Annotation, http://www.greatstone.uk/comparison/ for Comparison and so on.

And the reason of an error is a fact of using a Virtual Directory. Please take a look at the screenshot in the end of this post (you can open it in a full size). This is a screenshot of “Network scanner” from Google Chrome developer tools. We used several arrows in order to show you the differences between correct requests that have “http://www.greatstone.uk/comparison/gd-comparison-handler/” URL prefix and incorrect which have “http://www.greatstone.uk/gd-comparison-handler/” URL prefix. The requests which are invoked from jQuery “don’t know” about Virtual Directory and form URLs without inset.

In order to fix this you need to specify correct domain name explicitly. For this use method
GroupdocsComparison.SetBaseUrl(“http://www.greatstone.uk/comparison/”);
in the “Application_Start” method from Global.asax.

If you will have more questions please feel free to contact us.


#5

Hi,

I used the method

GroupdocsComparison.SetBaseUrl(“http://www.greatstone.uk/comparison/”);
in the “Application_Start” method from Global.asax.

All issues are now fixed except for 1. It’s shown in the attached image.

You can view configuration and Global.asax files by using the following link.
https://www.dropbox.com/sh/xbatotpwmku512b/AACRm2K6vZ_nCGSQ1AB9DEb9a


Thanks,
Srinath


#6

Hello Srinath,

We are sorry to hear that you have such issue and we are sorry for this delay. Our dev team investigates a described error at this moment. We will notify you when the solution will be found.