iis-7.5

IIS 7.5 and images not being cached

余生颓废 提交于 2019-12-18 10:41:40
问题 I cannot get the image files to cache. I have tried everything that I have found on this site and others and still cannot get them to cache. Web config setting that I have tried <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /> </staticContent> <httpProtocol allowKeepAlive="true" /> <caching enabled="true" enableKernelCache="true"> <profiles> <add extension=".png" policy="CacheUntilChange" /> <add extension=".jpg" policy="CacheForTimePeriod" duration

IIS App Pool/Restart and ASP.NET

落爺英雄遲暮 提交于 2019-12-18 10:24:05
问题 We are using IIS7 to host an asp.net web-based application. In this environment administrators and developers can deploy code to the application on a regular basis. The new code or app goes as a DLL to the ASP.NET bin folder. Upon deployment of the new DLL, IIS restarts the process, impacting (slowing down) all online users. Is there a way to configure IIS to run the process in the background and once ready make the switch from old state into new without impacting the users?! Thanks in

Can't run exe from classic ASP script on IIS 7.5

半城伤御伤魂 提交于 2019-12-18 09:03:04
问题 I am attempting to upgrade an existing system from Windows XP Professional / IIS 5.1 to Windows 7 Ultimate (32-bit) / IIS 7.5. The original system ran a classic ASP website (only available to the localhost) that used 'ASPExec' to launch desktop applications on the local machine (.bat, .cmd, .exe, etc). Under Windows 7 Ultimate / IIS 7.5, the applications fail to launch from the ASP page. As tests (The end goal is not to launch notepad), I have tried: <% Set Executor = Server.CreateObject(

What does “The ”DataDirectory“ registry value is missing in the LocalDB instance registry key” error mean?

空扰寡人 提交于 2019-12-18 06:09:21
问题 I have a MVC4/ASP.Net application that uses localdb. Everything "appears" to work correctly. However I am getting loads of errors in my event log: The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB3F4304-E7E9-4EE7-9A25-B46BFAA73FB4} The "DataDirectory" registry value is missing in the LocalDB instance registry key: {BB31321B-BEB9-465B-8C8E-DEF9C2C67FBE} Each time the instance changes. XML Detail of the error: <Event xmlns="http://schemas.microsoft.com/win

How can I host multiple websites in IIS 7 and use the same MVC application for all them?

[亡魂溺海] 提交于 2019-12-18 05:24:22
问题 How can I host multiple websites in IIS 7 and use the same MVC application for all them such that each website: Has it's own root directory so user's can upload their own files (html, css, javascript) without seeing other websites'content Uses the same MVC application - so updates to the application affect all sites Users cannot affect the MVC application in any way (preferably it will be hidden from them) Thanks! 回答1: Create a directory where you deploy the MVC files, named "AppFoo". Note

How to catch HttpRequestValidationException in production

佐手、 提交于 2019-12-18 02:18:12
问题 I have this piece of code to handle the HttpRequestValidationException in my global.asax.cs file. protected void Application_Error(object sender, EventArgs e) { var context = HttpContext.Current; var exception = context.Server.GetLastError(); if (exception is HttpRequestValidationException) { Response.Clear(); Response.StatusCode = 200; Response.Write(@"<html><head></head><body>hello</body></html>"); Response.End(); return; } } If I debug my webapplication, it works perfect. But when i put it

System.ComponentModel.Win32Exception: Access is denied Error

半世苍凉 提交于 2019-12-17 23:18:16
问题 I am using C# code to start and stop the window serves but I am getting this error. System.ComponentModel.Win32Exception: Access is denied My code: public void StartService(string serviceName, int timeoutMilliseconds) { ServiceController service = new ServiceController(serviceName); try { TimeSpan timeout = TimeSpan.FromMilliseconds(timeoutMilliseconds); service.Start(); service.WaitForStatus(ServiceControllerStatus.Running, timeout); lblMessage.Text = "Service Started."; } catch (Exception

IIS 7.5 PHP failure “The FastCGI process exited unexpectedly”

两盒软妹~` 提交于 2019-12-17 22:47:11
问题 I've been attempting to get PHP working with IIS 7.5 and have hit a bit of a roadblock. Whenever I try to load the page I get the following error: "HTTP Error 500.0 - Internal Server Error C:\Program Files\PHP\php.exe - The FastCGI process exited unexpectedly" Module FastCgiModule Notification ExecuteRequestHandler Handler PHP_via_FastCGI Error Code 0x00000000 Requested URL *http://localhost:80/index.php Physical Path C:\inetpub\wwwroot\index.php Logon Method Anonymous Logon User Anonymous

VS2010 error: Unable to start debugging on the web server

别等时光非礼了梦想. 提交于 2019-12-17 22:16:34
问题 I get error message "Unable to start debugging on the web server" in Visual Studio 2010. I clicked the Help button and followed the related suggestions without success. This happens with a newly created local ASP.Net project when modified to use IIS instead of Cassini (which works for debugging). It prompts to set debug="true" in the web.config and then immediately pops up the error. Nothing shows up in the Event Viewer. I am able to attach to w3wp to debug. It works but is not as convenient

IIS 7.5 How do you add a Dynamic HTTP Expires Header

断了今生、忘了曾经 提交于 2019-12-17 21:19:05
问题 In IIS 7.5, you can add static HTTP Response headers, but I want to add an "Expires" header that always specifies a date that is 7 days in the future. I'm running php 5.4, so I'd like a solution that can do this by editing the web.config file rather than some c# code solution. I know how to add the header using php, but that won't help for static image file's http headers (jpg, gif, png, etc). The header should look something like this: Expires: Thu, 31 May 2012 10:59:25 GMT How can I make it