iis

Programmatically deciding what file a URL should point to with ASP.NET 3.5 and IIS 7

Is it possible to programmatically resolve a URL to a file using ASP.NET and IIS? Specifically I'd like the file to be outside of my Virtual Directory (could be anywhere on the local file system). So if a URL comes in like http://mysite/somepicture.jpg I'd like to be able to return c:\mypicture.jpg. I looked into creating an IHttpModu...

How to log HTTP requests coming into IIS

I run IIS 5 on my dev machine. I have an asp.net 3.5 web service running on it which I'm calling from a different web app running on the same server. My service is returning an error 500 Internal Server error and I'm troubleshooting it. My request is being sent via a System.Net.HttpWebRequest object and it looks valid from the client'...

Best way to reload web assemblies without IISReset

What's the best way to reload assemblies after you do a publish to a website and or gac some assemblies. An easy trick I've learned is to touch the web.config and it reloads the app domain. What are the best practices related to this? Is it possible to update a Server Activated Serviced Component without an IISRESET that is referenc...

How to tell if I'm running under a web server or not?

I'm writing a C# .NET module and I would like to use the provider pattern. If my code is running on a web server, I have access to System.Web.Configuration and can call ProvidersHelper to load an appropriate provider as determined by the web.config data. If my code is running in a stand-alone environment, I won't have access to this...

IIS 7: Redirect all request to Default.aspx

We want to redirect all request in an ASP.NET site to ~/Default.aspx to close the site. We are using IIS7. The site has paths like this that return a page: http://test.com/operating We are using url rewriting. We want requests similar to those to be redirected to ~/Default.aspx http://test.com// http://test.com/.aspx http://test.co...

ISAPI proxy authentication problem on IIS

Hi there, i’ve got an “public” IIS “in the front” and another “private” IIS “in the back” of an network. I’d like to proxy http requests through the “public” IIS to the “private” IIS – and using ISAPI-Rewrite ( Version 3.1.0.62 ) it almost works. The problem is the authentication – I configured the “public” IIS to enable anonymous acc...

IIS Web Service calling COM dll that needs to access a unix file share

We have a web service that uses COM to talk to some DLLs. The data files that the DLL functions rely on are on a unix share, and we must specify the data file location when initializing the COM calls. We have installed SFU 3.5 on our Windows Server 2003 server. We can't use a mapped drive because IIS is running as a service (or can we?)....

IIS virtual directory from web.config

I have a IIS problem that I think this blog gives me a fix for: To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will automatically create the "application" using the virtual directory's name. Now the application can be accessed. ...

Images missing when using ProxyPassMatch to redirect aspx requests

<VirtualHost *:80> ServerName mine.abc.def.edu ProxyPassMatch ^(/.*\.aspx.*) http://mine.abc.def.edu:8080/$1 </VirtualHost> I am running IIS on port 8080, and Apache on port 80. I have gotten the above in the apache config to successfully redirect ASP.NET pages to IIS, but the images on the pages are missing. I was thinking I need so...

How to send mail using IIS 5.1 in WinXP?

I have this code to send mail: public bool SendMail(MailMessage message) { message.From = new MailAddress(AppProperties.FromMailAddress, AppProperties.FromDisplayName); SmtpClient smtp = new SmtpClient { EnableSsl = AppProperties.EnableSsl }; try { smtp.Send(message); return true; } catch (Excepti...

IIS Application pool PID

is anyone familiar with a way to get the Application pool that is associated with a process ID ? I am using Win32_Process to query the W3WP services and return the PID now I am trying to get the app pool associated with it. ...

Create the default website of IIs, after delete

Hi, i have accidentaly delete the default website in II/, so in the tree of iis manager i can't see it and the address localhost return the classical 404 error. I've reinstalled iis but the there isn't the default website...I would, if it's possibile, ask you how create the default website so then i can inside create my folder. ...

Cookieless sessions and IIS7 causes a redirect loop

I have an ASP .NET website that uses cookieless sessions. When the initial request is made to the site using a url such as: http://localhost/site IE just displays the standard "Internet Explorer cannot display the webpage" message. Firefox is a bit more helpful and displays the following message: "Redirection limit for this URL exceed...

Turn off IIS 6 HttpCompression for specific browsers

I am having issues with IE6 (surprise) and HTTP Compression using IIS6. I really don't want to turn off HTTP Compression for the site. Is there a way to tell IIS6 to not compress responses to specific versions of browsers? IE7 works fine. EDIT: My problem actually comes from Silverlight 2 consuming a WCF Service. With compression tu...

Do you lose functionality when hosting ASP.NET MVC on IIS 6? If so, what?

As a dev team, we're looking to switch to asp.net MVC and I've heard rumors about IIS 6 not being able to support all of the MVC functionality. Is this true? Is there any official set of functionality supported in IIS 7 vs IIS 6? Should we completely avoid running it on IIS6? ...

How can I add multiple ServerBindings to IIS6 using powershell?

I'm having real issues trying to add multiple serverbindings to a single website using powershell! Currently i have the following code: function UpdateMetaBaseProperties($dirEntry, $Properties) { foreach($Prop in $Properties) { $KeyValue = $Prop.Split('='); $dirEntry.psbase.Invoke("Put", ($Ke...

Cannot Display Page error in several browser with a live IIS6

I developed an ASP.NET page (.NET 2.0) and it works as a charm in the development environment. It is using AJAX.ASP.NET and only the shipped controls (no third-party controls). I published it to a live IIS6 web server, created the website, set up the .NET version, the application pool and the site can run scripts. I also unchecked anony...

What is the difference between DefaultAppPool and Classic .NET AppPool in IIS7?

I have a problem with timeouts in IIS. In the web.config the session timeout was set to 60 minutes but after 20 minutes the session ends. This problem only occurs in IIS7 and not in IIS5. After some investigation, I discovered it was due to the application pool's timeout. If the App Pool is left 20 minutes without doing anything, IIS ...

Trying to write a program / library like LogParser - How does it work internally?

LogParser isn't open source and I need this functionality for an open source project I'm working on. I'd like to write a library that allows me to query huge (mostly IIS) log files, preferably with Linq. Do you have any links that could help me? How does a program like LogParser work so fast? How does it handle memory limitations? ...

How to delay / throttle login attempts in ASP.NET?

I'm trying to do some very simple request throttling on my ASP.NET web project. Currently I'm not interested in globally throttling requests against DOS attacks, but would like to artificially delay the reponse to all login attempts, just to make dictionary attacks a bit harder to do (more or less like Jeff Atwood outlined here). How wo...