All asmx web services stop working with a port in the url - asp.net

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!

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.

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

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?

Trying to reload project but it says the following error issue IIS web server

The URL 'http:localhost:8081' for Web project 'XXX project name' is configured to use IIS Express as the web server but the URL is currently configured on the local IIS web server. To open this project, you must use IIS Manager to remove the bindings using this URL from the local IIS web server.
It's not allowing me to reload the project..May some thing went wrong while doing IIS set up...

Asp.net url routing traps asmx web service call

I have an Asp.Net 4.0 Web Forms project that uses url routing for user friendly urls, i.e hiding aspx-pages behind clear text urls.
In this project we have an asmx web service that serves some jQuery controls on the pages. Everything has worked fine so far on development machines and the internal testing site but now when we installed the project on a production site the asmx calls are trapped by the routing code.
We have a catch all route that is added last that shows the Not found -page.
When I open the web service on the server (http://localhost/service.asmx?op=MyWebMethod), enter some values and click Invoke I get the Not found page. The url that Invoke opens is http://localhost/service.asmx/MyWebMethod so it's all quite logical (service.asmx looks like a directory) but I don't understand how this can work on all other installations of the same project.
The production server is Windows 2008 Server R2 Standard, the project is Asp.net 4.0 and I haven't registered any StopRoutingHandler for asmx-files.
The web.config files are identical between the internal testing site and the production site and the machine.config -files haven't been touched to my knowledge.
routes.Add(new Route("{resource}.asmx/{*pathInfo}", new StopRoutingHandler()));

Web service URL being overwritten with localhost

I have a reference to a web service on a remote server like such...
http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl
The moment I invoke the web service and view its URL property it looks like...
http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx
Can anyone tell me why it's overwriting the remote server with localhost? The vendor that provided the web service said I have to reference the wsdl and not the asmx in order for it to work. I've tried running it both within IIS and as a web app on the filesystem and neither scenario work. This is on the .Net 3.5 framework.
Since this is a legacy ASMX web service, it is hosted by IIS. IIS determines the URL it thinks the service is at. Look at the IIS configuration for the site where the service is hosted. In particular, look to see if a host header is set.

Resources