I made a SQL error that locked up my database for my web application. I killed the session buy recycling iis , but now I can't publish to webdeploy. Would Recycling the application Would Recycling the application have stopped or affected the webdeploy service as well? I already restarted the webdeploy service to no avail. Error occurs when trying to save save packaged deployment 2 the webdeploy directory. Any thoughts?
Apparently it was not the recycle that caused the service to stop
Related
I have deployed my .net core 2.1 application on local IIS but I can't debug my application. I have also tried attaching with w3wp.exe process of my own created "No managed code" application pool but still can't debug my app.
Updated: I had found a solution to run dotnet.exe and my deployed process together and I succeeded one time but after that dotnet.exe disappeared from the process list and I can't find it anywhere but it exists in C:/ProgramFiles/dotnet I have also tried restarting VS but still no luck. So can I get dotnet.exe process back?
Ok, so with the help of Lex Li comments and google, I have found the solution of debugging Asp.net core app deployed on local IIS.
We need to attach with 2 processes to debug the app
dotnet.exe
devenv.exe (the title of devenv.exe would be the
same name by which our app is deployed on IIS.
Note: sometimes we might not find dotnet.exe process in the "Attach to process" list even it would be available in C:\ProgramFiles\dotnet. So we just need to refresh our IIS deployed app on browser and dotnet.exe process will be available in the list then.
I am getting this error after publishing my application:
The directory '/App_GlobalResources/' is not allowed because the application is precompiled.
My googling has yielded many recommendations to "restart my application" only I have no idea how to do this.
To restart your application you can open web.config in an editor, add a space somewhere, and save it. Please be aware that if you are using in-process session state the application pool will recycle, causing session state to be lost. However, this method has the benefit of not affecting web applications in other application pools.
If you want only this application to be affected, you could place it in its own application pool, or use one of the other session-state modes. Session State Modes
Refresh your website and Restart your application pool from IIS.
If you're developing locally, open a command prompt and type iisreset If you do this on a production machine you're going to take ALL the sites on that machine down during the reset. It's usually quick, but some sites can't have downtime during peak hours...
On a server, stop the app and app pool, then start them again.
I have to debug a WCF hosted in local IIS. Each time I have to attach two processes "w3wp.exe".
One ID is 7624, the other is 8372.
Users: one is "IIS APPPOOL\ASP.NET V4.0 Integrated[administrator]
the other one is "IIS APOOL DefaultAppPool[administrator]
Questions:
What they are? (google search but bo clue)
Can I just attach one process rather all?
Thanks
Updated:
See IIS image:
Just check in your IIS Management Console the Application Pool in which your site resides, then attach to the proper one. Probably, as you're using WCF, you're running under .NET 4, so under the first process you linked.
Application pool is the set of apps that run under same worker process.
Important thing in practice is that one app pool can serve only applications with same version of .NET (version of .NET CLR - to be precise). It is also good to remember that applications from the same app pool will "share" recycling of worker process.
So, you should look up at the IIS in which app pool your service is running and debug only process associated with this app pool.
They are Application Pool Identities. This is the newer (and securer) way of assigning priveleges to websites. Essentially a site runs on its own application pool, so you assign rights to files based on that pool.
See: http://www.iis.net/learn/manage/configuring-security/application-pool-identities
Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..
What we have:
Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)
Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each application pool running under an other windows account.
What happens:
All appPools are started, all services operational
IISReset is executed (or the machine is rebooted)
IIS comes back up, but not all application pools start properly. Sometimes they all come back up, sometimes one or more pools won't start. They can be started manually however.
Is this "normal" iis behavior and should I just avoid using iisreset, or are we doing something wrong in our .NET code?
The application pools should restart on an iisreset, but they do run outside of iis (in COM+) for reliability. This mean they may may not come back if the application is misbehaving, but IIS and the other apps will(should) come back. So yes, This is "normal".
P.S.
I would also like to "OUT" myself as a proud user of iisreset. Bad practice? Bah! ;D
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When you say "not started", does it mean you attempt to access some WCF web services (after iisreset), and you get a Service Unavailable error because the appPool cannot be started? Do you see any IIS W3SVC related entries in the Event logs?
If there are, they may be able to clue you in why they cannot start; post them up here.
Reason:
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When it says "not started" it mean you attempt to access some WCF web services (after iisreset) failed due to object was holding some space in memory, and you get a Service Unavailable error because the appPool cannot be started.
Workaround:
Create Batch file with following commands & schedule it.
net stop 23svc
net stop msftpsvc
net stop smtpsvc
net stop PleskControlPanel
net stop HTTPFilter
iisreset /restart
net start w3svc
net start msftpsvc
net start smtpsvc
net start PleskControlPanel
net Start HTTPFilter
Had similiar issue - after IIS has been restarted, DefaultAppPool was stopped.
In application event logs found an error:
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly. If this problem persists, contact your network administrator.
DETAIL - Access is denied.
Fixed by setting in DefaultAppPool Advanced Settings option Load User Profile to False.
Hope it could be usefull.
In a prior support role, I managed several IIS servers running all kinds of .NET mess. When an AppPool failed to start, it was usually a bad login credential.
Re-setting the identity (auth credentials) via advanced settings of the Application pool worked for me.
Earlier I changed my active directory password and as the app pool was already running, it worked fine until I performed IISRESET.
On IIS 6, what does an IIS reset do?
Please compare to recycling an app pool and stopping and starting an ASP.NET web site.
If you replace a DLL or edit/replace the web.config on an ASP.NET web site is that the same as stopping and starting that web site?
IISReset stops and restarts the entire web server (including non-ASP.NET apps)
Recycling an app pool will only affect applications running in that app pool.
Editing the web.config in a web application only affects that web application (recycles just that app).
Editing the machine.config on the machine will recycle all app pools running.
IIS will monitor the /bin directory of your application. Whenever a change is detected in those dlls, it will recycle the app and re-load those new dlls. It also monitors the web.config & machine.config in the same way and performs the same action for the applicable apps.
IISReset restarts the entire webserver (including all associated sites). If you're just looking to reset a single ASP.NET website, you should just recycle that AppDomain.
The most common way to reset an ASP.NET website is to edit the web.config file, but you can also create an admin page with the following:
public partial class Recycle : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
HttpRuntime.UnloadAppDomain();
}
}
Here's a blog post I wrote with more info: Avoid IISRESET in ASP.NET Applications
It operates on the whole IIS process tree, as opposed to just your application pools.
C:\>iisreset /?
IISRESET.EXE (c) Microsoft Corp. 1998-1999
Usage:
iisreset [computername]
/RESTART Stop and then restart all Internet services.
/START Start all Internet services.
/STOP Stop all Internet services.
/REBOOT Reboot the computer.
/REBOOTONERROR Reboot the computer if an error occurs when starting,
stopping, or restarting Internet services.
/NOFORCE Do not forcefully terminate Internet services if
attempting to stop them gracefully fails.
/TIMEOUT:val Specify the timeout value ( in seconds ) to wait for
a successful stop of Internet services. On expiration
of this timeout the computer can be rebooted if
the /REBOOTONERROR parameter is specified.
The default value is 20s for restart, 60s for stop,
and 0s for reboot.
/STATUS Display the status of all Internet services.
/ENABLE Enable restarting of Internet Services
on the local system.
/DISABLE Disable restarting of Internet Services
on the local system.
Application Pool recycling restarts the w3wp.exe process for that application pool, hence it will only affect web sites running in that application pool.
IISReset restarts ALL w3wp.exe processes and any other IIS related service, i.e. the NNTP or FTP Service.
I think changing web.config or /bin does not recycle the whole application pool, but I'm not sure on that.
It stops and starts the services that IIS consists of.
You can think of it as closing the relevant program and starting it up again.
Editing the web.config file or updating a DLL in the bin folder just recycles the worker process for that application, not the whole pool.
IISReset restarts the entire webserver (including all associated sites). If you're just looking to reset a single ASP.NET website, you should just recycle that Application Domain.
When you change an ASP.NET website's configuration file, it restarts the application to reflect the changes...
When you do an IIS reset, that restarts all applications running on that IIS instance.
Here what's technet has to say about iisreset
You might need to restart Internet Information Services (IIS) before certain configuration changes take effect or when applications become unavailable. Restarting IIS is the same as first stopping IIS, and then starting it again, except it is accomplished with a single command.