iis-7

Continuous deployment of IIS settings with MSDeploy

青春壹個敷衍的年華 提交于 2020-01-01 10:54:50
问题 We practice continuous deployment with TFS (2008) and are looking for a nice way to handle IIS settings changes. MSDeploy seems like it should be the way to handle this, but after much reading and searching, I haven't found a good answer. The problem with MSDeploy, as I see it, is that you need to create a deployment package using an existing IIS website. I would like to be able to have the appropriate IIS configuration for the website in source control and have the build create the package.

Continuous deployment of IIS settings with MSDeploy

戏子无情 提交于 2020-01-01 10:54:09
问题 We practice continuous deployment with TFS (2008) and are looking for a nice way to handle IIS settings changes. MSDeploy seems like it should be the way to handle this, but after much reading and searching, I haven't found a good answer. The problem with MSDeploy, as I see it, is that you need to create a deployment package using an existing IIS website. I would like to be able to have the appropriate IIS configuration for the website in source control and have the build create the package.

Rewrite maps in IIS7 — how to make the match optionally include a trailing slash?

放肆的年华 提交于 2020-01-01 08:22:20
问题 I have read the top 30 Google hits for several combinations of IIS rewrite map condition and so on, but I can't find any decent documentation, either on a microsoft.com site or elsewhere. I have a bunch of rewrite maps in IIS7 that I would like to process irrespective of whether or not they are followed by a trailing slash. So www.foo.com/bar and www.foo.com/bar/ should both match the rule. <rewrite> <rewriteMaps> <rewriteMap name="ShortURLs"> <add key="/terms" value="/en-us/terms-and

How to add multiple URL rewrite rules in a web.config

落爺英雄遲暮 提交于 2020-01-01 07:56:04
问题 How to add multiple URL rewrite rules in a web.config I want to match any url that contains "sales" and "registrationsuccess". I get errors with when I try the following: <rewrite> <rules> <rule name="Redirect HTTP to HTTPS" stopProcessing="true"> <match url="(.*sales*)"/> <match url="(.*registrationsuccess*)"/> <conditions> <add input="{HTTPS}" pattern="^OFF$"/> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther"/> </rule> </rules> </rewrite> 回答1:

Code to create IIS Website

风流意气都作罢 提交于 2020-01-01 06:54:48
问题 I need to programatically create an IIS website. Can anybody show me the code to do this? 回答1: Please don't use WMI ( DirectoryEntry ) if at all possible when targeting IIS 7 or above. There is an API called ServerManager in the Microsoft.Web.Administration.dll ( windows\system32\inetsrv ) that makes this really easy: ServerManager serverManager = new ServerManager(); serverManager.Sites.Add("Mysite", "c:\temp\", 8080); 回答2: This will work for IIS 6.0 and later, it's written in VB.Net (which,

Definitive Guide to Handling 500 Errors in IIS6, IIS7, ASP.NET MVC3 with Custom Page

ぃ、小莉子 提交于 2020-01-01 06:54:07
问题 I'm trying to add a 500 error handling page to my ASP.NET MVC3 project. I want my custom error page displayed regardless of local or remote access. My website is running on IIS6,IIS7 & IIS7.5 Express I want it displayed when: An exception is thrown in Application_BeginRequest An exception is thrown in Application_Error An exception is thrown in a static constructor in the Website Project An exception is thrown in a Controller An exception is thrown in a view An exception thrown anywhere

Code to create IIS Website

此生再无相见时 提交于 2020-01-01 06:54:06
问题 I need to programatically create an IIS website. Can anybody show me the code to do this? 回答1: Please don't use WMI ( DirectoryEntry ) if at all possible when targeting IIS 7 or above. There is an API called ServerManager in the Microsoft.Web.Administration.dll ( windows\system32\inetsrv ) that makes this really easy: ServerManager serverManager = new ServerManager(); serverManager.Sites.Add("Mysite", "c:\temp\", 8080); 回答2: This will work for IIS 6.0 and later, it's written in VB.Net (which,

How To Deny Access To File But Allow Server

点点圈 提交于 2020-01-01 06:29:04
问题 I have a web application that has a configuration folder that houses multiple XML files that are configuration settings for multiple "portals" as you will. I need IIS to have access to them so the "portal" loads (sql connection strings, master page paths) but I want to deny any outside access (url browsing). Here's an example below: http://www.mywebsite/virtualdirectory/configurationdirectory/configfile.xml I need to restrict access to this file if you're browsing to it but still allow the

HTTP Error 500.19 on IIS7 “Malformed XML” in web.config

一世执手 提交于 2020-01-01 01:18:30
问题 I'm forced to rebuild my machine from factory default. Everything should be the same, IIS version (7.5), OS (Windows 7), and my website files. However, something is different because after configuring my website and pulling the local site up in my browser, I get the following error... HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Error Code 0x8007000d When I look up error code 0x800700d it tells

HTTP Error 500.19 on IIS7 “Malformed XML” in web.config

主宰稳场 提交于 2020-01-01 01:18:04
问题 I'm forced to rebuild my machine from factory default. Everything should be the same, IIS version (7.5), OS (Windows 7), and my website files. However, something is different because after configuring my website and pulling the local site up in my browser, I get the following error... HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Error Code 0x8007000d When I look up error code 0x800700d it tells