abhij1987's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
32 (0.02 per day)
Joined:
04-May 09
Profile Views:
3,847
Last Active:
User is offline Feb 08 2013 05:17 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0

Latest Visitors

Icon   abhij1987 has not set their status

Posts I've Made

  1. In Topic: how to fetch http response status code for web service ?

    Posted 2 Nov 2012

    Hi,

    I have written following code.
    I have created proxy class using svcutil.exe which contains ServiceClient class.
    I have written timer and set 1 minute interval.
    What is remaing--> i need to find out web service response, i can not change web service, but from application i need to find out http response status of web service.
    main goal of this application is to find out web service is running or not.

    protected void Timer1_Tick(object sender, EventArgs e)
        {
    
            DateTime starttime,Endtime;
            starttime = DateTime.Now;
            Nullable<DateTime> response = null;
            bool  result=false;
            try
            {
                
                ServiceClient ob1 = new ServiceClient();
                response=ob1.GetStatus("para1");
              
                Endtime = DateTime.Now;
                insertintoDB(starttime, Endtime, response.ToString());
            }
            catch (Exception ex)
            {
                string response1;
                 Endtime = DateTime.Now;
                 response1 = " Message:-"+ ex.Message.ToString() + " StackTrace:- " + ex.StackTrace + " InnerException:-" + ex.InnerException + " Source:-" + ex.Source;
                 insertintoDB(starttime, Endtime, response1);
            }
        }
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

abhij1987 hasn't added any friends yet.

Comments

abhij1987 has no profile comments yet. Why not say hello?