2009-04-30 3 views
2

Ich habe einfach einen WCF-Dienst erstellt, der "hello world" druckt. einen sequenziellen Konsolenworkflow erstellt und dem Workflow eine Sendeaktivität und Codeaktivität hinzugefügt. bezog sich hier auf den Service. konfigurierte die Sendeaktivität. erstellte Abhängigkeitseigenschaft für Rückgabewert.Eingabe-String war nicht in einem korrekten Format

jetzt, wenn ich die App ausführen. es wirft ein Format Ausnahme in program.cs Datei auf der Linie

WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(Using_SendActivity.Workflow1)); 

Wo ich falsch gemacht habe?

System.FormatException was unhandled 
    Message="Input string was not in a correct format." 
    Source="mscorlib" 
    StackTrace: 
     at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) 
     at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) 
     at System.Int32.Parse(String s, IFormatProvider provider) 
     at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp) 
     at System.Diagnostics.PerformanceCounterLib.get_NameTable() 
     at System.Diagnostics.PerformanceCounterLib.get_CategoryTable() 
     at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category) 
     at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName) 
     at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName) 
     at System.Workflow.Runtime.PerformanceCounterManager.SetInstanceName(String instanceName) 
     at System.Workflow.Runtime.WorkflowRuntime.StartRuntime() 
     at System.Workflow.Runtime.WorkflowRuntime.InternalCreateWorkflow(CreationContext context, Guid instanceId) 
     at System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(Type workflowType) 
     at Using_SendActivity.Program.Main(String[] args) in C:\Documents and Settings\as73043\My Documents\Visual Studio 2008\Projects\Using SendActivity\Using SendActivity\Program.cs:line 28 
    InnerException: 

wcf Datei ich verwende:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Runtime.Serialization; 
using System.ServiceModel; 
using System.Text; 

namespace WcfServiceForSendActivity 
{ 
    // NOTE: If you change the class name "Service1" here, you must also update the reference to "Service1" in App.config. 
    public class Service1 : IService1 
    { 
     #region IMyService Members 

     public string GetResponse() 
     { 
      return string.Format("Hello World !!!"); 
     } 

     #endregion 

    } 
} 
+0

Was haben Sie falsch gemacht ist, dass Sie die vollständige Ausnahme zu schreiben haben es versäumt, einschließlich der Stack-Trace und alle inneren Ausnahmen. Tun Sie das und Sie haben eine Chance, dass Ihre Frage beantwortet wird. Sie müssen möglicherweise sogar etwas Code posten. –

Antwort

1

auf Win7 run 'lodctr/R' von einer erhöhten Eingabeaufforderung, und starten Sie perf Zähler neu zu laden.

Diese KB enthält mehr Details für ältere Betriebssysteme. http://support.microsoft.com/kb/300956

Verwandte Themen