Solved

Verifying uploaded document made the trip

Posted on 2013-05-29
1
233 Views
Last Modified: 2013-05-29
Environment:
Dot net web service
C# win form client

Experts,

I've got a windows app that allows users to save .pdf files and then upload them to a web service. How can I verify the document successfully uploaded? I've got control over the client and the web service.

Thanks!
0
Comment
Question by:lateapex
1 Comment
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 500 total points
Comment Utility
The service can return a true or false when it's done with the file saving.  

(pseudo code only)
<webMethod()>
public string SaveFile(byte[] filestream)
try
{
  savefile(filestream);
  return "true";
}
catch (Exception ex)
 {
   return ex.Message;
}  


anything other than "true" would be an error.

If you want double verification, just create a check method:

Client: ValidateFlie(filename);

Server:
public bool ValidateFile(string filename)
{
 string path = "c:\";
 if (System.IO.Exists(path + filename)
  return true;
 
return false;
}
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now