Mega Code Archive

 
Categories / Delphi / .NET
 

Resolving Unable to attach to ASP.NET worker process (typically aspnet_wp.exe or w3wp.exe)

Title: Resolving Unable to attach to ASP.NET worker process (typically aspnet_wp.exe or w3wp.exe) Question: Some people have a problem when they try to run their first "HELLO WORD" ASP.net aplication. They receive the message Unable to attach to ASP.NET worker process (typically aspnet_wp.exe or w3wp.exe) Answer: There are a lot of comments about this problem in Internet, but I didn't found a real solution to my own. I think that it is a user security and registry ASP.net problem, not related directly to Delphi 8, really is an ASP.net problem and the solution is to run the next file comand. Copy this secuence of commands in a file. For example "fixup.cmd" and execute it. REM This is the begin of the file REM "Changing to the Framework install directory" cd /d %SystemRoot%\microsoft.net\framework\v1.1.4322 echo "Stopping IIS" iisreset /stop echo "----------------------" echo "Stopping the ASP.NET state service if it is running" net stop aspnet_state echo "----------------------" echo "Deleting the ASPNET account" net user ASPNET /delete echo "----------------------" echo "Creating a new ASPNET account with a temporary password" net user ASPNET 1pass@word /add echo "----------------------" echo "Launching runas to create a profile" echo "You will see a command window being created" echo "type 1pass@word when prompted for the temporary password" runas /profile /user:ASPNET cmd.exe echo "----------------------" echo "Re-registering ASP.NET and the ASPNET account" aspnet_regiis -i echo "A new random password has been autocreated for the ASPNET account" echo "----------------------" echo "Restarting IIS" iisreset /start echo "----------------------" echo "The workaround has been applied" echo "Please try accessing an ASP.NET page" echo "If you have any custom access controls settings for the ASPNET account," echo "you will need to recreate them" echo "If you were running the ASP.NET state service, you'll need to restart it" REM This is the end of the file