Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Error when validate Uri #32

Open
ltphuong opened this issue May 29, 2018 · 1 comment
Open

Error when validate Uri #32

ltphuong opened this issue May 29, 2018 · 1 comment

Comments

@ltphuong
Copy link

Hi,
I deployed ValidationTool to localhost. When i input the Uri and click on Validate button. The error message show: "Sending validation request...Retrieving response payload...Error retrieving validation results - please retry."

5-25-2018 3-53-19 pm

Pls help to guild me to correct it. Thanks

@jahngordon
Copy link

jahngordon commented May 19, 2019

I found this tricky to get running, but that's because I don't normally touch Visual Studio or IIS and it's completely foreign to me.

The first things that took a little while to figure out is that the validation service requires a database to store the job information - you'll need SQL Server, to generate a schema, and to set the app up to connect to it.

I think the steps below are the ones I needed to get from the code here to a running validator:

  • Install VS – (used VS2019 on Win 10) you'll need Entity Framework tools to be able to export Schema to SQL Server
  • Install MSSQL Server (I used 2014 Express edition on Win 10 as it was a 32 bit host)
  • Use EDMX file in Validation Service project to generate Schema into SQL Server
  • Configure data source in Web.config to connect to the SQL Server
  • Build the XML Rules project to create the rules folder in Validation Service/bin
  • Build the Code Rules project to create the extensions folder in the Validation Service/bin
  • Just delete all Foreign Keys from the database created (I had FK errors so it's like the service doesn't store the items in the right order)
  • Set startup project to be validation service – run as IIS/IE from VS
  • Select your endpoint in IE and it should work... (I think!)

I haven't managed to make it run in IIS as a service yet

EDIT: Publishing to IIS worked fine - just get the connection string for the SQL Server instance correct. There was a warning in the IIS logs:

Exception message: This collection already contains an address with scheme https. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.

Following the advice and adding multipleSiteBindingsEnabled="true" to the appropriate XML tag in web.config fixed this and it runs. It's still IE only so I guess I need to apply https://github.com/OData/ValidationTool/pull/29/commits to get it working there (another day..)

FURTHER EDIT: Not another day, but since it was just one file... applying the pull request above fixes the validator in Chrome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants