iis

Differences between IIS 6.0 / Windows 2003 and IIS 7.0 / Windows 2008

I am considering currently to get a VPS for some of my development test. I found some VPS at a cheap price, which suits me as it's only going to be used as a sandbox. So far I know it is possible to install .Net 3.5 on the windows 2003 without problems, if I am correct it will be also possible to use IIS6 for all my development includi...

How to track IIS server performance

I have a reoccurring issue where a customer calls up and complains that the web site is too slow. Specifically, if they are inactive for a short period of time, then go back to the site, there will be a minute-two minute delay before the user sees a response. (the standard browser is Firefox in this case) I have Perfmon up and running,...

problem with asp.net on visual studio .net 2003

I want to run ASP.NET on VS 2003 but it raises an error which says: "Visual studio has detected that web server is running asp.net version 1.0.The web application you are creating or opening can be configured to be compliant with asp.net 1.0. However, the web application will not be able to use the new features from asp.net 1.1." When I...

I want to use ASP.Net MVC. My server is Win 2003 and it uses IIS 6, will all this work together?

ASP.Net MVC is finally available as version 1. I have been waiting for an official release before I try to start using it. At the moment I have a dedicated web server which I have complete access to via remote desktop. It is running Win 2003 Server with IIS6 (I think it is IIS6, they don't print the version in the Help -> About but a bit...

Setting Charset for static files in iis

How can I ensure IIS (and Cassini) send css and js files with the content-type header (ie text/css;charset=UTF-8)? ...

How can I change the username/password of an ApplicationPool in IIS from C#?

I am using the code below to create a new application pool in the Installer class of my application: private static void CreateAppPool(string serverName, string appPoolName) { // metabasePath is of the form "IIS://<servername>/W3SVC/AppPools" // for example "IIS://localhost/W3SVC/AppPools" // appPoolName is of the form...

How can I look up IIS site id in C#?

I am writing an installer class for my web service. In many cases when I use WMI (e.g. when creating virtual directories) I have to know the siteId to provide the correct metabasePath to the site, e.g.: metabasePath is of the form "IIS://<servername>/<service>/<siteID>/Root[/<vdir>]" for example "IIS://localhost/W3SVC/1/Root" How can...

Testing/Debugging website running on iis 6.0 and 7.0 with an xp development environment?

Considering iis 6.0 and above can't run on xp what options have i available? Remote debugging (using a win 2k3 host) i'm aware of but i might not have the facilities available very easily ...

change physical path for virtual directory or site in IIS using command line for IIs6 or IIs7

I need to implement some versioning for deployment for the app I support where I can copy the site to say c:\inetpub\wwwroot\app_v2 and then switch the virtual directory from c:\inetpub\wwwroot\app_v1. Is there a way to change the physical path for a virtual directory in IIS from the command line? Edit: i found that in IIS7 you can ...

Why won't my SMTP Server send my ASP.NET mail?!

I have an ASP.NET program that sends a confirmation email with the following code: String msgTxt = "My Message"; try { MailMessage message = new MailMessage(); message.From = new MailAddress("[email protected]"); message.To.Add(new MailAddress(emailParam)); message.Bcc.Add(new MailAddress("NPClie...

How can I programmatically check in a C# installer class if IIS supports Application Pools?

Hi, I am writing an installer class in which I am creating a new Application Pool. This obviously is not going to work on IIS <6.0. How can I safely check (programmatically in .Net) if IIS supports application pools before I try to add one? ...

IIS SMTP Message Inspection

Is there a way to peek or see a message before it hits the SMTP on IIS. This is not an Exchange Server, it's just running SMTP. I am trying to see if I can look at the message and then pass it to SMTP? Thanks Edit ~ Instead of adding another listner, I am wondering if there is a way to bind to the default SMTP listner and intercept the...

How can I delete IIS objects from c#?

I need to delete a Virtual Directory and Application pool from .NET as part of my uninstall method. I found the following code on the web somewhere: private static void DeleteTree(string metabasePath) { // metabasePath is of the form "IIS://<servername>/<path>" // for example "IIS://localhost/W3SVC/1/Root/MyVDir"...

Using a colon (:) in a url with ASP.NET/IIS

I'm implementing a custom controller in ASP.NET MVC and really want to be able to use a colon in the urls, so that I can identify class/column names and their values, like so: http://mysite.com/user:chaiguy ...but apparently ASP.NET or IIS doesn't allow colons in urls. I did some digging and apparently it's considered a security issue,...

CSS/JS GZip Compression with Asp.Net

I am currently on a hosted Virtual Server, I want to enable GZip compression for my Asp.Net 3.5 site, how do I go about starting? I have tried using 'packed' JS files, but they don't work, I am assuming it's because they are not handled correctly...? ...

IIS 6.0 Access Permissions to Remote Share

When setting up a virtual directory under IIS using a UNC path to a remote share, what user identity should I be expecting to see the read request to the share come under? I've setup the above scenario and configured the user under 'Connect As' as a known user who has permissions on the remote share, which I checked with Windows Explore...

How can I programatically limit access to a Webservice?

I am writing a traditional ASMX webservice using C# with .Net 2.0 for deployment on IIS. The webservice will be deployed in a shared hosting environment where each client has their own copy of the application sitting in a separate virtual directory (I know, I know - it's a legacy app). There will be an individual copy of the Webservice s...

How can I make the msi overwrite old files?

Hi, I have a standard Visual Studio (2008) application setup project, which generates an msi containing a few files. I noticed however that: 1) When the msi installs and some of the files already exist, it simply silently ignores these files. This is the behaviour that I don't want, because of obvious reasons. 2) When I uninstall the ms...

Does disabling anonymous access in IIS create a security risk?

If I uncheck the "Enable anonymous access" checkbox in IIS, so as to password protect a site, i.e. by restricting read access to designated Windows accounts, does the resulting password dialogue which is then presented to all anonymous http requests, represent a security risk in that it (seemingly) offers all and sundry an unlimited numb...

How do I list and create all IIS websites, folders in the websites and virtual web directories in C#

I am trying to first list all the IIS websites and the folders/virtual web directories in each (in a tree view). Then after that I would like to allow the user to select any of the above nodes and create a new virtual web directory there. I can create a virtual web directory if I know the path I plan to use but I cannot get a list of the...