application-pool

IIS 7.5 application pool uses wrong %APPDATA% for custom user as identity

百般思念 提交于 2019-11-27 09:06:24
I want my MVC3 web application to access %APPDATA% (e.g. C:\Users\MyUsername\AppData\Roaming on Windows 7) because I store configuration files there. Therefore I created an application pool in IIS with the identity of the user "MyUsername", created that user's profile by logging in with the account, and turned on the option "Load User Profile" (was true by default anyway). Impersonation is turned off. Now I have the problem that %APPDATA% (in C#): appdataDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) resolves to c:\windows\system32\inetsrv instead of C:\Users

ASP.NET restarts when a folder is created, renamed or deleted

…衆ロ難τιáo~ 提交于 2019-11-27 07:39:47
UPDATE -- process to replicate issue: 1) Create a website project at c:\projects\restart-demo 2) Add default web.config and a dummy aspx page test.aspx 3) Map IIS to point to the root folder c:\projects\restart-demo 4) Monitor application restarts using perfmon, health monitoring, tracking in global.asax Application_End, etc. 5) Request page in browser http://localhost/test.aspx application start 6) Create new folder c:\projects\restart-demo\asdf application end 7) Request page in browser http://localhost/test.aspx application start 8) Rename folder c:\projects\restart-demo\asdf to c:\projects

What is an IIS application pool?

白昼怎懂夜的黑 提交于 2019-11-27 04:01:33
问题 What exactly is an application pool? What is its purpose? 回答1: Application pools allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won't take down other applications. Additionally, applications pools allow you to separate different apps which require different levels of security. Here's a good resource: IIS and ASP.NET: The Application Pool 回答2: Basically, an application pool is a way to create

How to prevent IIS from shutting down Web Site when not in use?

狂风中的少年 提交于 2019-11-27 01:57:32
问题 I have a web application hosted under IIS. It is a data warehouse, and during its startup process it requires instantiating a large set of items in memory (takes roughly ~20 minutes to fully set up). Because this website is critical to our company, this system must be online 100% during the daytime, and only can be restarted during off-work hours. For some reason, this web application seems to be "offline" when there is no usage for some time. I know this because the cache is not fully

Get the Application Pool Identity programmatically

喜你入骨 提交于 2019-11-27 01:32:55
How do I get the identity of an appPool programmatically in C#? I want the application pool user and NOT the user who is currently logged in. adt You could use System.Security.Principal.WindowsIdentity.GetCurrent().Name to identify the Identity in which the current application is running. This link provides a nice utility which displays the identity under which the aspx is run. You need to make a reference to Microsoft.Web.Administration (in Microsoft.Web.Administration.dll). Microsoft.Web.Administration.dll is located in C:\Windows\System32\inetsrv. //Add this to your using statements: using

How to config application pool in IIS 7.5 automatically re-start when it was stopped?

▼魔方 西西 提交于 2019-11-27 01:15:47
问题 My website was down several times per day and when I check the application pool (IIS 7.5), I saw it was stopped and I must restart it manually. How can I setup application pool so that it automatically restarts after an error? 回答1: You will need to change the startMode for the application pool your website is running on from onDemand to AlwaysRunning. By default IIS sets all application pools to onDemand. In IIS Manager, click computer name in the Connection pane. Switch to Features View if

Set Application Pool for package using MSDeploy

馋奶兔 提交于 2019-11-27 00:58:15
问题 I am deploying a website using MSDeploy so using something like the below code. "%ProgramFiles%\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package=WebAppServer.zip -dest:Auto -setParamFile="was_params.xml" -verbose > webappserversync.log Is there anyway to set the application pool ? I want to do this from the command line and not set it in a manifest or anything like that. Shouldn't matter but this is in IIS7. 回答1: When you generate your package, you need to have an entry in

Enable application pool 32-bit mode on 64-bit server

蹲街弑〆低调 提交于 2019-11-26 21:58:56
问题 We have 64-bit Windows server and we need to explicitly enable the 32-bit mode in the Application Pool used by our web site, because the MS Jet Engine Data Provider used to import data from Excel does not run. I am not sure, if we enable the 32-bit mode will we still get the advantage of 64-bit Server? 回答1: In IIS 7.x, there is a Advanced Settings property of the application pool called "Enable 32-bit Applications". If you run the application as a 32-bit applications it should be able to use

App pool timeout for azure web sites

…衆ロ難τιáo~ 提交于 2019-11-26 20:10:37
问题 is there a way to set the timeout of an app pool of a web-site running under azure sites. I have a site running there and it seems like it needs to spin up again when it has been idle for a while. 回答1: Windows Azure Web Sites supports two modes, shared and Reserved. In Shared mode, your web site process (w3wp) runs alongside other, sharing resources including CPU and memory. The runtime (that is Windows Azure Web Sites system) remove sites from memory after period of idleness – that is when

IIS 7.5 application pool uses wrong %APPDATA% for custom user as identity

你离开我真会死。 提交于 2019-11-26 17:48:12
问题 I want my MVC3 web application to access %APPDATA% (e.g. C:\Users\MyUsername\AppData\Roaming on Windows 7) because I store configuration files there. Therefore I created an application pool in IIS with the identity of the user "MyUsername", created that user's profile by logging in with the account, and turned on the option "Load User Profile" (was true by default anyway). Impersonation is turned off. Now I have the problem that %APPDATA% (in C#): appdataDir = Environment.GetFolderPath