Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

500 error on loading search control - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
David
#1 Posted : Tuesday, October 27, 2015 7:56:10 AM
Rank: Member

Groups: Registered

Joined: 10/22/2015
Posts: 12
Location: Adelaide
I saw a thread on a similar problem and followed the advice there to get a detailed error message:

Quote:
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.]
System.ServiceModel.Activation.HostedAspNetEnvironment.ValidateCompatibilityRequirements(AspNetCompatibilityRequirementsMode compatibilityMode) +154655
System.ServiceModel.Description.DispatcherBuilder.ValidateDescription(ServiceDescription description, ServiceHostBase serviceHost) +281
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +137
System.ServiceModel.ServiceHostBase.InitializeRuntime() +93
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +48
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +307
System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +130
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +738

[ServiceActivationException: The service '/Keyoti_SearchEngine_Web_Common/SearchService.svc' cannot be activated due to an exception during compilation. The exception message is: The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'..]
System.Runtime.AsyncResult.End(IAsyncResult result) +604403
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +238
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +178

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0


I can't turn off ASP.NET compatibility in web.config, as I need it for other components of my site.
And I can't work out where/how to change the RequirementsMode (I'm guessing that's in the source code of the SearchService?)

I tried using the asmx, but then I can't even get the site to build.
Jim
#2 Posted : Tuesday, October 27, 2015 5:02:47 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Ah, there's a gotcha. It doesn't really matter of compatibility mode is enabled or not - so we'll add that attribute and I'll get a new build for you later today.

Otherwise, if you prefer we can investigate why the ASMX isn't working for you.

Sorry about that.

Jim
-your feedback is helpful to other users, thank you!


Jim
#3 Posted : Tuesday, October 27, 2015 5:05:24 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Looks like we've already added it, it just hasn't been released yet.

https://www.dropbox.com/...-Setup-v6.0-UD.msi?dl=0

Jim
-your feedback is helpful to other users, thank you!


David
#4 Posted : Friday, October 30, 2015 1:21:32 AM
Rank: Member

Groups: Registered

Joined: 10/22/2015
Posts: 12
Location: Adelaide
Great! That got it working on my localhost.

Now I'm trying to deploy to a test server, where the index is stored in a different location.
I set the path in web.config, but it seems to ignore it, and gives an error about the (default) index directory being unreadable.

I found path settings in SearchUnit.js and RapidSearch.js - do I need to change these as well (or instead)?

(I'm using the Javascript controls in an ASP.NET application - would I be better off using the .NET controls?)
Jim
#5 Posted : Friday, October 30, 2015 3:57:21 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Can you show me how you set it in the web.config?

Thanks
Jim
PS No, I wouldn't switch to the Server controls.
-your feedback is helpful to other users, thank you!


David
#6 Posted : Friday, October 30, 2015 4:29:06 AM
Rank: Member

Groups: Registered

Joined: 10/22/2015
Posts: 12
Location: Adelaide
Web.config:
Code:

<configuration>
  <appSettings>
    <add key="Keyoti-SearchEngine-IndexDirectory" value="C:\inetpub\wwwroot\searchunit\KeyotiSearchAdministration\IndexDirectory"/>
Jim
#7 Posted : Friday, October 30, 2015 4:16:58 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Looks like we didn't implement reading the IndexDirectory from the web.config. I can give you a new MSI that does it, or you can set it in the Javascript

Code:

        <script type="text/javascript">
            keyotiSearch.indexDirectory = "C:\\inetpub\\wwwroot\\searchunit\\KeyotiSearchAdministration\\IndexDirectory";
        </script>



Sorry for that omission.

Jim
-your feedback is helpful to other users, thank you!


David
#8 Posted : Monday, November 2, 2015 12:30:59 AM
Rank: Member

Groups: Registered

Joined: 10/22/2015
Posts: 12
Location: Adelaide
I'm trying it from the other angle - change the indexer's path to point to the search's default location.
Thanks.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.