locked
Easy and quick cookie use with automatic WCF service reference

    Question

  • I am trying to port an application to Windows Store style apps... And a lot of usefull API are missing.

    We are using the old ASMX style web service since it is more easy and fast to code using it for the kind of features we need than using the complex WCF model. Note that I don't want to code everything, using automatic reference is fine by me, I used add Service Reference to get the service added.

    So I add a Private WithEvents MyService as MyServiceClient in a Public Module and on the HubPage new I would have (before) used MyService.CookieContainer = Cookies to pass my global CookieContainer between call & service reference... So my question is HOW can I add it that simple, one code line is enough for me. And also I want to make all my call synchronously, since the application will be local to the server a 0.1sec delay is nothing to worry about. And since all call are limited to simple answer for example I used before one service only for logon purpose, another for product information and another for order processing and all these service must be able to use cookie as I use ASP.Net session for security. So how do I do it with that unnecessary complex way of working ? Waste hours coding something I once did in seconds ?

    Friday, October 3, 2014 8:07 PM

Answers

  • Hi ClementM,

    So my question is HOW can I add it that simple, one code line is enough for me.

    ->Take a look if the similar thread can help you: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/14a76c56-d799-4892-b2d5-d0ce7fbd4772/wcf-authentication-service-use-cookiecontainer-in-metro-style-apps?forum=winappswithcsharp

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ClementM Thursday, October 23, 2014 2:25 AM
    Monday, October 6, 2014 10:28 AM
    Moderator
  • Indeed, some VB.NET samples are on the way, but I don't know when they will be ready, however you could suggest Microsoft via: https://wpdev.uservoice.com/forums/110705-dev-platform

    Here we try to collect some suggestions and step by step make them available :)

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ClementM Thursday, October 23, 2014 2:13 AM
    Wednesday, October 22, 2014 8:53 AM
    Moderator

All replies

  • Hi ClementM,

    So my question is HOW can I add it that simple, one code line is enough for me.

    ->Take a look if the similar thread can help you: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/14a76c56-d799-4892-b2d5-d0ce7fbd4772/wcf-authentication-service-use-cookiecontainer-in-metro-style-apps?forum=winappswithcsharp

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ClementM Thursday, October 23, 2014 2:25 AM
    Monday, October 6, 2014 10:28 AM
    Moderator
  • Complained for nothing... Just added all functions to the same ASMX Web Services so the WCF, since WCF holds the cookie it is almost better this way... Anyway, was rushed to port a old app to WinRT in less than 6 days, WinRT documentation lack VB.Net examples (download size for the examples: C# 300Mb+ VB 9Mb)

    You should add more examples, still hates the way controls work with the MVVM but found a way to kind of bypass the MVVM since all my data are heterogeneous (at the control level) and requires constant manipulation.

    Tuesday, October 7, 2014 9:25 PM
  • Indeed, some VB.NET samples are on the way, but I don't know when they will be ready, however you could suggest Microsoft via: https://wpdev.uservoice.com/forums/110705-dev-platform

    Here we try to collect some suggestions and step by step make them available :)

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ClementM Thursday, October 23, 2014 2:13 AM
    Wednesday, October 22, 2014 8:53 AM
    Moderator