iis-6

IIS 6.0 DirectoryEntry ScriptMaps property and set .Net version

风格不统一 提交于 2019-12-11 00:31:42
问题 After creating a web site, i notice that it sets the asp.net version to 1.1. I would like to in code change this to version 2.0.50727. I found that in the ScriptMaps property there are string list of all the file extensions and code mapping. But I have not figured out how to change all of the values that are connected to .net? Or is there a way to tell it to use an other verison with .invoke? 回答1: DirectoryEntry sited = new DirectoryEntry(string.Format("IIS://localhost/w3svc/{0}/Root",

What is Cassini's (aka VS Dev Server) stack limit?

回眸只為那壹抹淺笑 提交于 2019-12-11 00:12:27
问题 I'm running into a StackOverflowException (please don't ask, it's not my fault) in IIS6/2k3 which has a limit of 256k, but the exception doesn't happen in the VS debugger. As a matter of understanding I'd love to know, but have failed to google what the stack limit of Cassini is...if indeed it has one? 回答1: Have you tried stack-overflowing Cassini on purpose to see at what point it crashes? I'd imagine the stack is immense, though I would expect Cassini to replicate IIS as closely as possible

Server.TransferRequest for IIS 6

拥有回忆 提交于 2019-12-10 22:33:47
问题 Is there a way to fake the behavior of TransferRequest in IIS 6? Specifically the ability to re-process the whole pipeline without the client having to make a new request? I'm trying to handle a 404 error from Application_Error, do some magic to see if the URL changed (in which case I use Response.Redirect to redirect to the new URL) but if there really is a 404 I want to serve up my pretty looking 404 page which has to deal with showing some content which is part of the users session. The

Programatically removing etag suffix (change number) from the metabase IIS6

霸气de小男生 提交于 2019-12-10 20:16:25
问题 IIS 6.0 generates eTag values in the format of "hash:changenumber". The changenumber goes up every time IIS resets, so your eTag is only valid for the lifetime of your IIS process. Restart, number goes up, hash:changenumber != hash:changenumber+1. The fix for this is to hard-code the changenumber, which is possible using the Metabase Explorer, a .NET utility for editing the metabase, or by editing the XML file when the IIS services are stopped. I want to do this programmatically, with the

the element 'transport' cannot contain child element 'extendedProtectionPolicy' because the parent element's content model is empty

非 Y 不嫁゛ 提交于 2019-12-10 19:08:23
问题 I inherited a web application that makes calls to a web service. It is being developed in VS2008 SP1 and deployed to IIS6 (2k3 Server R2). Since I upgraded to Windows 7 Enterprise RTM, the following line gets added to my Web.config: <extendedProtectionPolicy policyEnforcement="Never" /> The problem is that when I deploy this application to my web server I get the following error: The element 'transport' cannot contain child element 'extendedProtectionPolicy' because the parent element's

Error 406 with IIS 6

牧云@^-^@ 提交于 2019-12-10 18:16:47
问题 I'm making a web site that must conform to MobileOK. When I run the validator, it receives a "406" error whenever it attempts to retrieve a jpeg or png file, but gif files are fine. What I think is causing it is that the "Accept:" header sent by the MobileOK validator doesn't include "image/png" or "image/jpg", rather it only includes "image/jpeg" and "image/gif". So, I stripped all of the png files out of the site and replaced them with gif and jpeg files, renaming any ".jpg" to ".jpeg". I

IIS6 - Why won't my Custom error page display?

﹥>﹥吖頭↗ 提交于 2019-12-10 17:49:59
问题 I have a custom error page that should display for HTTP 404 errors. It does not and I am having difficulty figuring out why. My web.config is set <customErrors mode="On" /> Fiddler shows a 401.2, followed by a 404 for a single POST. Both errors should be custom. The 401.2 is working because I see it in fiddler. The 404 happens immediately after so all I see in the browser is the generic 404 error. I should see my custom 404 page. Why won't my custom HTTP 404 page showup? 回答1: What's the URL

.NET / C# String Reference in Code Behind Not Loading Updated Value

感情迁移 提交于 2019-12-10 17:12:36
问题 I seem to have run into a strange issue whereby a string reference is not loading an updated value. In short, I've replaced a DLL file (App_Code.dll) that contains a bunch of page titles (think HTML Page Titles), but the values aren't being updated when referenced from other DLL's. Here's a code snippet from a codebehind of a sample page: this.Master.PageDescription = Constants.Titles.CardInfoPageDescription; The Constants class is compiled into App_Code.dll, which I just replaced. I've also

How do I programmatically set Integrated Windows Authentication in IIS on a .NET web service?

血红的双手。 提交于 2019-12-10 16:54:15
问题 I have a web service project that needs to be set to use Integrated Windows Authentication after installation. Normally, I would install the web service, then manually go to IIS and make sure the box is checked for Integrated Windows Authentication. There has to be a way to do this through code. I have looked up on using the Installer class. It looks like this is something I could use, but I have not found anything on setting properties programmatically in IIS. 回答1: String applicationPath =

IIS 6.0 programmatically - Problem creating virtual directories AND not setting it as a Application

99封情书 提交于 2019-12-10 14:56:56
问题 So I am creating a virtual directory in IIS 6.0 programmically, but I am following the only MSDN (or other) documentation on creating a virtual directory, but the documentation I have at http://msdn.microsoft.com/en-us/library/ms525598(VS.90).aspx Is causing my virtual directory to be an application in IIS. I was trying to use the metabase properties page: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx?mfr=true But in the