Click here to Skip to main content
15,889,867 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionbus reservation - creating dynamic layout for bus seat structur. Pin
Dnyaneshwar@Pune22-Jan-14 21:50
Dnyaneshwar@Pune22-Jan-14 21:50 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
thatraja22-Jan-14 23:00
professionalthatraja22-Jan-14 23:00 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
Shameel22-Jan-14 23:30
professionalShameel22-Jan-14 23:30 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
Bernhard Hiller23-Jan-14 22:14
Bernhard Hiller23-Jan-14 22:14 
AnswerRe: bus reservation - creating dynamic layout for bus seat structur. Pin
Ashok Natarajan28-Jan-14 0:39
professionalAshok Natarajan28-Jan-14 0:39 
QuestionRegarding web hosting Pin
Member 1025895222-Jan-14 21:10
Member 1025895222-Jan-14 21:10 
QuestionWCF in ASP.NET with authentication Pin
JD8622-Jan-14 15:32
JD8622-Jan-14 15:32 
AnswerRe: WCF in ASP.NET with authentication Pin
JD8622-Jan-14 15:59
JD8622-Jan-14 15:59 
Here is what i'm trying to do but having issues getting it to work since SecureAuthHeader is always null:

C#
[DataContract]
    public class SecureAuthHeader
    {
        [DataMember]
        public string UserKey { get; set; }

        [DataMember]
        public string UserSecret { get; set; }
    }

    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
    public class CPApi : ICPApi
    {
        public SecureAuthHeader Authentication;

        public void SetAuthentication(string _userkey, string _usersecret)
        {
            Authentication = new SecureAuthHeader();
            Authentication.UserKey = _userkey;
            Authentication.UserSecret = _usersecret;
        }
                
        public List<UserObject> GetAllUsers()
        {
            string companyCode = IsAuthenticated;


            // MORE HERE
        }

        private string IsAuthenticated
        {
            get
            {
                if (Authentication == null)
                    throw new FaultException("You must authenticate first.");

                try
                {
                    DataTable ds = SqlLibrary.ReadSql("SELECT CompanyID FROM ApiAccess WHERE CustomerKey=@CustomerKey AND CustomerSecret=@CustomerSecret",
                        new SqlParameter[] { new SqlParameter("CustomerKey", Authentication.UserKey), new SqlParameter("CustomerSecret", Authentication.UserSecret) });

                    if (ds == null || ds.Rows.Count == 0)
                        throw new FaultException("Invalid authentication.");

                    return ds.Rows[0]["CompanyID"].ToString();
                }
                catch (Exception ex)
                {
                    throw new FaultException(ex.Message);
                }
            }
        }

QuestionLinux clients and ASP .NET on a Windows Server Pin
MikeAngel22-Jan-14 12:28
MikeAngel22-Jan-14 12:28 
AnswerRe: Linux clients and ASP .NET on a Windows Server Pin
Richard Deeming23-Jan-14 1:43
mveRichard Deeming23-Jan-14 1:43 
GeneralRe: Linux clients and ASP .NET on a Windows Server Pin
MikeAngel23-Jan-14 9:05
MikeAngel23-Jan-14 9:05 
Questionquestions of .net Pin
Member 1054081921-Jan-14 22:37
Member 1054081921-Jan-14 22:37 
AnswerRe: questions of .net Pin
Shameel21-Jan-14 22:52
professionalShameel21-Jan-14 22:52 
SuggestionRe: questions of .net Pin
Richard Deeming22-Jan-14 1:40
mveRichard Deeming22-Jan-14 1:40 
QuestionOpen source 3D scatter chart controls available in ASP.Net Pin
Kandepu Rajesh21-Jan-14 20:13
Kandepu Rajesh21-Jan-14 20:13 
QuestionRe: Open source 3D scatter chart controls available in ASP.Net Pin
thatraja21-Jan-14 20:35
professionalthatraja21-Jan-14 20:35 
QuestionHelp Me with the Code Pin
ArjanD21-Jan-14 8:29
ArjanD21-Jan-14 8:29 
AnswerRe: Help Me with the Code Pin
thatraja21-Jan-14 16:10
professionalthatraja21-Jan-14 16:10 
Suggestionneed the suggestion Pin
mprk20-Jan-14 0:13
mprk20-Jan-14 0:13 
AnswerRe: need the suggestion Pin
ZurdoDev21-Jan-14 5:11
professionalZurdoDev21-Jan-14 5:11 
QuestionHow to show an aspx page like a dialog Pin
Saeed Ansarinejad19-Jan-14 6:18
Saeed Ansarinejad19-Jan-14 6:18 
AnswerRe: How to show an aspx page like a dialog Pin
Abhinav S19-Jan-14 7:05
Abhinav S19-Jan-14 7:05 
AnswerRe: How to show an aspx page like a dialog Pin
Kornfeld Eliyahu Peter19-Jan-14 7:52
professionalKornfeld Eliyahu Peter19-Jan-14 7:52 
GeneralRe: How to show an aspx page like a dialog Pin
Saeed Ansarinejad19-Jan-14 9:42
Saeed Ansarinejad19-Jan-14 9:42 
GeneralRe: How to show an aspx page like a dialog Pin
Kornfeld Eliyahu Peter19-Jan-14 20:35
professionalKornfeld Eliyahu Peter19-Jan-14 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.