w3wp.exe process crashing.

Discussion in 'ASP .Net Web Services' started by msnews.microsoft.com, Dec 20, 2005.

  1. Hi all,

    I have a problem which I've seen mentioned quite a few time around the net,
    but nothing seems to work.

    I've created a web service with one method (see code below). It's running
    under IIS set to Windows Authentication. Calling the web service from a
    client application or the browser works fine. The problem is that every few
    minutes, I receive a "Memory cannot be written" error from w3wp.exe and the
    web services dies. I then must proceed to shutting down visual studio,
    empty the aspnet temporary files and restart IIS in order for the web
    service to come back online. Otherwise I get a stupid "Mutex cannot be
    created" error each time I try to connect to my web service. The crash
    doesn't happen when I actually call on the web service, but rather several
    minues after i leave my service.asmx website.

    Why on earth does w3wp.exe crash?


    /// ****************** CODE
    [WebMethod]
    public string MyMethod()
    {
    if (!(this.User.Identity is System.Security.Principal.WindowsIdentity))
    {
    return null;
    }

    System.Security.Principal.WindowsIdentity user = this.User.Identity as
    System.Security.Principal.WindowsIdentity;


    if (!user.IsAuthenticated || user.IsAnonymous)
    {
    return null;
    }

    return "Req User SID: " + user.Name;
    }
    /// ******************* CODE
    msnews.microsoft.com, Dec 20, 2005
    #1
    1. Advertising

  2. One more piece of information: As soon as I start getting the "Mutex cannot
    be created" error, I usually call 'iisreset' to reset IIS and then I receive
    the "Memory cannot be read" error from w3wp.exe again.

    "msnews.microsoft.com" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a problem which I've seen mentioned quite a few time around the
    > net, but nothing seems to work.
    >
    > I've created a web service with one method (see code below). It's running
    > under IIS set to Windows Authentication. Calling the web service from a
    > client application or the browser works fine. The problem is that every
    > few minutes, I receive a "Memory cannot be written" error from w3wp.exe
    > and the web services dies. I then must proceed to shutting down visual
    > studio, empty the aspnet temporary files and restart IIS in order for the
    > web service to come back online. Otherwise I get a stupid "Mutex cannot
    > be created" error each time I try to connect to my web service. The crash
    > doesn't happen when I actually call on the web service, but rather several
    > minues after i leave my service.asmx website.
    >
    > Why on earth does w3wp.exe crash?
    >
    >
    > /// ****************** CODE
    > [WebMethod]
    > public string MyMethod()
    > {
    > if (!(this.User.Identity is System.Security.Principal.WindowsIdentity))
    > {
    > return null;
    > }
    >
    > System.Security.Principal.WindowsIdentity user = this.User.Identity as
    > System.Security.Principal.WindowsIdentity;
    >
    >
    > if (!user.IsAuthenticated || user.IsAnonymous)
    > {
    > return null;
    > }
    >
    > return "Req User SID: " + user.Name;
    > }
    > /// ******************* CODE
    >
    msnews.microsoft.com, Dec 20, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. matt
    Replies:
    1
    Views:
    9,682
    =?Utf-8?B?cm9iX2Jvc3Rvbg==?=
    Apr 6, 2004
  2. z. f.
    Replies:
    15
    Views:
    4,549
    z. f.
    Dec 2, 2004
  3. Replies:
    10
    Views:
    7,687
    warappa
    Aug 11, 2010
  4. msnews.microsoft.com

    w3wp.exe process crashing.

    msnews.microsoft.com, Dec 20, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,213
    msnews.microsoft.com
    Dec 20, 2005
  5. msnews.microsoft.com

    w3wp.exe process crashing.

    msnews.microsoft.com, Dec 20, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    164
    msnews.microsoft.com
    Dec 20, 2005
Loading...

Share This Page