5

I'm trying to run/debug DXA/Web8 using Visual Studio. When I start the debugging session I get "No matching Localization found for URL 'http://localhost:61762/'" (or a similar message depending on which port IIS express starts the application)

In CdApiLocalizationResolver.cs I can see that the following line is returning a null mapping.

mapping = _mappingsRetriever.GetPublicationMapping(urlLeftPart)

where the value of urlLeftPart is "http://localhost:61762/".

All of this makes sense, I suppose, because the framework can't "know" that the application is being run up on an arbitrary port on localhost, so using this to map a publication might be a little challenging.

Is it possible to configure DXA to cope with this scenario? If so, how can I do this, and if not, what other possible ways of working are likely to be successful?

1 Answer 1

6

In Visual Studio (project properties-->Web tab) you can configure the port used for IIS Express so it uses the same one each time, and depending on how your localizations are managed either add this port (and domain) in cd_dynamic_conf.xml or the topology manager to make sure that DXA understands which publication(s) this maps to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.