iis-7

MVC3 + WordPress IIS Url Rewriting Rules

寵の児 提交于 2019-12-19 04:09:21
问题 I have a ASP.NET MVC3 website located at http://mydomain.com/mymvcapp/. However, the root of the webiste (mydomain.com) contains a WordPress site running PHP. Therefore, I put the following IIS URL Rewrite rule to allow WordPress to function correctly via its rewriting mechanisms: <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType=

MVC3 + WordPress IIS Url Rewriting Rules

时光毁灭记忆、已成空白 提交于 2019-12-19 04:09:11
问题 I have a ASP.NET MVC3 website located at http://mydomain.com/mymvcapp/. However, the root of the webiste (mydomain.com) contains a WordPress site running PHP. Therefore, I put the following IIS URL Rewrite rule to allow WordPress to function correctly via its rewriting mechanisms: <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType=

Error using session in IIS 7

一个人想着一个人 提交于 2019-12-19 03:25:23
问题 After deployment of my website to IIS, I'm getting the following error message when trying to access a session: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration. I access it in Page_Load or PreRender events (I tried both versions). With Visual Studio Dev Server it

log4net doesn't create log file when deployed on IIS7

≯℡__Kan透↙ 提交于 2019-12-18 22:33:41
问题 Good morning everybody, I have a log4net issue that didn't exist when I was developing on my local machine, but once I deployed the application to a server, log4net stopped working. This is the server configuration : -Windows XP SP3 -IIS 7 -framework .Net v4 This is the log4net configuration in the web.config of the website: <configuration> <log4net> <root> <level value="DEBUG" /> <appender-ref ref="LogFileAppender" /> </root> <appender name="LogFileAppender" type="log4net.Appender

asp.net mvc keeps overriding text/html content-type with .wml

假如想象 提交于 2019-12-18 18:08:33
问题 I'm developing an website which is to be viewed on mobile (cellphone) devices. I'm just using plain HTML 4.01, nothing special at all. The pages render fine on all the mobile browsers we've tested, except for Nokia Series 40 1-5th editions. On closer inspection, it seems that IIS is automatically rendering the html with the content-type of text/vnd.wap.wml instead of text/html . Since we're not using WAP, the page fails with an error. I'm using ASP.Net MVC 1.0 so I've added a

How do I stop IIS7 from putting out its own 404 before my MVC app gets a chance to handle it?

半世苍凉 提交于 2019-12-18 15:02:52
问题 I have an ASP.NET MVC 2 application, which has an Application_Error event handler in global.asax. In this, I'm detecting the case where the Exception type is HttpException and the HTTP code is 404, and redirecting to my own 404-handling page. This works fine on my Cassini development server, but now I'm trying to move it over to my production server which has IIS7 ( using integrated mode ). When I request a non-existent URL, IIS7 is showing its own 404 page, and so far as I can tell, my

HttpHandler not working in IIS 7

心不动则不痛 提交于 2019-12-18 14:54:16
问题 I have an HttpHandler configured in my web.config file like so: <add verb="GET,HEAD,POST" path="TinyMCE.ashx" type="Moxiecode.TinyMCE.Web.HttpHandler,Moxiecode.TinyMCE" /> When I deploy to IIS 7 the handler stops working (404). What do I need to do to get this working? 回答1: Registration of HttpHandlers is different for IIS7 than for previous versions of IIS. Specifically, you register the handlers in the web.config section named <system.webServer><handlers> not in <httpHandlers> . See this

Why the error 404 happens when I access *.mp4 file by HTTP?

点点圈 提交于 2019-12-18 14:05:46
问题 I have some shared folder over HTTP. Lets say: http://myserver/files And there are some filed like png, avi, jpg, mp4 and etc. I can easily access *.png or *.avi via browser (http://myserver/files/555.avi) but cannot access to *.mp4. So IIS gives the 404 error. What's up? Thank you! UPDATES: May be it is important: I have to access by this URL format http://112.333.44.33/files/555.mp4 回答1: So I found the solution. I just added correct MIME type to my website. Extension: mp4 MIME type: video

How to restrict download of specified file types

六眼飞鱼酱① 提交于 2019-12-18 13:53:19
问题 I want to restrict my web app so that .txt files can not be downloaded/shown. Is this something I can set up in my web.config file? I tried this in my config file: <system.web> <httpHandlers> <add verb="*" path="*.txt" type="System.Web.HttpForbiddenHandler" /> </httpHandlers> </system.web> ...but it had no effect. I am using IIS7 and application is .NET3.5, could this have something to do with it? I know this would actually work for .NEt 1.0 1.1 and 2.0. I noticed in the documentation for

Remove NEGOTIATE from WindowsAuthentication in IIS

一笑奈何 提交于 2019-12-18 13:31:48
问题 I have a site running in IIS 7.5 that is accessed using a DNS alias different from the actual server name. In IE 8, integrated authentication is failing, but in Firefox and Chrome everything works fine. (IE presents a credential challenge a few times, then displays a 401.1 error page.) I have figured out that this is due to IE using Kerberos (aka "Negotiate") over NTLM, and Kerberos requires registering a Service Principal Name (using SETSPN) so that the mismatch between the DNS name and the