Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Controllers/ServicePrototypeController.cs @ 4786

Last change on this file since 4786 was 4786, checked in by wtollsch, 13 years ago

#1198 Membership get user password as plain text

File size: 3.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.Diagnostics;
7using System.ServiceModel.Security;
8using System.Web.Security;
9
10namespace HLWebPluginHost.Controllers
11{
12    public class ServicePrototypeController : Controller
13    {
14        //
15        // GET: /ServicePrototype/
16
17        public ActionResult Index()
18        {
19
20            OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient();
21            sc.ClientCredentials.UserName.UserName = Membership.GetUser().UserName;
22            sc.ClientCredentials.UserName.Password = Membership.GetUser().GetPassword();
23            sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
24            //read algorithm class entries
25            Debug.WriteLine("algorithm class entries");
26            OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses();
27            foreach (OKBService.AlgorithmClass i in ac) {
28                Debug.WriteLine(i.Name);
29            }
30
31            //read problem class entries
32            Debug.WriteLine("problem class entries");
33            OKBService.ProblemClass[] pc = sc.GetProblemClasses();
34            foreach (OKBService.ProblemClass i in pc) {
35                Debug.WriteLine(i.Name);
36            }
37            sc.Close();
38            return View();
39        }
40
41        //
42        // GET: /ServicePrototype/Details/5
43
44        public ActionResult Details(int id)
45        {
46            return View();
47        }
48
49        //
50        // GET: /ServicePrototype/Create
51
52        public ActionResult Create()
53        {
54            return View();
55        }
56
57        //
58        // POST: /ServicePrototype/Create
59
60        [HttpPost]
61        public ActionResult Create(FormCollection collection)
62        {
63            try
64            {
65                // TODO: Add insert logic here
66
67                return RedirectToAction("Index");
68            }
69            catch
70            {
71                return View();
72            }
73        }
74       
75        //
76        // GET: /ServicePrototype/Edit/5
77 
78        public ActionResult Edit(int id)
79        {
80            return View();
81        }
82
83        //
84        // POST: /ServicePrototype/Edit/5
85
86        [HttpPost]
87        public ActionResult Edit(int id, FormCollection collection)
88        {
89            try
90            {
91                // TODO: Add update logic here
92 
93                return RedirectToAction("Index");
94            }
95            catch
96            {
97                return View();
98            }
99        }
100
101        //
102        // GET: /ServicePrototype/Delete/5
103 
104        public ActionResult Delete(int id)
105        {
106            return View();
107        }
108
109        //
110        // POST: /ServicePrototype/Delete/5
111
112        [HttpPost]
113        public ActionResult Delete(int id, FormCollection collection)
114        {
115            try
116            {
117                // TODO: Add delete logic here
118 
119                return RedirectToAction("Index");
120            }
121            catch
122            {
123                return View();
124            }
125        }
126    }
127}
Note: See TracBrowser for help on using the repository browser.