Thursday, April 28, 2011

Code-First and Contract-First Development Style


Marking a class or interface with ServiceContract and one or more of its methods with OperationContract also allows automatically generating service contract definitions in WSDL. Accordingly, the externally visible definition of every WCF service contract can be accessed as a standard WSDL document specifying the operations in that contract. This style of development, commonly called code-first, allows creating a standard interface definition directly from types defined in programming languages such as C# or Visual Basic.

An alternative approach is contract-first development, an option that WCF also supports. In this case, a developer typically starts with a WSDL document describing the interface (i.e., the contract) that a service class must implement. Using a tool called svcutil, the developer can generate a skeleton service class directly from a WSDL definition.

copied from MSDN for my own reference.

Friday, April 15, 2011

How to disconnect SVN working copy


The simple solution is that remove all “.svn” hidden folder from the local directory.

Tuesday, April 12, 2011

Bing Map Geocoding


Never use “#” symbol in addressLine while requesting to Bing Map for geocoding.

One or more entities in the input data are not valid. Check the error log for more information

Problem: How to check the error log while uploading data source to Bing Map

Solution:  One of the reason could be missing Latitude and Longitude. Because both are compulsory for data upload to bing map spatial services.

for error log please visit the link below.

http://msdn.microsoft.com/en-us/library/gg585127.aspx


I am using following link to check my erreor details while uploading data source to Bing Maps.
This is the link which i found in upload response 

<Link role=\"output\" name=\"failed\">https://spatial.virtualearth.net/REST/v1/dataflows/LoadDataSource/92066201dcb349e1965e41fd573452d6/output/failed</Link>
          <Status>Aborted</Status>
when try the access the above link i get following response.

{"authenticationResultCode":"NoCredentials","brandLogoUri":"http:\/\/spatial.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"c6fe3ace225244bc9d66289d0cb7fe6f|AMSM001566|02.00.82.2300|"}

Monday, April 11, 2011

Output/failedAborted. One or more entities in the input data are not valid.


Problem : Error while uploading Data Source to Bing Maps
Output/failedAborted. One or more entities in the input data are not valid. 


Solution: Check your upload schema, spellings and data types.

Data at the root level is invalid. Line 1, position 1.


Error while processing xml response of Bing Map Spatial Services upload job

Problem: Data at the root level is invalid. Line 1, position 1.

Solution: Please specify the response format while sending request. By default load data source job return response in JSON format.
For XML please don’t miss to specify the out format shown below.
http://spatial.virtualearth.net/REST/v1/Dataflows/LoadDatasource/f8293dc72ac04942b7cb003c9608c547?o=xml&key=b1c323ea23d99d267d99d267bbb814