Current filter:
                                You should refresh the page.
                                Support Center
                                0

                                  • hi,we are try to use your devexpress MVC project template to create a web API project.

                                    1. for example I have a webapi : http://localhost/api/product.

                                    2. I have a devexxpress windows control C# client to consume this webapi.something like that to get whole list of product.

                                    // List all products.
                                    HttpResponseMessage response = client.GetAsync("api/products").Result;
                                    if (response.IsSuccessStatusCode)
                                    {

                                    var products = response.Content.ReadAsAsync<IEnumerable<Product>>().Result;
                                    foreach (var p in products)
                                    {
                                    Console.WriteLine("{0}\t{1};\t{2}", p.Name, p.Price, p.Category);
                                    }
                                    }
                                    else
                                    {
                                    Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
                                    }

                                    my question is how to pass username and password from C# client to devexpress 's web api?

                                    what I want is when C# client to get whole product list from webapi.client will send username password to server's api. if server's webapi check whether it is authorized user, if not dont let it get product list


                                • Hi,

                                  We need some additional time to process this ticket. We will update the ticket once we have results to report.

                                • Anthony (DevExpress Support) 04.10.2013

                                  Hello,

                                  I'm afraid that I don't understand your issue. From what I gather, it is necessary to show information for authorized users only.
                                  In this case, use the standard MVC membership login mechanism. You can see this mechanism in action by creating a new project using either our or standard MVC Web Application template.

                                You must  log in  or  register  to leave comments

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners