I have created WCF REST service in vs2010(4.0) with WCF REST Service Template 40(CS). It works fine on localhost and local IIS (7.5), without giving me any errors. But while I am trying to deploy it on server, it gives me 500 Internal server error. I have deployed same way I did on locl IIS. It is not giving me more details about the error. When I checked the server log, it says service.svc - file does not exist. While I have not created .svc file, I did directly with given template.
Can any one please help me to find the solution to this...
Thanks in advance...
I am using template, so there is no .svc file. In this we can directly access the uri without .svc with the filename.
Chrome is just displaying me 500 Internal server error. It is not displaying any related information about error.
-
Satyen Pandya
finally I found the thing that causes error in my service. I have used MySQL database and for that reference to MySql.Data.dll file of older version, and when I upgraded that dll with newer version, my entire project was not responding. It was replaced my newer version and when I tested with older version, service is running fine.
And for hosting it on WCF, Normal procedure of hosting the site on IIS worked for me after solving above problem... And I better opt for going with .net 3.5 WCF Rest Service with .svc extension available.
Thanks all for reviewing my problem..
Take a look at similar post...
# hosting .net 4.0 REST WCF service in IIS 6
Related
I have been trying to host a WCF service for a Silverlight OOB application. When I run the application from my local machine it works fine. But when the same is deployed to a server, I get the following
Remote Server not found error.
I used fiddler to track the error and it says
HTTP/1.1 500 System.ServiceModel.ServiceActivationException
Could this be some issue with the IIS settings on the server?
You need to check two things,
1.Check for these two files in your service root folder clientaccesspolicy.xml and crossdomain.xml.
2.Check for the namespace of your service.you might be wrong on the namespace.
if these does not work post your web.config .
I deployed a MVC4 web application including a wcf service.
when i try to browse to the .svc file i receive Error 404.3 (Error Code 0x80070032).
I tried all the relevant answers i read:
1. adding a .svc mime
2. checking that the server's ISAPI filter include ASP.Net 4 bothe 32bit and 64bit.
3. checking that Server Managers Features include WCF Activation.
I already have a MVC3 web application with WCF service running on the same server.
Can you please point me to what can cause this problem?
I noticed that on IIS Manager in Handler Mapping there is a difference between the two domains running the applications. the working one is almost empty (include only StaticFile) while the new one has a long list of handlers enabled (I don't know if it is relevant or not).
Thank You!
I had to tick "HTTP Activation" in "Add Role Services" within Windows Server 2012.
Run command aspnet_regiis -iru in command prompt as an admin and try again.
Make sure the two WCF services are not running on the same port -- that is, you are not connecting to the MVC3 WCF service. See How to consume multiple WCF services from one client for how to do this.
I cannot access my WCF service in IIS 6.0 when running on a VM (Windows 2003 64 bit server).I have a local IIS as well on where I developed the service, and I can access my service fine over there. I built a deployment package and deployed it to the VM, however I just cannot get to it.
Particulars about the WCF service:
1 - Its REST based
2 - Using SSL
If I place a static HTML file in the directory where my service.svc file is, I am able to access that but I cannot access the service.svc file. I am doing all this using IE.
So for instance
Any help would be appreciated it. Thanks.
Couple of things to check:
ASP.NET is installed properly and is registered for IIS (aspnet_regiis -i). Best way is not to use a static file, but an .aspx file to see if the asp.net runtime is running.
Verify you are running a 64-bit binary for the wcf service. If you copied if from a local 32-bit OS, you might need to recompile it for 64-bit.
Did you use https localy also? if not, try to change the configuration of the service to use http (without ssl), check that it works, and then understand what is the required configuration for https.
I am implementing wcf service using the config-less available with WebScriptServiceHostFactory in dotNet 4. On my local development server the web service returns appropriate content in the response body. I tested the same on my local machine IIS 7 and it works great.
But, now I have moved the service on IIS 6 with SSL enabled. The service when invoked calls the web-method as usual, with no server exceptions. The response body is missing its contents.
The web-service is of the following format:
https:///qa/AjaxService.svc/MyMethod
I have verified the following:
1. Wild-card mapping set to aspnet_isapi.dll [Check file exists - unchecked]
2. Anonymous Authentication enabled
I would appreciated some input, if some has already experienced such a weird behavior.
Thanks
Well I resolved my issue by using WebServiceHostFactory instead. I still don't know what caused issues with WebScriptServiceHostFactory on IIS 6 and .NET 4.0.
I am still looking for any input/resolution with "WebScriptServiceHostFactory on IIS 6 and .NET 4.0"
I have built a simple WCF Service and deployed it to IIS6, and I'm noticing that it works in my Dev and Staging environments, but not Production. Every time I try to hit the service metadata link, I get a 404 page.
I've checked IIS config everywhere I can think of and they're identical, so the only difference I can think of is that the Production environment is load balanced.
Does anyone know of any issues with running a WCF service behind a load balancer, and how can I get around that? Am I on the wrong track, is there another common problem I should look into?
You need to setup wild card mapping on IIS6. This link seems like a good step by step guide.
Try reading up on the differences between the integrated pipeline vs classic pipeline on IIS7
For me .svc was already mapped to the aspnet_isapi.dll as per AnthonyWJones answer:
I kept getting 404's and nothing in the logs (C:\WINDOWS\system32\LogFiles\W3SVC1) helped, all my WCF settings and web.config were textbook examples. I triple checked all the permissions...
What my problem turned out to be was that I had built my WCF service in .Net 4.0, after I installed ASP.net 4.0 using aspnet_regiis -i -enable it worked straight away: