Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Update....I replicated the basic code, no database, simple and it seems to work fine, so I suspect there is another reason, I will rest on it over the weekend....</p> <p>Here is the replicated server code -</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.IO; namespace TestWS { /// &lt;summary&gt; /// Summary description for Service1 /// &lt;/summary&gt; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Service1 : System.Web.Services.WebService { private string GetFileName () { if (File.Exists("index.dat")) { using (StreamReader lReader = new StreamReader("index.dat")) { return lReader.ReadLine(); } } else { using (StreamWriter lWriter = new StreamWriter("index.dat")) { string lFileName = Path.GetRandomFileName(); lWriter.Write(lFileName); return lFileName; } } } [WebMethod] public string WriteChunk(byte[] aData) { Directory.SetCurrentDirectory(Server.MapPath("Data")); DateTime lStart = DateTime.Now; using (FileStream lStream = new FileStream(GetFileName(), FileMode.Append)) { BinaryWriter lWriter = new BinaryWriter(lStream); lWriter.Write(aData); } DateTime lEnd = DateTime.Now; return lEnd.Subtract(lStart).TotalMilliseconds.ToString(); } } </code></pre> <p>}</p> <p>And the replicated client code -</p> <pre><code> static void Main(string[] args) { Service1 s = new Service1(); byte[] b = new byte[1024 * 512]; for ( int i = 0 ; i &lt; 160 ; i ++ ) { Console.WriteLine(s.WriteChunk(b)); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload