.asmx service works with example.com but gets 404.3 at www.example.com - asp.net

On IIS 10, Windows Server 2016 I have a service installed as an application virtual directory. My binding for the site is *.example.com.
If I navigate to the service as http://example.com/svc/service.asmx, it works. If I navigate using www.example.com, I receive a 404.3 Cannot be served because of the extension configuration.
What makes it even more confusing is that I have another web service in another virtual directory that works just fine under either URL. Both of these services were originally running on a Windows 2003 server and have been migrated over.
Since this works without www, I don't think I need any kind of handler specified. I'm stuck at knowing if this is an application configuration (web.config) or an IIS configuration issue, or both?

Related

unable to view my IIS hosted site from remote machine but IIS page open

The IP of the machine is suppose 104.68.125.105
In this machine, I configured the IIS server and successfully opened my web app http://merchantcalc/content/lateFine.aspx from inside this machine. This app has default port i.e. 80
But when I tried to open the same web app from remote computer, via url
http://104.68.125.105/merchantcalc/content/lateFine.aspx
I am getting error as ::
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
when I open
http://103.69.125.101/ from remote machine, its showing the IIS page.
But why can't I open the web apps? What configuration should I make in IIS to open my web app ?
As Mark said, if you can access http://merchantcalc/content/lateFine.aspx, then you should try http://103.xx.xxx.xxx/content/lateFine.aspx.
Did you host the web site under another website or you just publish the web app as a virtual application under your Default web site? It seems that when you access the website, http.sys is routing the request to Default Web Site. So if this is not the right site that should be routed. You could try to disable Default Web Site and bind your ip address to your web app.
Since there are various kinds of 404 error. You could check the sub-status code by enabling IIS detailed error or failed request tracing.
PS: Expose your public IP address is not recommended.
If you could provide more information, we may get to know how to fix this 404 error.

How can I enforce IIS 8.5 Web Deploy to use SSL (HTTPS) Only

I've just set-up a website on Windows 2012 (IIS 8.5).
I'm using Visual Studio 2013, and I'm wanting to configure Web Deploy so that our developers can only deploy over SSL (HTTPS).
In the website settings I've configured the SSL for the site;
For the website binding, I only have HTTPS present;
However it seems that I can still publish using WebDeploy over HTTP and I can browse to the site using HTTP, even though the file in this case wasn't found.
My main requirement is to stop developers being able to publish over HTTP. How can I achieve this ?
I think you should try to redirect all HTTP Requests towards HTTPS
URL rewriting in IIS 7+:
http://blogs.msdn.com/b/kaushal/archive/2013/05/23/http-to-https-redirects-on-iis-7-x-and-higher.aspx
Make sure that you don't have another IIS web site (usually the Default Web Site) that binds to port 80 with All unsigned IP address and no host header. That kind of site is a "catch-all" site that gives you the 404.

All asmx web services stop working with a port in the url

We have some asmx webservices that are hosted on a local server e.g http:// 192. 168.180. 102/webservice.asmx
However when these are hosted in IIS with another a port or alias e.g
http:// 192. 168.180. 102:8000/webservice.asmx
or http://somehostname:8000/webservice.asmx
..then all the web services on the server just stop working returning 404 errors, however all the other aspx pages work fine. Is there something I'm missing here?
Also if it helps, the .asmx is not hosted separately in IIS, its inside a web application which is hosted in IIS.
This is what the windows error shows for each request made to any aspx page trying to connect to any asmx web service:
Exception type: WebException
Exception message: The remote name could not be resolved
Its so weird, because its hosted on the same setup!

ASP.NET and IIS 7.5 - HTTP Error 403.14 - Forbidden

I try to configure IIS 7.5 on a new server (Windows Server 2008 R2), in order to run an ASP.NET 4.0 application. Two "domains" are defined on the server (managed with Parallels Plesk), each one appearing as a site in IIS. One domain is for the public site, the other is used for tests. At the present time, the DNS of the test site points to that new server while the DNS of the public site still points to our old server. We transfer the test site first, to see if everything is OK, before transfering the public site to the new server.
Pointing to the test site in IIS, if I run the Browse command on the folder of the application, I get the HTTP Error 403.14, with the message: The Web server is configured to not list the contents of this directory. The strange thing is this: if I put the exact same folder structure in the other domain on the same server, and I run the same Browse command, I see the default page of the application (I don't know if everything works after that but, at least, the first page shows up as expected). I should add:
Both sites use the same application pool.
Both sites have the same permissions (I checked one by one, also compared with cacls)
The default page is not set in IIS but is the authentication form specified in Web.config
So, same setup but different results. I don't know if there is something else that I should check. I am on very shaky ground when I talk about server configuration and IIS; so I hope that this description is clear enough and makes sense.
I think I found it. It probably doesn't work for both sites on the new server. When I run the Browse command, it shows the page in IE using the DNS of the site. Since the DNS of the public site still points to the old server, the page displayed in IE is not from the folder that I clicked, but rather from the old server site.
I can now look for standard solutions to the 403.14 problem on the new server...

Run ASP.NET application as Default Web Site on dev machine

I am trying to run my ASP.NET Web Application Project in my Local IIS Web Server instead of using the Visual Studio Development Server. It seems to only allow me to run my application in a Virtual Directory off of the Default Web Site. However, I would like to run the application in the root of the Default Web Site itself.
I go into the properties of my project, go to the Web tab, click the User Local IIS Web server radio box, and change the Project URL to http://localhost/. However, when I attempt to save, it tells me I need to configure the Virtual Directory, although I am not using a Virtual Directory.
Has anybody made this work before? Thanks!!
It sounds like localhost port 80 is already in use.
IIS creates a default web site that listens on localhost port 80. Have you disabled that before trying to add yours?
Another approach is to have your site listen on a different port, 81 for example.
So far I used a Post-Build event to copy the contents of my project to c:\inetpub\wwwroot\ and I set the Start Action's Start URL to http://localhost/. Not very elegant, but it gets the job done. I would love for somebody to include a more elegant solution.

Resources