iis-express

ASP.NET MVC website getting redirected to local IIS instead of IIS express on any browser

为君一笑 提交于 2019-12-01 05:59:46
问题 Aim: Locally run ASP.NET MVC website on IIS express on any browser. History: The project in concern is an ASP.NET MVC website which initially was setup to use Local IIS with SSL enabled. I tried to set it up on IIS express: RouteConfig.cs file public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "_View", id = UrlParameter

How to set the request timeout for one controller action on IIS and IIS Express

允我心安 提交于 2019-12-01 04:33:52
I need to increase the request timeout for a specific controller action in my application programmatically in the controller. The best way I have found so far to handle a long running script (if your application simply can't avoid having one) is to firstly create an async handler: public async Task<IActionResult> About() { var cts = new CancellationTokenSource(); cts.CancelAfter(180000); await Task.Delay(150000, cts.Token); return View(); } In the snippet above I have added a Cancellation token to say that my Async Method should cancel after 180 seconds (even though in this example it will

IIS Express Does Not Seem to Be Picking Up Changes to applicationhost.config

断了今生、忘了曾经 提交于 2019-12-01 04:14:55
问题 I followed the accepted answer to this question to try to get my .Net web application to run under a specific set of credentials when debugging locally via the IIS Express server running on my machine, however, I can't seem to get the changes to pick up. Admittedly, I have no idea how to verify what is actually happening, but the behavior I'm seeing leads me to believe that the web app just continues to run under my own Windows credentials. I've stopped the IIS Express processes via System

HttpRequestMessage.GetClientCertificate() returns null in Web API

我是研究僧i 提交于 2019-12-01 03:51:29
I have a .NET4.5 WebAPI 2 app that uses SSL Client Certificates for some custom security related checks. When debugging the app, request.GetClientCertificate() returns null for any service call, no matter what I tried so far. The Tested Code: Basically, on my service's side, I have a method that goes something like this: class CertificateChecker : ICertificateChecker { public bool Check(HttpRequestMessage request) { var cert = request.GetClientCertificate(); } } My unit tests with the client cert attached to the request using request.Properties.Add(HttpPropertyKeys.ClientCertificateKey, cert)

How to set the request timeout for one controller action on IIS and IIS Express

心已入冬 提交于 2019-12-01 03:33:59
问题 I need to increase the request timeout for a specific controller action in my application programmatically in the controller. 回答1: The best way I have found so far to handle a long running script (if your application simply can't avoid having one) is to firstly create an async handler: public async Task<IActionResult> About() { var cts = new CancellationTokenSource(); cts.CancelAfter(180000); await Task.Delay(150000, cts.Token); return View(); } In the snippet above I have added a

Slow page refresh times during development

末鹿安然 提交于 2019-12-01 02:22:54
We have a reasonably large ASP.NET MVC app that I work on in Visual Studio 2012 on Win 8. I have a strange issue with slow page load times after recompilation. Usually, the actual build time is about 5 seconds, then the browser opens up and it takes 1-2 minutes to load the page. Some points: It loads slowly whether I change a view or recompile the project completely This is not a performance issue, everything else works really well, there is enough RAM etc. It happens only with IIS Express. When I switch to the default development server, it works fine. All the other devs in my team use IIS

HttpRequestMessage.GetClientCertificate() returns null in Web API

徘徊边缘 提交于 2019-12-01 00:38:41
问题 I have a .NET4.5 WebAPI 2 app that uses SSL Client Certificates for some custom security related checks. When debugging the app, request.GetClientCertificate() returns null for any service call, no matter what I tried so far. The Tested Code: Basically, on my service's side, I have a method that goes something like this: class CertificateChecker : ICertificateChecker { public bool Check(HttpRequestMessage request) { var cert = request.GetClientCertificate(); } } My unit tests with the client

IIS Express or Cassini

不想你离开。 提交于 2019-11-30 21:18:44
I'm a little confused about something. I am using Visual Studio 2010 and am a little unsure whether VS 2010 uses IIS Express or Cassini when running web applications. What is the difference? Thanks, Sachin VS 2010 SP1 supports both IIS Express and Cassini (VS 2010 supports only cassini). You can configure your project to use IIS Express or Cassini. By default VS 2010 SP1 uses Cassini and to change right click on your web site/web application and select "use iis express". (When IIS Express used you would find a IIS Express tray icon and there you can see all the running sites) I think this

Wildcard hostname in IIS Express + VS 2015

纵然是瞬间 提交于 2019-11-30 18:42:28
I have a multi-tenant application that is accessed in production as customer.ourdomain.com . For local development with IIS, we use a custom wildcard domain, company-localdev.com . With IIS, this works without any particular configuration. IIS Express, on the other hand, only binds to localhost . We have an ongoing migration project to ASP.NET 5, and we'd like to use IIS Express for an easier developer experience. Is it possible to have IIS Express listen to *.company-localdev.com:1234 ? Bonus points if this can be automated so a developer can have it working just by opening the solution in

Mini Profiler does not render scripts

元气小坏坏 提交于 2019-11-30 18:23:48
I've added Mini Profiler through NuGet and though in a really simple project works lovely , this is a big and existing project, and of course that I'm getting some problems with it :( it writes the correct script tags in the source code as <link rel="stylesheet" type="text/css" href="/mini-profiler-includes.css?v=1.9.0.0"> <script type="text/javascript"> if (!window.jQuery) document.write(unescape("%3Cscript src='/mini-profiler-jquery.1.6.2.js' type='text/javascript'%3E%3C/script%3E")); if (!window.jQuery || !window.jQuery.tmpl) document.write(unescape("%3Cscript src='/mini-profiler-jquery