Results 1 to 6 of 6

Thread: WPF + MVC sharing same assemblies

  1. #1

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    WPF + MVC sharing same assemblies

    I got a solution with several projects (domain model, data access using EF, service implementations, etc) and consume these in a MVC project.

    The authentication/authorization project uses forms authentication.

    I need (it's a test kind of) to add a WPF project (hardly ever used it, plan to figure out the basics as I go along) that does the same thing as the web (mvc) app and use the same services, etc.

    Will I be able to use th forms authentication service in the WPF project, or what? ( I hardly can recall a thing since I last did desktop apps).


  2. #2

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Re: WPF + MVC sharing same assemblies

    Hmmm...ok, let me change the question:

    How would you normally do authentication and authorization in WPF?

    Is it possible to create something loosely coupled that can be implemented in other applications (such as asp.net / MVC)?


  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: WPF + MVC sharing same assemblies

    Quote Originally Posted by Krokonoster View Post
    Will I be able to use th forms authentication service in the WPF project, or what? ( I hardly can recall a thing since I last did desktop apps).
    The answer is yes. That model was created for ASP.NET but can work in Windows apps too. You just have to add the appropriate references and a bit of plumbing. I did this search recently:

    http://www.google.com.au/search?q=as...ient=firefox-a

    There may be similar information available for WPF or you may have to just adapt the WinForms info for WPF.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Re: WPF + MVC sharing same assemblies

    Thanks for the good news. At least know now I won't be wasting my time going that direction.


  5. #5
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: WPF + MVC sharing same assemblies

    WPF is "just" an other way of creating the UI of the application.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  6. #6

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Re: WPF + MVC sharing same assemblies

    of course..as long you keep your things loosely coupled.
    Just need to find out HOW to use my dll that take care of authentication in a wpf app.
    In your web app it's just a matter setting things up in your web.config. (I'm sure the answer is in a link I got with jmcilhinney's hint here)
    Last edited by Krokonoster; Feb 12th, 2011 at 10:16 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width