I have seen few customers running into this issue. This forced me to write this blog.
Background: On a development environment, my customer had a BizTalk application. Application has few WCF bindings. They created MSI file that can be used to install the application onto production machines. When they try to deploy the application to target machines, following error is encountered
Validation failed for 1 resource(s).
Invalid URL "http://localhost:90/" provided as destination location. Valid format of URL is "http://localhost[:port]/path".
Environment: BizTalk 2006, Windows 2003
Cause: During the deployment of MSI application, For WCF bindings, BizTalk would verify whether URL is in <http://localhost[:port]/path> format or not. If it is not in the specified format BizTalk would display the error similar to the above.
In this specific case WCF service is hosted directly under root directory (under localhost) and hence it is referenced by http://localhost. When BizTalk checks the URL it finds that actual URL is not represented in http://localhost[:port]/path format (because it expects to see that WCF service is hosted under a Virtual directory, but not under root directly) and it errors out.
Resolution: You can work around this issue by following the below steps.
1) In the source machine host WCF service under virtual directory (i.e. For
example instead of hosting WCF service directly under localhost host it under localhost/WCFService)
2) Modify the receive location properties of WCF Receive port and specify the modified URI. It should be like /virtualdirectoryname/servicename.svc.
3) Export the package now
4) Make sure while exporting, under the “Specify IIS Hosts” window make sure Hostname is set to localhost and Path should contain /virtualdirectoryname (If we just have “/” here it would error out)
5) Import the MSI file in the target computer
Hope this helps!
Keywords: WCF Bindings, Biztalk, MSI , Invalid URL