Friday, March 7, 2014

The type specified in the TypeName property of ObjectDataSource 'ObjectDataSource1' could not be found (ASP.NET Webservice)

As I was updating one of my ASP.NET application to 4.5, running the app generates an error as stated above. I remembered that the Object Datasource control was dependent on a webservice. So, after reviewing the new configuration of the webservice, the port, url and namespace have changed. So, here are the steps to make my app work again.
 1. Update the web service .discomap file through Add Service Reference and then choosing advanced to target it as .NET 2.0 platorm. Though Service Reference should be recommended or WCF service.  
 2. Change Web.Config setting of the web service including it's IP and Port. Example:<br>  
   <add key="localhost.ECommerceService" value=""/><br>  
   to<br><add key="localhost.ECommerceService" value=""/>  
 3. Configure again the object Datasource to update it's TypeName value.<br>  
   Example of an updated TypeName:   


Post a Comment