Unable to access WCF service from Mobile Service in Azure -
wanted access wcf service
mobile service
in windows azure
. this, using service bus relay
connection configured credentials call wcf service
.
when published mobile service
on local machine, call wcf service
without issue.
but when published mobile service
on azure, giving following error when trying access it. iservice1 contract wcf service. defined endpoint in web.config file in mobile service contract.
can me resolve this?
exception=system.invalidoperationexception: not find default endpoint element references contract 'servicereference1.iservice1' in servicemodel client configuration section. might because no configuration file found application, or because no endpoint element matching contract found in client element.
edit: upon further investigating issue, found out that, proxy class, generated adding service reference, not picking endpoint definition defined in web.config when host in cloud. when service run on machine's azure emulator, picking endpoint definition web.config.
so, resolve issue, had define endpoint programmatically , use channelfactory class call wcf service.
any thoughts on why mobile service unable read web.config in cloud?
you can set app settings key/value pairs in appsettings section of .net backend project’s web.config file. these values used when testing .net backend project on local computer. when running in azure, these values ignored , portal settings used instead.
http://msdn.microsoft.com/en-us/library/azure/dn529070.aspx
so guess there special .config file in mobile services don't know more. initializing wcf programmaticaly solution.
Comments
Post a Comment