Decrease Font Size
Increase Font Size
   BLOG

Could not find stored procedure sp_help_jobhistory

by bryian 27. October 2009 18:36

Could not find stored procedure 'sp_help_jobhistory'.


sp_help_jobhistory stored procedure provides information about the cause of a job failure. If we try


EXEC sp_help_jobhistory

we will see the below error

Msg 2812, Level 16, State 62, Line 1 Could not find stored procedure 'sp_help_jobhistory'.

because the sp is resided in the MSDB database.
The solution is: EXEC msdb..sp_help_jobhistory

The remote server returned an error NotFound

by bryian 22. October 2009 17:24

The remote server returned an error: NotFound the remote server returned an error not found silverlight Silverlight Webservice "The remote server returned an error: NotFound"


I was working on a Silverlight application with WCF services and stuck with some error like below:

-		
[System.ServiceModel.CommunicationException]	
{System.ServiceModel.CommunicationException: 
The remote server returned an error: NotFound. ---> System.Net.WebException: 
The remote server returned an error: NotFound. ---> System.Net.WebException: 
The remote server returned an error: NotFound.
  ...

As you can see, the error " The remote server returned an error: NotFound" really doesn't provide us much information on how to debug the problem. After doing some research on Google, I found the solution at the Silverlight forum My favorite is to enable tracing in the WCF service and Firebug from Firefox. You can also try to debug it with fiddler. Whenever there are errors, I will look into the log file to get the full details of the error message and debug the problem.

<system.serviceModel>
…
</system.serviceModel>

<system.diagnostics>
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "c:\log\wcfProject1Tracess.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

 

Linq convert double to string

by bryian 21. October 2009 19:33

Linq converting double to string


I'm new to Linq. I was working on one of the application and have to convert type double to string. I did some research on Goggle but can't find any good example. If you are looking for a sample code on how to convert double to string in Linq, please see below.

NumberFormatInfo provider = new NumberFormatInfo();

var listItems = from i in db.SomeTable
                   select Convert.ToString(i.colDouble, provider);

Cross-domain policy problem with ASP.NET SilverLight WCF service

by bryian 19. October 2009 19:45