.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Reload custom Persistence Service and UI Binding

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :WPF


I want to make kind of persistence service in state machine wf, 

and I have some open questions.

1. Is there any way to implement my own persistence without inheriting from PersistenceService? I can call the Save method to serialize the workflow,

but how can I reload it into instance and run it?

2. Is there any way to mange when the persistence is happened?

i only want to explicitly persist data from my workflow.

3. what is the best way to bind state machine workflow to the UI?





View Complete Post

More Related Resource Links

silverlight + WCF Service + Dynamic proxy(custom binding) + basic authentication on iis

hi all, I am having an issue with how to get windows identity in silverlight project. Below is my scenario: the silverlight application need to get data from server via WCF service, i used the way that built dynamic proxy at runtime and aslo used custombinding in this case. Now my application need to deploy on iis and chosen "basic authentication" as a authentication mode. Thus i have chosen authentication mode in WCF was " <security authenticationMode="UserNameOverTransport">". At the client side where kind of project is silverlight that i need have to dynamic proxy with custombinding. My question is: In basic authentication how can i get windows identity to set to chanelfactory.Credentials: _channelFactory = new ChannelFactory<TWebService>(this._binding, new EndpointAddress(_endpointAddress));            _channelFactory.Credentials.UserName = new UserNamePasswordClientCredential();            _channelFactory.Credentials.UserName.UserName = "username";            _channelFactory.Credentials.UserName.Password = "password"; actually, i do not want to use Windows a

Geneva Framework: Building A Custom Security Token Service


A Security Token Service, or STS, acts as a security gateway to authenticate callers and issue security tokens carrying claims that describe the caller. See how you can build a custom STS with the "Geneva" Framework.

Michele Leroux Bustamante

MSDN Magazine January 2009

Service Station: Extending WCF with Custom Behaviors


WCF extensibility points allow you to customize the process by which messages are translated, formatted, and sent over the wire for more customized services.

Aaron Skonnard

MSDN Magazine December 2007

Extend ASP.NET: Simplify Data Binding In ASP.NET 2.0 With Our Custom Control


The wwDataBinder control addresses simple control data binding--binding simple form controls like textboxes, checkboxes, and the selected values of list controls to individual data or object values.

Rick Strahl

MSDN Magazine December 2006

Data Binding: Give Your Everyday Custom Collections a Design-Time Makeover


In this article, Paul Ballard shows how you can provide data binding support for your custom collections to enable sorting, searching, and editing in as simple a manner as possible. In addition, he shows how to make all of these features available in the Windows and Web Forms Designers, just like an ADO.NET DataSet.

Paul Ballard

MSDN Magazine August 2005

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

Video: SharePoint 2010: Creating Custom Service Applications

Do you need more than the services provided by SharePoint? In this advanced session targeted at high-end developers, you will learn how to create a custom SharePoint service. (Length: 36:31)

Error Consuming Web Service - Unable to import binding xxx from namespace ...


In VS2008 / C# / ASP.NET 3.5, I wrote a test web service app. Here is an extract from the code:

namespace emed.MathWebService
    /// <summary>
    /// Sample Math Services For Learning Web Services Deployment
    /// </summary>
    [WebService(Namespace = " http://localhost/MathService")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class MathService
        public float Add(float a, float b)
            return a + b;


I have published this to an IIS virtual directory named MathService, and when I try to launch it with the URL http://localhost/mathservice/MathService.asmx is works fine and displays all the operations (Add, Subtract etc) in the service.

I then created a test web application in VS2008 (named WebSvcTe

Custom binding and interoperability.

Hi everyone, I have to build a wcf client to communicate with a JAVA web service. The configuration of that web service is not standard and I'm trying to use a custom binding. I have to generate a SOAP message with a Binary Security Token section and a username section in the SOAP header. I have to sign the username token with my X509 certificate and add the digest to the message. I must sign the body too and again add the digest to the message. The service is under an https transport (https://...). Below I attach a correct example of a message that I have to produce: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">     <soap:Header>         <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"                        soap:mustUnderstand="1">             <wsse:BinarySecurityToken                     xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"        &

How to set and map a Method in the Service file with endpoint elements and binding elements

Hi all, I have created a service file like OSService.svc in that i have two methods like one is FileUpload and FileDownload for e.g :- [WebInvoke(UriTemplate = "/fileupload/{fileName}" , Method = "POST" )]         [OperationContract]         void FileUpload(string fileName, Stream fileContents); same as Filedownload also. People you may know these methods are inside the interface of service file what you are using i'e i have created a interface as IOSService.cs. So, what i need now is i want to write separate endpoint for FileUpload and Filedownload.Because i want to set separate value for receiveTimeout  and openTimeout for the Fileupload and FileDownload process in binding section in the web.config file itself. The below code was i'm using right now but still i'm not able to the set separate value of endpoint elements in the bindings. EndPoint Section:- <endpoint name = "endPoint1"  address  = "localhost:8000/OSService.svc/" bindingConfiguration = "TransactionalTCP"   binding  = "netTcpBinding"          contract = "IOSService"/> Binding Section:-  <binding name = "TransactionalTCP"  transactionFlow = "true"   /&

Custom WCF Service (svc) gives address scheme error

Hi, I'm reading a book by Sahil Malik on building solutions for SharePoint 2010 (from Apress). One of the items explained is how to create a custom WCF service that can then be consumed in different scenarios (.NET app, silverlight, javascript). I followed the steps as given in the book, but when I try to open the URL to the service, I get this error: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. Parameter name: item I have to mention that when I added the mapped ISAPI folder to my VS project, it didn't create the project subfolder automatically and I accidently created my files (svc and web.config) on the root level of the ISAPI folder. I created the subfolder manually and moved these two files in the subfolder, but it doesn't seem to work. Maybe I overwrote something on the root of ISAPI ? My web.config contains this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <bindings> <basicHttpBinding> <binding name="customBasicHttpBinding"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Ntlm" /> </security&g

Client and service binding mismatch?

I have a WCF web service that when I call I get an exception: Content Type text/xml; charset=utf-8 was sent to a service expecting application/soap+xml; charset=utf-8.  The client and service bindings may be mismatched. It seems that only difference is text/xml needs to be changed to 'application/soap+xml'. Any ideas on how to fix this? The service is self-hosted (console host). The service reference was generated from this service without a problem. Thank you. Kevin

Permissions issue for custom web service in the _vti_bin folder.

Hello, I have created a custom ASMX webservice that returns in JSON format so that I can call the data from JQuery on SharePoint page content.  I placed it in the ISAPI (_vti_bin) folder and it works just fine when I go directly to the web service and call it the way JQuery calls it: /_vti_bin/ServiceabilityCheck.asmx/GetSystemIDByZIPCode?ipaddress= Which returns: <string>{"SystemID":"5"}</string> When I try to call it from the SharePoint site with JQuery, it errors out and gives an unspecified error.  Fiddler shows {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"} as the response from the web service call. When I have the webservice on an IIS web app outside of SharePoint, it works fine.  I have anonymous access enabled on the SharePoint site, why would it give me this error?John Chapman | Blog: http://www.johnchapman.name

Secure Service Store and custom web application.

 Hello All,  I have a problem for which I would like to use the Secure Service Store.  I've searched for similar solutions involving the SSS but I've not had any success yet.  Maybe I'm missing something obvious or going about it the wrong way.   We have an external application (actually, a number of external applications) we'd like to embed in our SharePoint site using an iframe or the Page Viewer web part.  The embedded application uses a custom forms based authentication scheme and I want to prevent the situation where a user has to log into our application then log into the embedded application.  Is there anything available the help post the credentials from SSS to the custom application?  The only think I can think to do is write some code that mimics a post to the login page of the embedded app and, if needed, write a stripped down or simpler login page for the embedded app to make that easier.  For my immediate task I have quite a bit of control over the source of both application and could write custom code on both sides if I had to, but I'd rather have a solution that only involve configuration or, at most, custom code on the SharePoint side.  Thanks,  Brandon 

Custom markup extension or custom binding class?

Hey experts! I'm doing a project where I've encountered an issue I'd love some feedback on. I've created a custom Markup Extension called MyMarkupExtension, with two properties.  I can use it like below: <cc:DialogBorder Title="{local:MyMarkupExtension MyProperty='property value goes here', AnotherProperty='and another value here'}"> It works, and in 99% of the cases, it fits my needs perfectly.  In 1% of the cases, the values of MyProperty and AnotherProperty can not be set at design time, so I'd need some binding there. <cc:DialogBorder Title="{local:MyMarkupExtension MyProperty={Binding Path='SomePropertyOfTheViewModel'}, AnotherProperty='and another value here'}"> This presents my two questions (yes I did make only one post for 2 questions, bad karma...): 1. the binding inside my markup is not legal, after all, a binding can only be set on a DependencyProperty.  Is there any workaround which I could use for this problem at hand? In case there isnt... 2. I'm thinking about dropping the markup extension and creating a custom binding instead.  For this, I'd have to inherit from bindingbase, and so far I've read online that's one ____ of a nightmare.  Does anyone have some good code / examples on where to start? "The improbable we do, the impossible just takes

Binding Web Service Result in asp:gridview and enable sorting(paiging)

Hello everyoneI have web service and gridviewI'm binding it without problemcode: protected void Page_Load(object sender, EventArgs e) { GetCallsService wservice = new GetCallsService(); List<Call> list = wservice.getCalls(2); GridView1.DataSource = list; //GridView1.AllowSorting = true; GridView1.DataBind(); } But I want to enable sorting and(or) paging.   GridView1.AllowSorting = true; this doen't solves problem.everything worls fine if I'm usign sqlDatasource but when datasource is web service it doesn't wokdoes enyone know solution?

Custom webpart displaying Reports from Reporting service

Hi          I created a report in VS 2008 and deployed to reporting service. Then when I access this report through a custom webpart some of the cell borders are getting disappeared from inside the table control. Even the cell is not getting misaligned within the cell. But the same report when I retrieve through ReportViewer builtin webpart. Its displaying without any issues. How do I fix such issues?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend