I have a webservice which I deployed on a server which is a domain controller. When I try to run any webmethod from the webservice, I get http 500 internal server error. When I set breakpoints in the webservice code in VS.Net 2003, it seems no code is executed at all before the internal server error occurs. Even when I use VS.Net on the server to create a simple webservice, the webmethod will not execute and I get internal server error.
Can anyone help me with this problem? Is there anything to do with domain controller issues?
Thanks!
The problem may exist in 3 major areas.
1) IIS's WWW Service2) ASP.NET Runtime3) Your web service project
Check if IIS Service is up and running by accessing any HTML page in any of the virtual directory. If it can be access, then IIS is okay.
Secondly, deploy simple ASP.NET web application on the server and check if it is accessible. If your ASP.NET runtime is doing fine, you should see the page render correctly.
If all of the above testings are fine, then it is most likely to do with the Web Service project itself.
Maung Maung
The first 2 testings are fine.
But I just cant't figure out what is wrong with the webservice. Even when I try to run a simple "Hello World" webservice, it gives the error.
Any hints?
Thanks,
chwr
Create a new web service project and test. Don't use the existing project.
If it doesn't work, the last thing you could do is to check if Machine.Config settings are tempered.
Open the Machine.Config from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG folder.
Look out for <webservices> element and see if it is fine.
It should go something like that.
<webServices> <protocols> <add name="HttpSoap1.2"/> <add name="HttpSoap"/> <!-- <add name="HttpGet"/> --> <add name="HttpPostLocalhost"/> <add name="Documentation"/> </protocols> <!-- ... Other elements --></webServices>
Probably, the protocols required to debug are disabled. You need HttpPostLocalhost protocol to do testing/debug in VS.NET.
Without that you can still using from the client using SOAP.
Hope it helps a little.
Creating a new webservice doesn't work, and the Machine.config file looks fine.
Just what is wrong with the webservice?????
You can't create web service project? or...
You can create the project but can't debug?
Check your machine.config to see if it has something like this?
<httpHandlers> <add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/></httpHandlers>
The machine.config has this entry.
I can create the project. I can also debug. It's just that when I click on the Invoke button to run the webmethod, I get the http 500 internal server error page.
Then it is very simple already.
SOAP exception cannot be interpret by browser, so it is displayed as HTTP Internal Server Error.
So what you can do is, build winform client and call the web service using SOAP.
Win form exception handling can display SOAP exceptiong clearly when you display Exception object ToString method.
Then you can find out what goes wrong.
I built a webapplication to call the webservice and it gets the error
File or assembly name bmwozqhc.dll, or one of its dependencies, was not found.
And each time the webapplication is run, it gives a different dll name eg ntxaib-3.dll, m7pd8g-m.dll, fxbyhc1e.dll, etc
Any idea what is wrong?
Something wrong with XML Serialization.
XML Serialization generates a dynamic serializer in C# language and JIT compiles to some DLLs.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconintroducingxmlserialization.asp
For more information, check out the above link.
I got that problem before but don't know how to solve it.
I have that problem in the class, which I taught, and before I could find out the solution, the course is over and hard-disk reformatted.
Thanks a lot for your help! I read the article in your link and it mentioned something about webservices using the Temp folder for serialization.
So I went to set the permissions on the folder C:\WINDOWS\Temp and the webservice is working now!
Regards,
Oh I see
Thanks for sharing your solution with the rest of us.
Now I know what to do when I have that silly problem again...
Hm... It did not work for me.
I read the article and there it mentions TEMP environment variable which does not point to %SystemRoot%\Temp but to Temp folder in the profile path ( C:\DOCUME~1\username\LOCALS~1\TEMP). I gave the user account, under which visitors authenticate (IUSR_machinename in my case), and the group account IIS_WPG (which has NETWORK SERVICE, under which credentials the application runs in my case, as a member) full control NTFS security rights on my %SystemRoot%\Temp, on C:\DOCUME~1\username\LOCALS~1\TEMP, where username is of the admin user currently logged in, and on %SystemRoot%\Microsoft.NET\Framework\v2.0.50727. Still no improvement. I am positive that there is no other sane place where I could give those accounts additional rights since I am not prepared to give them full control on %SystemRoot%.
Any other ideas, perhaps or should I also do some deep debugging?