IIS | Ruby dsl for IIS management
kandi X-RAY | IIS Summary
kandi X-RAY | IIS Summary
Ruby dsl for IIS management
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of IIS
IIS Key Features
IIS Examples and Code Snippets
Community Discussions
Trending Discussions on IIS
QUESTION
I attempt to lunch my ASP.NET Core project in Microsoft Visual Studio 2019 and got this error: "Unable to connect to web server 'IIS Express'"
- Visual Studio 2019 Version 16.9.5
- .Net 5.0
ANSWER
Answered 2022-Feb-09 at 19:10I tried this one and it worked for me:
Go to 'Debug Properties'
Find 'Web Server Settings'
Change the port in 'App URL' section and save the changes
Run the application and the same error will appear again
Switch the port back to the original port and save the changes
Run the application and enjoy it!
I hope this trick work for you.
QUESTION
I've updated Visual Studio 2022 to 17.1.0 recently and I now have this weird error, but not on every project (on only one up to now). I've tested other projects and they still work fine.
But this one project won't publish to IIS. It builds/runs locally, it can publish to a Folder profile, and a previous version is working in IIS.
It's a .NET 6.0 web api project.
In the Output window I can see these 2 errors:
...ANSWER
Answered 2022-Feb-28 at 06:09Remove package Microsoft.VisualStudio.Containers.* || Microsoft.VisualStudio.azure.Containers.*
QUESTION
My new Macbook Pro running on an M1 Max (ARM) chip just came in. I installed Parallels and Windows 11 Preview for ARM, and Visual Studio installs / launches / builds my solution beautifully. Unfortunately the turn windows features on or off dialog doesn't have the option for installing IIS, and others have posted that this is not supported in Windows 11 for ARM.
Our dev team runs multiple ASP.NET Core 3.1 websites locally under IIS using subdomains, e.g.: https://auth-dev.mydomain.com, https://web-dev.mydomain.com, https://webapi-dev.mydomain.com. This was easy to set up in IIS using the bindings dialog, I could specify for port 443 (https) to use a certain subdomain and our dev SSL certificate.
Now I need to figure out how to make this work on Windows 11 ARM. Developing on an inferior non-Macbook Pro laptop doesn't seem like a great solution for .NET devs, I have to assume others with M1 chip Macbook Pros have run into this same issue. What are my options?
I first started looking into using IIS Express, but it seems like every website has to run on a different port, whereas I need them all to run on port 80 (just with different subdomains.) I'd be fine with them running on different ports if there was a way to forward those various ports to the subdomains, but it doesn't seem like the windows HOSTS file supports that.
I also looked into using the Apache web server for Windows, but I read somewhere that it doesn't support running ASP.NET Core apps.
...ANSWER
Answered 2021-Dec-05 at 17:14You can download the ASP.NET Core Runtime or .NET 5.0 SDK to allow you run to run ASP.NET applications on Windows, Mac or Linux. See https://support.microsoft.com/en-us/windows/downloads-for-windows-32490f9b-01ee-c13e-b2af-b5057c2d34e8
QUESTION
I've searched several SO posts and haven't found what I'm looking for. It might exists but might be fairly old enough to not show up for me. I found a post (Nginx rewrite: add trailing slash, preserve anchors and query strings) so close to what I need, but it's regex solution does not work for URL Rewrite for IIS, unless I'm doing it wrong.
Problem
I'm trying to add a forward slash /
to the end of my url paths while also preserving any existing for query strings ?
and anchors #
.
Desired Solution
Basically, here's the desired results to each problem:
...ANSWER
Answered 2022-Feb-03 at 08:13You can try with this regex https://regex101.com/r/6TSqaP/2. This is matching every provided example and solves the problem if the url already has an ending '/'
.
QUESTION
I have an ASP.Net Webforms website running in IIS on a Windows Server. Also on this server is the SQL server.
Everything has been working fine with the site but now I am seeing issues with using a DataAdapter to fill a table.
So here is some code, please note it's just basic outline of code as actual code contains confidential information.
...ANSWER
Answered 2021-Nov-27 at 15:53Microsoft.Data.SqlClient 4.0 is using ENCRYPT=True by default. Either you put a certificate on the server (not a self signed one) or you put
TrustServerCertificate=Yes;
on the connection string.
QUESTION
We have a Web API (.NET Core 5) which passes the request on to another remote Web API.
The Web API grabs some cookies from the incoming request and appends them to the outgoing request.
Normally this works fine and we see the request cookies arriving at the remote Web API.
But when multiple requests are sent simultaneously, the cookies from one incoming request are somehow leaking over into the outgoing request of another.
This even happens when using totally separate users and totally separate browsers.
Things I've tried and confirmed:
The code which copies the cookies from incoming request to outgoing request works perfectly fine. In fact even when the cookies appearing on the remote API are "leaked", my custom logging suggests it still worked as expected
I can see the expected/leaky request cookie on the remote Web API (in its raw IIS logs), so it can't be the remote API adding it to the request in its pipeline.
Added logging to the HttpClient call but can't see the unexpected cookies being sent.
This doesn't happen locally
My feeling is something is happening in HttpClient somehow??
UPDATE 1 I added logging to
CopyCookieHandler
and it only gets created once and reused by all requestsUPDATE 2 I just read that
HttpMessageHandler
instances results inCookieContainer
objects being shared...which may possible explain this... https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-5.0#cookies
The first API has this setup to use HttpClient:
...ANSWER
Answered 2022-Jan-06 at 15:39It turns out that, by default, the HttpClientHandler
will store the response cookies in a CookieContainer
and then append them onto the next request.
This explains why I was seeing extra cookies on the remote API's requests, but they were actually coming from the response of a previously completed request.
This documentation led me to the fix
So by adding this code:
QUESTION
Using an existing .NET 5 MVC Web App, I attempted to upgrade to .NET 6, but encountered this error. I am also using IIS for Windows Authentication--now setup in .NET 6 as "profiles" under Properties -> Debug -> hyperlink (Open debug launch profiles UI). I also included the newer "Microsoft.AspNetCore.Authentication.Negotiate" Nuget package (and associated code) to handle the newer Windows Authentication library.
When the web app launches, I get the following error:
An unhandled exception occurred while processing the request.
InvalidOperationException: Cannot find compilation library location for package 'System.Security.Cryptography.Pkcs'
Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths(ICompilationAssemblyResolver resolver, List assemblies) Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths() Microsoft.AspNetCore.Mvc.ApplicationParts.AssemblyPartExtensions+<>c.b__0_0(CompilationLibrary library) System.Linq.Enumerable+SelectManySingleSelectorIterator.MoveNext()
...
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
This does NOT go away if I add the package listed: System.Security.Cryptography.Pkcs
...ANSWER
Answered 2022-Jan-05 at 21:36I needed to remove at least 1 Nuget package:
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -- I removed this one second, but it started working after I did.
- Microsoft.Extensions.Hosting -- I removed this one first, but this alone did not fix it. I don't know if this "also" needed to be removed. I assume not, but I'm including, just in case. Removing it did not hurt anything.
Edit: As a WARNING, this will lose the abilities given by Razor.RuntimeCompilation. However, there appears to be a code incompatibility with, I believe, IIS and Razor in .NET 6.
QUESTION
I have installed the relatively fresh Visual Studio 2022 on a Windows installation. The work I do often requires administrative privileges (local IIS). To do this I have two users, one 'normal' account that is logged in to Windows and one administrator account. When starting VS2022 with the administrator account, an error keeps coming. It happens especially during debugging and it reads as follows:
...ANSWER
Answered 2021-Dec-17 at 15:50My best solution so far is to create a shared folder.
I decided to make C:\Users\\AppData\Local\Temp\VSWebView2Cache\
shared. The "VS
" prefix indicates that this is a Visual Studio-specific folder, and I think it is acceptable that my normal user can have access to that folder as it seems to contain temporary Visual Studio files.
To do so I logged in to Windows with the administrator account. I navigated to the folder and made it a shared folder. I added my no-admin user with "Read/Write" privileges. I then tested by logging out of the admin account and into my no-admin account. There I first tried the full path in File Explorer and was granted access to the folder. I then tested with VS2022 and during debugging no error box appeared and files were generated in the folder.
If anyone finds a better approach, I'd really like to hear about it. Also if you have knowledge to why this approach is either good or bad, that would be highly appreciated as well.
QUESTION
We are having difficulties choosing a load balancing solution (Load Balancer, Application Gateway, Traffic Manager, Front Door) for IIS websites on Azure VMs. The simple use case when there are 2 identical sites is covered well – just use Azure Load Balancer or Application Gateway. However, in cases when we would like to update websites and test those updates, we encounter limitation of load balancing solutions.
For example, if we would like to update IIS websites on VM1 and test those updates, the strategy would be:
- Point a load balancer to VM2.
- Update IIS website on VM1
- Test the changes
- If all tests are passed then point the load balancer to VM1 only, while we update VM2.
- Point the load balancer to both VMs
We would like to know what is the best solution for directing traffic to only one VM. So far, we only see one option – removing a VM from backend address pool then returning it back and repeating the process for other VMs. Surely, there must be a better way to direct 100% of traffic to only one (or to specific VMs), right?
Update:
We ended up blocking the connection between VMs and Load Balancer by creating Network Security Group rule with Deny action on Service Tag Load Balancer. Once we want that particular VM to be accessible again we switch the NSG rule from Deny to Allow.
The downside of this approach is that it takes 1-3 minutes for the changes to take an effect. Continuous Delivery with Azure Load Balancer
If anybody can think of a faster (or instantaneous) solution for this, please let me know.
...ANSWER
Answered 2021-Nov-02 at 21:22Without any Azure specifics, the usual pattern is to point a load balancer to a /status endpoint of your process, and to design the endpoint behavior according to your needs, eg:
- When a service is first deployed its status is 'pending"
- When you deem it healthy, eg all tests pass, do a POST /status to update it
- The service then returns status 'ok'
Meanwhile the load balancer polls the /status endpoint every minute and knows to mark down / exclude forwarding for any servers not in the 'ok' state.
Some load balancers / gateways may work best with HTTP status codes whereas others may be able to read response text from the status endpoint. Pretty much all of them will support this general behavior though - you should not need an expensive solution.
QUESTION
I have a busy ASP.NET 5 Core app (thousands of requests per second) that uses SQL Server. Recently we decided to try to switch some hot code paths to async
database access and... the app didn't even start. I get this error:
The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
And I see the number of threads in the thread pool growing to 40... 50... 100...
The code pattern we use is fairly simple:
...ANSWER
Answered 2021-Dec-11 at 12:54Well, after a bit of digging, investigating source codes and tons of reading, it appears that async
is not always a good idea for DB calls.
As Stephen Cleary (the god of async who wrote many books about it) has nailed it - and it really clicked with me:
If your backend is a single SQL server database, and every single request hits that database, then there isn't a benefit from making your web service asynchronous.
So, yes, async
helps you free up some threads, but the first thing these threads do is rush back to the database.
Also this:
The old-style common scenario was
client <-> API <-> DB,
and in that architecture there's no need for asynchronous DB access
However if your database is a cluster or a cloud or some other "autoscaling" thing - than yes, async
database access makes a lot of sense
Here's also an old archive.org
article by RIck Anderson that I found useful: https://web.archive.org/web/20140212064150/http://blogs.msdn.com/b/rickandy/archive/2009/11/14/should-my-database-calls-be-asynchronous.aspx
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install IIS
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page