Hi,
I'm trying to launch my ClickOnce application using C# code with HttpWebRequest class. The application can be deployed fine using IE. But when doing the deployment with my code, it seems only the .application file is downloaded to client.
My code is as below.
HttpWebRequest getRequest = (HttpWebRequest)WebRequest.Create("http://localhost/test/test.application");
getRequest.Method = "GET";
getRequest.Timeout = 500000; //default is 100 seconds
HttpWebResponse getResponse = (HttpWebResponse)getRequest.GetResponse();
string loginUrl = getResponse.ResponseUri.AbsoluteUri;
StreamReader responseReader = new StreamReader(getResponse.GetResponseStream());
string responseData = responseReader.ReadToEnd();
responseReader.Close();
Is there anything I'm doing wrong with my code?
Thanks! - Bruce