I have a xml web service and I published it on IIS(localhost). Web service is veriy simple. There is only one method. And there is no exception potential in the web service. I have to use HttpWebRequest instead of adding web reference. I got the following error:
"The remote server returned an error: (500) Internal Server Error". I have checked request xml many times. When I add web referance there is no problem. What's reason of error?
Thanks in advance
Its not possible to tell what the problem is from the information you have provided.
If the web service is one that you have written then you need to get IIS to report a detailed error message on the nature of the problem (by default a restricted error message is shown to prevent would-be attackers obtaining potentially sensitive information), or find another way to obtain detailed error information. Exact instructions on how to do this will depend on the service itself (is this an ASP.Net web service? What version of IIS is this?) however this article - How to Use HTTP Detailed Errors in IIS 7.0 may be of assistance.
If the web service is one that a 3rd party has produced then I'm afraid you need to work with that 3rd party to fix this.
Update: Also try reading Detailed 500 error message, ASP + IIS 7.5 on how to get more detailed error messages.
Related
I was asked this question in a technical interview for a integration intern role.
He was digging much into understanding of SOAP web services.
Question). Consider that you are exposing a web service through SOAP to a Client.
The url through which you are providing the service is up and running when you check it.
But the Client has a problem, he is not able to access your webservice.
How will you go on troubleshooting this issue?
My response:
I would first check whether the url the client is trying to access the service is correct.
Will check the .wsdl file: port, bindings & will check once whether upon sending a SOAP request to the URL, am I receiving the SOAP response in local through SOAP UI.
If I get error, will troubleshoot based on the kind of error I get: Like page not found, null exception etc.
I felt he was still expecting some other point. He hinted saying where in what registry you will check all the web services which have been hosted(I guess this was much of a production support issue :P)
I told I may look into UDDI registry, but was not sure with this.
Please let me know your inputs on what could be possibly a right approach?
Apache jUDDI PMC here. Yes UDDI could be used to verify that the client is pointed at the right location, assuming the client knows where the UDDI server and that it is registered and the client knows what to query for on the UDDI server and a UDDI query is part of that client's normal workflow. That's a lot of assumptions but certainly feasible.
Most of time, the endpoint is in a config file somewhere or some idiot hard coded it.
That said, this my go to list for checking SOAP service connectivity (from the client's perspective)
DNS resolution of the hostname in the URL
Ping the remote host
HTTP GET to the URL of the SOAP service + ?wsdl (this usually works). This is also a good time to verify SSL connectivity.
You can also parse the WSDL doc, assuming one is returned for identify the endpoint url.
Finally if that all works, execute the service. HTTP 200 is general a positive sign
Edit:
Another alternative approach is to implement a very simple API (wsdl method) on every SOAP service that simple returns a true/false that answers the question "Am I open for business?". This method would provide a standardized approach for identifying if a service was available or not by testing an external dependencies (databases and whatnot).
This is my first time using IIS and it has become a big headache. The objective is to run a web application trough an IIS on a windows 2012 server. The application is hosted on tomcat 8.5.
The application runs perfectly on 'localhost:8000/application', but then an issue occur when trying to do the URL rewrite to 'application.domain.com'.
The URL correctly accesses the needed javascript files and styles the page correctly, but error code 500() is returned on a call to 'application.domain.com/subdirectory'. Unfortunately error 500 just implies some server error has occurred. The subdirectory is used to get data to the application and contain HTTP GET and HTTP POST methods.
My current implementation of the IIS:
I crated a new site 'application'. This site has an inbound and an outbound URL Rewrite reverse proxy rule.
I am suspecting that there could be issues with the RegEx pattern, but i am not sure.
I am aware that there are some implications routing tomcat trough IIS and i have attempted to solve that with Application Request Routing(ARR), but without luck. I set up the ARR with a tomcat server farm according to this guide but ended up with error 502.2 - "Bad Gateway" instead.
This is the first time i have to mess with these things, so it's likely I got it all wrong and there is a much simpler solution. Thanks in advance.
I am calling Web Service in my windows application(Web service is in same project). It works fine when I use it with test database, but when I change database schema to QA in web Service. It gives me error " “The remote server returned an unexpected response: (400) Bad Request”
The web service is same but still gets error when I change schema.This is Web Service, not WCF service and I am using VS2010. I am not understanding what is happening wrong here. Any help would be greatly appreciated. Thanks.
There is error in paramters you supply to webpage (webservice) of website. Check what you supply in headers of your request object.
Actually, one of the values in the DTO which was passed to webmethod was having some bad data(say, memberid="H00001\0\0\0\0"). I corrected this value and assigned to DTO before passing to webmehtod. And it worked fine. Thanks kostas ch. and Salahuddin for your help!
I've a web service, which is basically a #Stateless EJB annotated with #WebService, and other JAX-WS related annotations. I can deploy this bean on my machine's glassfish instance, and see its WSDL through Glassfish's administrative GUI. I can also call its methods without any problems, from a SE client.
When I deploy this web service to a server instance in any other machine, I can no longer browse its WSDL through glassfish, and the client fails to connect to the server. The message displayed is:
Invalid WSDL request: http://ip:port/context/serviceEndpoint?wsdl
The HTTP error returned by Glassfish on such request is 405 (method not allowed).
I browsed around, and couldn't get anything directly related to glassfish v3. There are issues open on Glassfish's bugzilla for version 2, meaning they're old and have been labelled as CLOSED/FIXED already.
Anyone ran into this before? Any help or any clues about what could be happening here?
Thanks in advance!
For the sake of those who might come across this problem one day: I had OpenSSO on the target server. And by many obvious reasons, it was a classpath clashing problem that prevented the WSDL to be generated by glassfish.
Once OpenSSO has been removed of the equation, everything worked as it was supposed too. So, even if you're not an OpenSSO user, check your classpath for multiple Metro instances, or any other JAX related library that might be conflicting with glassfish's own on your domain.
We have a hybrid WCF and ASMX web service currently being used on a decent sized project. Now, most of time everything works perfectly fine, however on rare occasions and seemingly randomly, the web service begins to block calls which returns a 401 Unauthorized error back to the page in question. It seems to be the ASMX service calls that are causing this, but given that's it doesn't occur often and isn't reproducible I can't say this for certain.
The error goes away after an IIS reset, and at least on one occasion it eventually just went away on it's own. We use Windows Authentication as the credential type with anonymous access disabled.
Anyone have any ideas about why this might be occuring?
The solution we finally figured out was a small registry edit to disable the loopback check that causes the login issues with IIS. We had actually had this registry edit floating around but had forgotten about it over time.
The key is located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Add a DisableLoopbackCheck DWORD with a value of 1 and that seems to take care of the problem
MS Support link: http://support.microsoft.com/kb/896861