|
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.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
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?)
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
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"/>
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
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.
|
|