How to Call WebReqeuest.Create on a Webservice
===

Hi guys i have this code to be created  as a  web service, the problem is with WebRequest.Create, it seems that a web service doesn't  have a create method, what can I do as a workaround? thanks.

    
        [WebMethod]
        public string WebReq(string url,int timeout)
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)
                WebRequest.Create(url);
                request.Proxy = new System.Net.WebProxy("10.80.50.60:8080", true);
                request.Timeout = timeout;
                //request.Proxy.Credentials = CredentialCache.DefaultCredentials;
                // execute the request
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                return response.StatusCode.ToString();
               
            }
            catch (WebException ex)
            {
                return (((HttpWebResponse)ex.Response).StatusCode).ToString();
                
            }
        }
