iis-7

Using Web Deploy tool for IIS - works with administrator account but not IIS or Windows user account

余生颓废 提交于 2019-12-12 10:48:22
问题 I am struggling with the massive beast that seems to be WMSvc - Web Management service for IIS. I am trying to deploy web sites from Visual Studio which is killing me. Actually it's killing everyone except me on my team, but since I am designated web server manager right now I'm the one thats feeling the hurt. It works when I deploy using my Admin windows account, which atleast means I should be on my way, but it doesn't work with another account that isn't admin or an IIS manager account.

ASP.NET MVC running IIS7 deployment problem

*爱你&永不变心* 提交于 2019-12-12 10:43:40
问题 I am having trouble deploying an ASP.NET MVC app to IIS7. I have an MVC project created with ASP.NET MVC Beta 1. It consists of nothing more than the default template unmodified. The app runs just fine within VS2008, but when I publish it to a local IIS7 website (http://localhost), I get the following server error: The incoming request does not match any route I have also tried unsuccessfully to access http://localhost/Home/About (a route to a specific page within the template). This returns

Why can event handlers only be bound to HttpApplication events during IHttpModule initialization?

左心房为你撑大大i 提交于 2019-12-12 10:33:08
问题 This is just another "working in dev server, why not working in IIS" type question. I created a nice DAL using NHibernate as described here. When creating an ISession, I hook up an event handler to the HttpApplication.EndRequest to take care of cleaning it up. However, I deployed my site to IIS and it says: Event handlers can only be bound to HttpApplication events during IHttpModule initialization. I completely understand what the message is saying, but I can't undestrand why. I can

Url Rewrite in IIS 7.5 causes Internal server error

南楼画角 提交于 2019-12-12 10:28:38
问题 I have a web application runs @ Windows 2008 R2, ASP.NET v4.0. I installed the Url Rewrite Module, and started to use it as shown in the official examples. My problem starts when the <rewrite> tag is added to the web.config under <system.webServer> - actually when I try to browse to any page under this current application, I get 500 - Internal server error . This is the <rewrite> block I've been adding: <system.webServer> <rewrite> <rules> <rule name="test1"> <match url="^default/([0-9]+)/([

Set image expire date in asp.net

☆樱花仙子☆ 提交于 2019-12-12 09:47:53
问题 Using asp.net in visual studios and IIS7 when i get a host. I have a folder full of icons that will rarely change and is used on every page. Is there a way i can set a certain directory to expire something like once every 2 or so hours so i can decrease the amount of incoming request to the server? 回答1: You do that in IIS. If you are using IIS 7, you can add the header in your web.config. It’s in the system.webServer section. <staticContent> <clientCache httpExpires="Sun, 29 Mar 2020 00:00:00

How to accept a self-signed SSL certificate in a WCF client?

柔情痞子 提交于 2019-12-12 09:36:44
问题 This may be a stupid question but I just can't find the answer. What I would like to do: I have a WCF service hosted by IIS. It is working perfectly, I can access the wsdl, I have a self-signed certificate for the server etc. I would like to call this service from a WPF client. The problem is, since I have a self-signed certificate, I get the following exception when calling the service: Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost'. If I

FindByIdentity - performance differences

人盡茶涼 提交于 2019-12-12 09:30:32
问题 The following code works fine from a variety of machines on our domain. var context = new PrincipalContext(ContextType.Domain); var principal = UserPrincipal.FindByIdentity(context, @"domain\username") However, if I run this similar code on a machine that is not on a domain, it works but the FindByIdentity line takes 2+ seconds. var context = new PrincipalContext(ContextType.Machine); var principal = UserPrincipal.FindByIdentity(context, @"machinename\username") Can this performance

Catch IIS level error to handle in ASP.NET

淺唱寂寞╮ 提交于 2019-12-12 08:56:57
问题 I am developing an ASP.NET site with C# on IIS 7, but I hope for an answer that will apply to IIS 6 as well. Part of this site is the ability to upload up to 5 images at a time. I have a nice algorithm to resize the image that is uploaded to my optimal size and ratio. So the only real size limitation I have is during the initial upload. I have modified my web.config to raise the packet limit from 4MB to 32MB. For the most part this takes care of my issues. My question comes in the rare cases

Configure IIS authentication settings using the ServerManager class

六月ゝ 毕业季﹏ 提交于 2019-12-12 08:42:10
问题 I'm using the ServerManager class (from Microsoft.Web.Administration) to create applications on a server running IIS 7. I want to configure whether the application uses anonymous authentication or Windows-authentication on an application-basis so I can't simply ask IT to change the settings on the root site. The contents of the application belongs to a third party so I'm not allowed to change the web.config file inside the application. The Application class doesn't expose any useful

CSS, Javascript and Images have zero length

风格不统一 提交于 2019-12-12 08:37:06
问题 I'm trying to port an ASP.NET MVC 1.0 / Visual Studio 2008 project to ASP.NET MVC RC 2 / Visual Studio 2010. The project is (and has always been) running on IIS 7. Dynamic content (everything that's being delivered by controllers) works fine, but static content such as CSS / Javascript / Images gives me a "200 OK" response, a Content-Length of 0 and no content. It's as if all those files were entirely empty (I made sure the files are not empty though). The static content is in a directory