Tuesday, September 27, 2011

C:\Windows\Temp\Msftqws.pdw\$(DllSelfRegisterEx) could not be registered because it was not found


Here is the process explained in steps
First you need to find a file name setup.lst in the package and deployment folder that you have created.
Then open the setup.lst file in notepad.
Replace all instances of DllSelfRegisterEx with DllSelfRegister
Save the setup.lst
Run the installation wizard again.

http://nadiaamir.wordpress.com/2007/03/13/cwindowstempmsftqwspdwdllselfregisterex-could-not-be-registered-because-it-was-not-found/

Friday, September 9, 2011

Metadata contains a reference that cannot be resolved: 'http://localhost/.......

Metadata contains a reference that cannot be resolved: 'http://localhost/SignTrakService/SignTrakService.svc?wsdl'.
The WSDL document contains links that could not be resolved.
There was an error downloading 'http://localhost/SignTrakService/SignTrakService.svc?xsd=xsd0'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: 'http://localhost/SignTrakService/SignTrakService.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost/SignTrakService/SignTrakService.svc.  The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.


Solution:


Just turn of your IIS 7 from Window 7, Restart your computer, and again turn "ON" IIS 7 with all features.



Thursday, August 4, 2011

How to set this text into WPF RichTextBox?


Solution:

        public void SetRTFText(string text)
  {
   MemoryStream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes(text));
   this.mainRTB.Selection.Load(stream, DataFormats.Rtf);
  }

Refference

Thursday, June 16, 2011

synchronous and asynchronous calls to the WCF service

Both synchronous and asynchronous calls to the WCF service are pretty simple by using the proxies generated by the Visual Studio. When making a synchronous call, the UI thread that issues the call will be blocked until the WCF service sends the results back to the client. When an asynchronous call is made, the UI thread sends the WCF request and forks a worker thread to wait for the response from the WCF service. The UI thread is not blocked and remains responsive to other user interactions. When the response from the WCF service comes back, the "AsyncCallback" "delegate" is executed to process the WCF service response.

taking from

http://www.codeproject.com/KB/WCF/TwoWaysCallWCF.aspx


For my own reference.

Saturday, May 21, 2011

What is WakeLock?

Keep CPU and Screen keep running forceful. Which cause the battery drains the battery and efficiency.

Tuesday, May 17, 2011

Map Point, FindServiceSoap.FindAddress Method

  • The FindAddress method is valid with the MapPoint.AP, MapPoint.BR, MapPoint.EU, and MapPoint.NA data sources. For general information about the MapPoint Web Service data sources, see MapPoint Web Service Data Sources and Capabilities.

  • Address information can be returned from only certain countries or regions within the MapPoint.AP, MapPoint.BR, MapPoint.EU, and MapPoint.NA data sources.

  • Assigning a range or start index that is greater than 100 with this method does not cause any errors in your applications. However, this method does not return any valid addresses when such range or start index is assigned.

  • If no results are found, the returned FindResults.NumberFound property value is 0.

    (From MSDN for my own reference.)

    For more details

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


    In MWS, the FindResult.Score property supplies the estimated level of accuracy for a given search result. The

    score ranges between 1.0 and 0.0, between and exact match and no match respectively.

    The Bing Locations API Location response contains a Confidence element with one of the following values: High,

    Medium, Low and Unknown. The JSON response in the Appendix shows a confidence value of High for the single

    result. For less specific searches, the JSON response may include multiple results.

Thursday, May 5, 2011

Switching from Map Point Staging to Production Environment

<add key="IsProduction" value="T" />


<add key="RServiceStaging" value="http://renderv3.staging.mappoint.net/render-30/RenderService.asmx" />
<add key="RServiceProduction" value="http://renderv3.mappoint.net/render-30/RenderService.asmx" />


<add key="FServiceStaging" value="http://findv3.staging.mappoint.net/find-30/FindService.asmx" />
<add key="FServiceProduction" value="http://findv3.mappoint.net/find-30/FindService.asmx" />


<add key="RtServiceStaging" value="http://routev3.staging.mappoint.net/route-30/RouteService.asmx" />
<add key="RtServiceProduction" value="http://routev3.mappoint.net/route-30/RouteService.asmx" />


<add key="CServiceStaging" value="http://findv3.staging.mappoint.net/find-30/CommonService.asmx" />
<add key="CServiceProduction" value="http://findv3.mappoint.net/find-30/CommonService.asmx" />

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




Wednesday, March 30, 2011

Problem: Error: access to '/svn/../!svn/act/a107b01e-8ed8-014b-a22c-6df3be9a7a73' forbidden

Problem: Error: access to '/svn/../!svn/act/a107b01e-8ed8-014b-a22c-6df3be9a7a73' forbidden

Some time you face this error while committing their application to SVN server.

Solution: One of the reasons could be case sensitivity of target URL. As SVN commit operation is case sensitive.

This easiest way to debug a window service

Problem: Cannot start service from command liner or debugger. A window service must first in stalled (using install.exe) and then start with the Server Explorer, Windows Service Administrative tool or the Net START command.

Solution:

1. Create a public method and call OnStart method of service in this as shown.

public partial class Service2 : ServiceBase

{

public Service2()

{

InitializeComponent();

CanPauseAndContinue = true;

}

public void myMethod()

{

string[] myArt = new string[] { "one", "two", "three" };

this.OnStart(myArt);

}

//protected override void OnStart(string[] args)

protected override void OnStart(string[] args)

{

// TODO: Add code here to start your service.

}

}

2. Call this public method in Main.

static void Main()

{

ServiceBase[] ServicesToRun;

(new Service2()).myMethod(); // allows easy debugging of OnStart()

}

Tuesday, March 29, 2011

The request failed with HTTP status 405: Method Not Allowed

Exception : The request failed with HTTP status 405: Method Not Allowed

Solution : Please check service URL, point it to Service.asmx instead of Service.wsdl.