Click here to Skip to main content
15,917,702 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to create connection pool in asp.net? Pin
Brijesh Kumar Prajapati24-Jan-14 2:35
Brijesh Kumar Prajapati24-Jan-14 2:35 
AnswerRe: How to create connection pool in asp.net? Pin
Peter Leow24-Jan-14 3:19
professionalPeter Leow24-Jan-14 3:19 
QuestionHow to Show Multi Color Text Box In Asp .net Pin
rajaraman 00724-Jan-14 0:26
rajaraman 00724-Jan-14 0:26 
AnswerRe: How to Show Multi Color Text Box In Asp .net Pin
Ashok Natarajan27-Jan-14 23:03
professionalAshok Natarajan27-Jan-14 23:03 
QuestionError: 404 for webservice in mvc3 website Pin
rohan tangade23-Jan-14 20:10
rohan tangade23-Jan-14 20:10 
QuestionHow to send sms via asp.net(c#)? Pin
Sharath Surendran23-Jan-14 15:34
Sharath Surendran23-Jan-14 15:34 
QuestionRealtime event notification in ASP.NET NVC 4 and C# Pin
Member 1053535323-Jan-14 5:51
Member 1053535323-Jan-14 5:51 
AnswerRe: Realtime event notification in ASP.NET NVC 4 and C# Pin
Richard Deeming23-Jan-14 7:13
mveRichard Deeming23-Jan-14 7:13 
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 

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.