iis-6

Classic ASP text substitution and UTF-8 encoding

混江龙づ霸主 提交于 2019-11-27 03:15:14
问题 We have a website that uses Classic ASP. Part of our release process substitutes values in a file and we found a bug in it where it will write the file out as UTF-8. This then causes our application to start spitting out garbage. Apostrophes get returned as some encoded characters. If we then go an remove the BOM that says this file is UTF-8 then the text that was previously rendered as garbage is now displayed correctly. Is there something that IIS does differently when it encounters UTF-8 a

IIS6 + HttpModule: This operation requires IIS integrated pipeline mode

送分小仙女□ 提交于 2019-11-27 03:11:26
问题 I am using IIS6, I've written an HttpModule, and I get this error? After googling the web I find that this problem is caused by the .NET framework 3.5, so I put this on a machine where I didn't install .NET 3.5, but the problem is still there! 回答1: My attempt at psychic debugging: you're using a statement like: Response.Headers("X-Foo") = "bar" If this is indeed the case, changing this as shown below will work around the problem: Response.AddHeader("X-Foo", "bar") 回答2: Only IIS7 supports the

hosting .net 4.0 REST WCF service in IIS 6

你离开我真会死。 提交于 2019-11-27 01:59:42
问题 So i am on VS2010 running iis 7 with .net 4.0 I have a REST wcf 4.0/.net 4.0 services that runs locally very beautifully. On my local it is hosted on IIS at http://localhost/SOMENAME/ [WebGet(UriTemplate = "Ping")] public string CheckAuthenticatedStatus() { string userName; if (!AuthenticateUser(out userName)) { WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Unauthorized; return "Authenticaltion Failed"; } return "Ping Back - " + userName; } [WebGet

how can I share an asp.net session between http and https

感情迁移 提交于 2019-11-27 01:46:48
I read that a page which runs under an https connection cannot share an InProc Session (based on cookies) with another page (or the same for that matter) running under regular http. My site is running on Server 2003, IIS 6 and .Net 2.0. After some experiments it appears that a page which stores data in session while being connected through https CAN subsequently access the data even if running under plain http. So, is it possible or should I go over and look for flaws in the SSL configuration? John Rasch From MSDN : When a user moves back and forth between secure and public areas, the ASP.NET

Can I serve .html files using Razor as if they were .cshtml files without changing the extension of all my pages?

非 Y 不嫁゛ 提交于 2019-11-27 01:46:31
I manage a large asp.net site which has previously been converted from static html site to asp.net. For several reasons (mainly SEO) we decided not to rename all the files to .aspx back when we originally converted the site. This was very easy to do by simply adding the buildProvider and httpHandler to the web.config. <buildProviders> <add extension=".html" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> <httpHandlers> <add path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory"/> </httpHandlers> Now I am upgrading the site to use Asp.net WebPages with Razor cshtml

ASP.NET-MVC (IIS6) Error on high traffic: Specified cast is not valid

半城伤御伤魂 提交于 2019-11-27 01:29:25
问题 I just launched my tiny webapp on my humble dedicated server (Win2003)... running ASP.NET MVC, LINQ2SQL, SQL Express 2005, and IIS6 (setup with wildcard mapping) The website runs smoothly 90% of the times. However, on relatively high traffic, LINQ2SQL throws the error: Specified cast is not valid This error is ONLY thrown at high traffic. I have NO IDEA how or exactly why this happens. Caching did not remove this problem entirely. Anyone seen this problem before? are there any secret SQL

ASP.NET Session Mix-up using StateServer (SCARY!)

佐手、 提交于 2019-11-27 00:45:56
问题 We store two objects in session. Somehow, one of the objects from another user got loaded into a different user's session. The user should have had no access to this particular data, and as soon as they saw it they knew something was very wrong. We have visual proof of the data that was presented to him, and there is certainly no way it could've happened unless the sessions got mixed up. This is a very scary situation which we can not figure out (we can not reproduce it). The only answer for

Avoiding 401 response for each request using NTLM

蓝咒 提交于 2019-11-27 00:10:10
问题 We have here an asp.net 3.5 application using NTLM based windows authentication. The system runs on a private network that actually distributed over different geographic places (connected via VPN). We are now trying to optimize the website's performance. Because the way NTLM works, every new request to the IIS is composed with 3 different requests while the first 2 is 401 responses. We are trying to minimize the amount of these requests to be only at the beginning of the session. We found

Display custom error page when file upload exceeds allowed size in ASP.NET MVC

馋奶兔 提交于 2019-11-27 00:05:25
My main issue is that I want to display an custom error page when an uploaded file exceeds allowed size (maxRequestLength in web.config). When the big file is uploaded an HttpException is thrown before my upload action method in the controller is invoked. This is expected. I have tried to catch the exception in a custom attribute and also to override OnException in the controller. Why isnt it possible to catch the exception in either the attribute or the OnException method? Its possible though to catch the exception in Application_Error in global.asax but neither Response.Redirect nor Server

What exactly needs done to IIS 6 to serve cshtml pages?

末鹿安然 提交于 2019-11-26 23:15:33
问题 I have upgraded my site to .Net4 but when requesting a .cshtml file (even if it is pure html without razor) I get a Connection refused error. What's missing? Update: something changed and now I get a "This type of page is not served" error. I thought .Net4 was all that was required. 回答1: Turns out it was simply a matter of having the correct files in the bin dir and an entry in web config. Here's the list of files: Microsoft.Web.Infrastructure.dll NuGet.Core.dll System.Web.Helpers.dll System