Hi, I have a webservice method which is going to download a file (pop up window with Open or Save the file). I notice webservice might not accept HttpContext.Current.Response?? I have below method which doesn't work for me and prompt error "System.Xml.XmlException: Data at the root level is invalid" .. .but if i created another method just return a test string value, pass to my ASPX page and print it out, it works ... :( It just doesn't print the line from the webmethod. Any idea or workaround this?
[WebMethod]
public void DownloadFile(string fileName)
{
string filepath = fileName;
FileInfo file = new FileInfo(filepath);
if (file.Exists)
{
...
Go to the complete details ...