开发者

InvokeOperation<bool> value always false

Quick question about the InvokeOperation, so from my view model i have this...

private void IsValidNumber(string value)  
{  
    _context.NumberIsValid(value, ValidNumberCallback, null);  
}   
private void ValidNumberCallback(InvokeOperation<bool> obj)  
{  
    var test = obj.Value; //ALWAYS FAL开发者_JAVA百科SE????  
}  

and in my domainSerice class i have this.

[Invoke]  
public bool NumberIsValid(string number)  
{  
    return true;  
}

and the call back value is always false??? what am I missing???

any help or pointers would be greatly appreciated


You should check for HasError property.

If for any reason connection to your http server fails, method callback will be called but with HasError as true and you will get details of the error in Error object.


welp... I decided to just hurry and build a simple test site and it works just peachy... I think it might have to do with something in my webconfig... if I ever find the real issue I'll update this.

        <compilation debug="true" targetFramework="4.0">
        <assemblies>
            <remove assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies>
    </compilation>

the assemblies seems to have been the issue, I removed that section and it started working again... why?? no clue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜