WebScriptServiceHostFactory wcf service in IIS 6 - wcf

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"

Related

WCF service streaming - Console host vs. IIS host

I've created a streamed wcf service based on that example: http://www.codeproject.com/Articles/112655/Progress-Streamed-File-download-and-Upload-with-Re
With console host works everything fine, the upload and the writing run "parallel". But if I host the service in IIS, it seems, that the stream is buffered on the server side.
Why? What is the difference? Is the service with console host not reliable?! (I need reliable streming!)
How can I avoid that with IIS host?
How do you know its buffered? Check the config file on the client side after proxy generation. Sometimes the proxy generated config file has incorrect transfermode.
When you start writing the file on the client, don't any see any chunk wise increase in the size of file?
The hosting shouldn't affect the transfermode.
The only difference between IIS and Console would be the way activation/deactivation is managed.
I've found it: Getting Streaming in IIS Hosted WCF service to work
I think this is a known issue (streaming with .net 4.0 and iis 7).
When a WCF service using streaming is hosted in IIS then ASP.net
buffers the request at its layer. The request does not even come up to
WCF until ASP.Net is done with it.
This should work when using non-HTTP transport IIS or hosting in a
non-IIS host.
(Zulfiqar Ahmed)
on contacting the product team - they said it would be fixed in .NET
4.5 as its too big to be issued as a patch.
And it works with .NET Framework 4.5

.Net 4.5 WCF Error 404.3 on IIS 7.5

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.

Cannot access WCF service in IIS in a VM (Windows 2003)

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.

Unable to host WCF REST Service 40(CS) on IIS 7

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

how to debug a WCF service once it's out of dev env

I have a WCF service that i've been able to communicate with fine while it's hosted locally.
I have it deployed to a web server in IIS now, and I can get the wsdl file without error by navigating to http://site.com:8000/service/servicename.svc?wsdl
in trying to test this, i've created a console app and was able to successfully add a service reference to this. But when I try to run a Get() method on the service reference, it just hangs with no response.
How can I begin to debug this?
Thanks!
When you have a service that works in dev but not in IIS, it is often due to a problem with the WCF configuration:
Is the configuration in place (since you can add service reference it probably is)
Is the protocol you are using available. The configuration you are using must match what is turned on. For example are you using nettcpip binding without WAS.