Blazor Server Side IIS Hosting Issue - iis

Pulling my hair out trying to set up a Blazor Server Side application on IIS.
I've already installed the application on one test server without too much difficulty however I've now run into difficulty deploying to the client's server.
To ensure the issue wasn't with my application I tested using the Blazor Server-Side template and the same issue is found.
If I open Microsoft Edge on the server and browse to the URL of the application everything works perfectly
However, if I browse to the same URL on my local Edge browser I get a redirect from https://portal... to the servers IP address https://172.16... and then a timeout.
Could this be caused by a firewall setting blocking something that Blazor requires or a DNS issue?
Note that if I just have the website pointing to a simple website then it works fine both on the server and on my local browser.

The issue was unrelated to Blazor and was instead caused by Firewall settings.

Related

Apache Webserver - getting security risk error on local network but not on public domain

I have an asp.net core MVC website running with an asp.net core Rest API on the same server. It was a bit tricky to set up the Apache2 configuration, but I finally got it working.
From the outside, everything works perfectly. I can access https://{domain}.com and it works, and I can access https://{domain}.com/api and it works too. I was getting a weird error, the MVC project couldn't find the api project even though I could find it from the outside.
In the same network, I have a linux machine with a GUI so I can browse to the internet from there. I discovered that https://{domain}.com gives a security error, and that is probably why the two projects can't communicate with each other.
In above screenshot ou can see what I get when going to that website. It works fine from a different network.
The server is configured with SSL using LetsEncrypt. The SSL is fine from outside, but apparently not from inside.
Here you can see my apache2 configuration.
My goal is that I can access https://{domain}.com from the internal network, I think that will solve my issue.

CrushFTP on Azure VM giving "405 Method Not Allowed error" for POST method

We had CrushFTP installed on an Azure 2012 VM that recently died, so to speak. We wound up spinning up a new VM and reattaching the original data disk to the new VM.
After configuring IIS for the web portal part of CrushFTP, and cleaning up some script errors on the landing page, which is now on a 2016 VM, we get an HTTP 405 error when trying to log in to CrushFTP.
I checked to make sure the VM accepts POST requests - it does. The confusing thing is when I check the browser console, it's saying the server is NOT accepting POSTS, and this is happening both on our company network and from outside the network. I can see from our work network it's an issue with our proxy server, but from my mobile device outside of the network, I see the exact same rejected methods.
Any ideas? I don't have a whole lot of code to share since CrushFTP is a black box.
EDIT: I think the IIS setup was a red herring. I was going off some notes from a former co-worker who set this up, but I don't believe she set it up in IIS.
From what I'm reading, the CrushFTP HTTP server needs to be exposed as a public app through port forwarding in the VM. Whenever I run Crush locally on the VM, everything works fine. But since I set it up in IIS it hasn't worked.
I figured it out. I had to add an "Allow" entry of POST in IIS.

NTLM on IIS 8.5 on Server 2012, second web site failing

Maybe you'll be able to help me out.
My situation is this:
We are migrating to from Win2003 to Win2012. We've got multiple web sites configured on the 2003 box and we can browse to each of the different names no problem at all, using Windows Integrated.
Well, we just fired up a Windows 2012 and started migrating to it but running into an ntlm 401 issue (log says specifically 401.2.5).
Changing the names to protect the innocent here:
Server Name: Server
going to http://server/apps/asmx/servivce.asmx works fine.
We have a second IP assigned to a new the same box, on port 80, but configured so we can go to http://conapps/apps/asmx/service.asmx. That should work, and return a simple wsdl, but it doesn't.
if we go to http://conapps/apps/anonymous/asmx/service.asmx, it works fine.
I've gone into the authentication tab, and have windows Integrated (and NTLM bubbled up to the top) but I keep getting the 401 errors. Ironcially, if I set anonymous on, it works as expected.
As I said, if I take the default web site, and configure it to point to the same physical files on the disk, it works fine. It's only when I try to go to the secondary name do I have problems.
So, anybody have any ideas what I might be missing?

IIS Browse link does nothing and 404 error

My client had to reinstall the whole server, so I redeployed my ASP.NET MVC app, but I can't browse it. I deployed successfully with the FTP and the website is in the proper local directory.
When I click the link (on the right panel of IIS) Browse crm on *:80, nothing happens. No error, no IE or Chrome opening, just nothing. I also tried to access the app by typing localhost or localhost/myapp (which should be the right path) directly in the web browser and I got
HTTP Error 404. The requested resource is not found
.
I did not install the IIS, but I did the configuration. Have I missed something?
Windows Server 2008 R2
All the roles previously activated have been activated
The MVC framework has been installed and SQL also.
Enabled the IIS tracing and it didn't trace anything
Make sure the application is running under the correct version of .NET. MVC applications targeting 4.0 running under a 2.0 application pool will return 404. Make sure the site binding is pointing at the correct directory of the application you just deployed. When all else fails, try putting a simple .html file into the site and accessing that through the browser. If that fails, it means that IIS is not set up to serve the site, so check bindings, application pools, and home directories.

Setup local IIS7 for testing websites

Is there an alternative, other then modifying HOSTS to setup temp domains when testing websites locally? I'm using IIS7 on Win7.
I don't want to use /localhost/domainname. I'd rather do /domainname so i don't have to worry about paths to files, etc. My websites are setup so that paths to files are relative to the root folder and not to the page.
Unless your code explicitly checks the domain name, you should be able to deploy on II7 and test through http://localhost.
There are few caveats with this approach, though:
if you are using third-party API that requires a key tied to the domain name of you app, you might have to request two keys - one for the domain name (for PROD purposes) and one for localhost (for DEV purposes). I do that with both Google Ajax API and Facebook Connect keys.
http://localhost is in different security zone in IE than regular internet sites, so if your app uses any AP that requires cross-domain communication (like Facebook Connect), you might have problems testing on IE7. Works like a charm on Chrome and seems to work properly on IE8.
if you are working on multiple apps at the same time, you can't have all of them listen on port 80 at the same time. SO, some of the apps will have to be moved to http://localhost:8080 or another port.
My approach is to run the VS Dev WebServer (Cassini) on ports 808x during developing and to deploy to the local IIS7 (using CruiseControl.Net) on ports 888x. This allows me to debug easily with VS while working on the code, yet still have the site set under medium trust on IIS7.
I also have a host name on the target domain pointing to my dev machine, so the IIS7 instances are available both as http://localhost:888x and http://dev.domain.com:888x, which allows me to also test the domain integration with Google Ajax and Facebook Connect APIs. Of course, this requires control over the domain DNS and the ability to add an A record to it.
However, note that nothing in this setup requires actual testing on the domain URL.

Resources