iis-7

IIS 7 Log Files Auto Delete?

帅比萌擦擦* 提交于 2019-12-18 10:02:10
问题 Is there any feature in IIS 7 that automatically deletes the logs files older than a specified amt of days? I am aware that this can be accomplished by writing a script(and run it weekly) or a windows service, but i was wondering if there is any inbuilt feature or something that does that. Also, Currently we turned logging off as it is stacking up a large amount of space. Will that be a problem? 回答1: You can create a task that runs daily using Administrative Tools > Task Scheduler. Set your

static field in ASP.NET MVC

喜欢而已 提交于 2019-12-18 09:46:39
问题 I have static field with large object in ASP.NET MVC controller. For the first request i initialize this field and it is available for the next queries. But after waiting 10-20 minutes this field is null. Have any ideas ? I use ASP.NET MVC 1 and IIS 7. Thanks in advance... 回答1: Your application pool is probably recycling. You should be populating any globals like this in application_start, that way they will be reloaded on subsequent requests, even if the pool recycles. By default if there is

Session Variables not saved when page is in an iFrame

白昼怎懂夜的黑 提交于 2019-12-18 09:09:04
问题 I have an aspx page with a listbox control. The listbox is populated from a collection that is retrieved from a service when the page loads. When the user selects an item from the listbox the page posts back, adding the retrieved objects to the session before reloading. On the reload I use the session objects instead of having to call the service again. This all works fine until I access the page from within an iFrame. The Session objects are not retrieved when the page is in an iFrame

How do I create websites on remote servers using appcmd?

冷暖自知 提交于 2019-12-18 08:55:14
问题 I have used appcmd to create websites on my local computer. There doesn't appear to be a server parameter which means that i have to remote desktop on to each machine that i'm deploying to and run the appcmd command. Also, can i use appcmd to deploy to IIS 6.0? If not, how do i deploy to remote IIS 6.0 web servers? I've tried the iisweb.vbs but i can't get it to run on my windows 7 computer because it can#t find the Microsoft.cmdlib. I have tired registering this file but it doesn't make a

InvalidProgramException: Common Language Runtime detected an invalid program

房东的猫 提交于 2019-12-18 08:47:50
问题 All, I'm running into trouble deploying an ASP.NET 4.0 web page. The error is System.InvalidProgramException: Common Language Runtime detected an invalid program The error occurs on IIS7 on a 64 bit Windows Server box. The same page works on IIS7 on my development box (32bit Windows 7) and in the Visual Studio Development Environment. I'm not aware of any differences in the IIS7 configuration. I've used PEVerify to validate the dll's in the application's bin directory. I can reproduce the

IIS 7.0 Error - 500.19 Internal Server Error

谁都会走 提交于 2019-12-18 07:47:31
问题 I am currently on a shared hosting plan with iis 7.0 I have an asp.net mvc application in the wwwroot of my hosting. Now I made a virtual directory to store my webservice in(I don't want to have to host this on a sub domain and pay extra) However when I put my web service code in my virtual directory and try to run it I get this Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed

IIS content-type wrong for compressed CSS

荒凉一梦 提交于 2019-12-18 07:02:54
问题 I develop part of an ASP.NET site that uses mostly themes but has a couple of CSS files in the themes folder. These are included in the web.config by another developer like so: <Content Include="App_Themes\SoftOrange\CMSStyles.css" /> <Content Include="App_Themes\SoftOrange\ContentStyles.css" /> On our internal test server (IIS7, Server 2008 R2 Enterprise) the global IIS manager options for static and dynamic compression are on, for files larger than 2700 bytes. The site-specific static and

How to disable or reprioritize IIS DirectoryListingModule under MVC module?

余生颓废 提交于 2019-12-18 06:18:30
问题 I use an MVC folder structure where the URL routes happen to match the directory names, eg.: <proj>\My\Cool\Thing\ThingController.cs Needs to be accessible by this url: http://blahblah/My/Cool/Thing I have the MVC routing working but unfortunately when relying on default {action} & {id}, IIS Express is routing the request to DirectoryListingModule instead, since it directly matches a folder name. Directory listing is disabled of course so instead I get: The Web server is configured to not

Why once SSL is enabled with [RequireHttps] at action level, it remains enabled forever?

帅比萌擦擦* 提交于 2019-12-18 05:31:14
问题 We want to use https only when strictly required. Why after calling an action like below it remains enabled forever? [RequireHttps] public ActionResult LogIn() { if(Request.IsAuthenticated) return RedirectToAction("Index", "Account"); return View(); } What can we do to disable it when not needed? Thanks. 回答1: I use this action filter that redirects back to http when the https action is completed: using System.Web.Mvc; using System; public class ExitHttpsIfNotRequiredAttribute :

How can I modify a POST request using a custom IHttpModule and an HttpRequest filter?

空扰寡人 提交于 2019-12-18 05:09:30
问题 Overview I want to be able to modify request parameters and content to 3rd party web services (ArcGIS Server). This will be used to create a security layer that exists between any client application and the server application. I think that I have found a solution but I am current having some difficulties in the implementation. Potential Solution: Modify Request with a Custom Request Filter For the solution I implemented a custom request filter loosely based on the sample shown on MSDN. I have