iis7

Remotely programmatically manage IIS 6 and later

I have been trying to figure out how I would be able to write an application to deploy IIS configs to multiple WebServers. The web configurations will be taken from one environment and then be restored on one or more webservers. I have tried out the DirectroyServices API from .NET to manage IIS. I wanted to export all the configuratio...

Install ISAPI extensions programmatically in IIS7

Hi, I want to install ISAPI extensions in IIS7 on Windows7 programmatically (Control Panel -> Programs and features->Turn windows features on or off->IIS->WWW->Application Development feature->ISAPI Extensions). Basically I want to achieve what I can do with following DISM command dism /online /Enable-Feature /FeatureName:IIS-ISAPIEx...

HttpContext.Current.CurrentHandler is null in Context_PreRequestHandlerExecute (IIS integrated mode)

Helo community, I migrate my application to the IIS integrated mode. (IIS 7.5) I'm using the IIS wildcard mapping, so every request is processing through my application. In the classic mode I get for each unhandled request a System.Web.DefaultHttpHandler, but in integrated mode there both (HttpContext.Current.CurrentHandler / HttpCont...

Problem with starting web site on Vista & IIS 7 via .NET

Hello everybody! I need to get IIS web-site state programmatically via C#. I usually do it this way: DirectoryEntry DE = new DirectoryEntry( string.Format( "IIS://localhost/W3SVC/{0}", siteID ) ); Int32 serverState = (Int32)DE.Properties["ServerState"][0]; if ( serverState == IISHelper.MD_SERVER_STATE_STOPPED ) DE.Invoke("Start", ...

URL rewriting with UrlRewritingNet fails with a + char in the URL

I'm using UrlRewritingNet in Umbraco to do some basic URL rewriting of product and category URLs. Everything is fine on my local machine (Visual Studio dev-webserver) and on our internal development server (Window Server 2008 with ISS 7, 32 bit). But it fails on the production server, which is Window Server 2008 R2 with IIS 7 (64 bit). T...

How do I set up a site in IIS7 on Windows 2008 Server Web SP2 via a console application?

I have a program that I've used on Windows Server 2003 that sets up a site in IIS6 which I've used without any problems in the past. I'm trying to do the same thing with Windows 2008 Server Web SP2 and I'm getting an error. I'm guessing it has to do with the user account security. If this is correct, is there a way that I can get ar...

Forms Authentication Ignoring Default Document

Hello all, I have spent a day and a half trying to resolve this issue. Bascially have an ASP.net website with Forms Authentication on IIS7 using Framework 4.0. The Authorization stuff seems to be working perfectly for every scenario with the exception of hitting it with no document specifed (Should resolve to Default Doc). For exampl...

When I call a REST method, it asks me if I want to Download the File.

I have a simple WCF Rest Service with one method. The interface is defined as: [ServiceContract] public interface IHelloRest { [OperationContract] [WebGet(UriTemplate = "json/hello/{name}", ResponseFormat = WebMessageFormat.Json)] string Hello(string name); } The implementation is defined as: public string Hello(string na...

IIS7 URL Rewriting - Subdomain with additional rewrite rules

I am having a problem with the URL rewrite module. I have a subdomain with it's own set of rewrite rules and I am getting 404 errors whenever I click on Urls that have been reformatted. My setup is below. On the main site I am using the following inbound rule to rewrite requests from {http}://mydomain.com/subdomain to {http}://subdomain...

IIS7 URL Rewriting - Subdomain with additional rewrite rules

I am having a problem with the URL rewrite module. I have a subdomain with it's own set of rewrite rules and I am getting 404 errors whenever I click on Urls that have been reformatted. My setup is below. On the main site I am using the following inbound rule to rewrite requests from {http}://mydomain.com/subdomain to {http}://subdomain...

Application Request Routing (ARR) IIS 7 Spaces in URL

I am using AAR to reverse proxy requests to a Confluence install. This works fine when the URL contains no spaces. As soon as a space is added to the URL the request returns a 404, the 404 seems to originate from IIS not the Confluence instance. I have enable Failed Request Tracing as detailed here: http://learn.iis.net/page.aspx/488/u...

Is it possible to change the rewrite rules in asp.net mvc web.config using code?

I want to be able to add/update/delete rewrite rules from the web.config. Is this possible and are there any gotchas? ...

Handle redirection of TLDs leading to same webfolder, should go to different language pages

Hi I am sorry if the heading is a bit confusing. What I want to do is this: I have an IIS 7.0 webserver. One of the sites that I host has 3 domains pointing to it. They work fine. The thing is that I want 1 domain for each language. Example: hxxp://www.example.se should lead to hxxp://www.example.se/index.php/sv/hem hxxp://www.examp...

How to publish a ASP.NET MVC 2 page in IIS 7?

Hi all, I have an ASP MVC 2 page that works perfectly using the development server that comes with visual studio 2010, but all my attempts to publish it in a server (windows 2008) resulted in fail so far. I googled it various times, but none of the tutorials solved my problem. There's some errors, not just one: When I run the silverli...

VS 2010 + IIS: Unable to start debugging on the web server. The IIS worker process for the launched URL is not currently running

Hi there, I have recently started to received this message. Unable to start debugging on the web server. The IIS worker process for the launched URL is not currently running Does anyone know what this means? I created my virtual directory via Properties on the project, and clicking Create Virtual Directory. ANd in IIS I can see it...

Equivalent of this htaccess for IIS7?

What is the equivalent of these rewrite rules: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] In IIS7? These are rewrite rules for Zend Framework and they work under Apache. I tried importi...

How do I rewrite a URL in IIS?

What would be simplest way to get this functionality in my website. A small example code will be appreciated. ...

dynamic data website using ado.net entity framework and mysql giving an error just on the server

I have an asp.net dynamic data website .net 3.5 built on ado.net entity framework with mysql database. Currently I have just one table in my entity model. Everything is working fine on my local machine but when i uploaded on my server i got this error message: "More than one item in the metadata collection match the identity 'mtDBModel...

IIS 7 Logs Vs Custom

I want to log some information about my visitors. Is it better to use the IIS generated log or to create my own in an SQL 2008 db. I know I should probably provide more information about my specific scenario, but I'd like just generally, pros and cons of either proposal. ...

How to identify which web server in a farm served a request?

We're debugging intermittent issues with a website running on IIS7. Since we have many nodes behind the load balancer, we can't tell which host responded to a given request. Is there any way at the IIS level to specify which host served a request? For example, could IIS append a header in the response that indicates the IP of the host t...