Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

webdev.webserver40.exe has stopped working visual studio 2010

$
0
0

Dear All

I get this error:

webdev.webserver40.exe has stopped working

when execute this code:

using System;
using System.Web;
using System.Threading;

public partial class Default8 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Thread t = new Thread(WriteY);          // Kick off a new thread
        t.Start();                               // running WriteY()

        // Simultaneously, do something on the main thread.
        for (int i = 0; i < 1000; i++) Response.Write("x");
    }

    static void WriteY()
    {
        for (int i = 0; i < 1000; i++) HttpContext.Current.Response.Write("y");
    }
}

to get the following output:

xxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...


Viewing all articles
Browse latest Browse all 3509


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>