Hosting WCF service in IIS results in an error - web-services

When I try to host my WCF service in IIS, I got this error:
The DefaultHttpHandler.BeginProcessRequest method is not supported in the integrated IIS pipeline mode.
How to fix this? Didn't find the solution in google.. (Or I have not searched well enough)

To be more specific:
I made in Visual Studio a new solution: With 2 projects:
1) HelloAcmeClient
2) HelloAcmeService
This solution is stored in: D:\robbe\Documents\Visual Basic\repos\HelloAcmeService
For my IIS, everything is stored in: C:\inetpub\wwwroot\HelloAcmeService
My map looks there like
The IIS-map where I store everything
I know this is working because, I tested it with a stuff.html file.

Related

What's Owin got to do with WCF?

I have a WCF Service project. It builds with no error and runs in Visual Studio (2015). When I attempt to access the service page via the Browser, for example, http://localhost:59007/MyServiceEndpoint.svc it shows a yellow screen of death with references to Owin.
Hello ?! Whats OWIN got to do with it? I've used WCF before OWIN was invented, did not use OWIN before and don't intend to use now. I checked my Proj References, and there is no reference to Owin Dll's anywhere. What's going on?
It turns out even though I was not referencing OWIN anywhere in my WCF project, somehow the OWIN DLL's (Microsoft.Owin.dll, Microsoft.Owin.Host.SystemWeb.dll, Microsoft.Owin.Security.dll, Owin.dll, Microsoft.Web.Infrastructure.dll) were present in the /bin of my WCF project.
I deleted all of them manually and now the yellow screen of death is gone !
It may also work to add this to web.config's appSettings:

ColdFusion 11 gives IIS 500.0 error when accessing a .cfc

We are testing our cf code (which all works fine on a CF9 Windows Server 2008 machine) for migration to a CF11 Windows 2012 R2 machine. We have a test machine setup and all the code moved over and so far the cfm pages seem to work fine as well as the Application.cfc page but when we call a cfc via AJAX or we visit the cfc methods directly we get an IIS 500.0 error Application could not be found. If I look in the application.log for CF all I see for the error is "Application could not be found. The specific sequence of files included or processed is: ""
Anybody else run into this?
We had the same problem. We upgraded the Java SE Runtime Environment to 1.8.0_91 from 1.8.0_66, restarted ColdFusion and it fixed the issue. Find your upgrade here:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Renshi, (or for others finding this in the future), is the request which is failing one where your URL referred to a folder off your webroot called /api?
If so, then the error you got is due to a change in CF11 (update 11) which effectively made/api a "reserved url" for CF, in support of the REST services feature added in CF11.
You can implement a workaround to the problem (assuming you don't intend to use CF's REST feature in ANY CF app) by commenting out the few lines that refer to the "/api" servlet-mapping in CF's web.xml file. For more details, see this blog post:
http://chads-tech-blog.blogspot.com/2017/03/coldfusion-2016-broke-my-api-and-how-i.html

Setting up RoadKill

I am trying to setup a internal wiki site for project documentation project. I am using roadkill because I have a IIS server and a .net environment.
So the installation instructions aren't much. Unzip the files onto a site directory. Navigate to http://arwiki
Should be that simple, however, I get an error about directory browsing and it looks like there is no MVC mapping in Global.asax. It points to a internal dll so it is hard to determine what I did wrong?
Has anyone setup Roadkill and know what I did incorrectly?
Also there is no tag for roadkill
You can ask for help on the issues board -
https://bitbucket.org/yetanotherchris/roadkill/issues?status=new&status=open
However I can tell you that the problem is most likely that you don't have MVC installed on IIS (if it's Windows Server 2008). You might also need to enable ISAPI filters, they can be turned off.
The ASP.NET web installer contains the MVC bits you need, although Roadkill does come bundled with these.

Web service on iis not updated

I deployed a web service to iis 7, it was working all the way right.
Then I wanted to update the code of a web method in the web service.
I recompiled the service and updated the dll in the iis directory with the new one.
My problem is when I invoke the service, it invokes the older code.
I tried changing the number of parameters passed to a web method inside the service, and when invoking it still sees the older parameters which I erased.
Web services after Framework 2.0, are compiled as DLL files by default as far as I know. Normally, this happens when you PUBLISH the website and webservice, or when you use Web Applications.. But in WebServices, Visual Studio compiles the output as DLL. Therefore, you should compile your dll and update on the IIS. Even though you see the CS code files on IIS folder, they are not being used. Only the asmx file (not asmx.cs) are used to map the code in the dll.
I am guessing that the old code is cached. Try restarting IIS. That should cleanup any remnants of the old code.
It seems that you need to update your service reference.
Go to the project who's using the service, left-click the service reference in your solution explorer and finally choose "Update Service Reference".
Maybe I'm wrong and you did it, but as you don't mention that in your question, this is my suggestion.
rebuild the solution, And deploy the service on IIS. It will work definitily

Building web services without a web server

OK, this is impossible, but I will try to explain the situation here.
Let's say we have cases, that we need a fast setup of a web server in order to have a simple soap web service running (querying a db and so on).
In VS though, upon debugging a web project, it creates a quick ASP.NET development server without relying on the actuall IIS that might be installed on the PC.
Is there any project that does something like that?
This would be ideal for small projects, where a simple executable would get a server ready to go and would allow web services to be executed right away.
I have looked at some stuff over the net like http://msdn.microsoft.com/en-us/magazine/cc163879.aspx and http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2004/05/24/4479.aspx but they seem to be quite outdated and i am not sure how well they work (havent tested them thoroughly)
EDIT: I have build an application like the one you suggest. However, how can i implement HTTP GET/POST requests to the service using this method? I tried using WebGet after my operationcontract but it didnt work. For example, my service is at http://localhost:8080/Service and i would like to use it such as http://localhost:8080/Service/getMethod?x=2.
I believe that the development server used by Visual Studio is based off of the Cassini code base (of which there is a fork here). I also found this article on hosting the asp.net runtime. It was also created a while back (2004), but has been updated since (2008). I think a lot of the core concepts are probably still the same.
Another approach would be a roll-your-own web server using the HttpListener class. This could take some work if you want to use it for hosting asmx type services, but if you were doing RESTful services, it isn't too bad of an option (this is actually how RavenDB works if you are not hosting it under IIS).
A WCF service can be hosted in almost any kind of application, including a Windows Service or a console application. There is no need for a web server at all.
Alright,
i've done it so im posting it here to help anyone who has issues with similar problems.
Create your WCF Service file as usual and then by using ServiceHost (or WebServiceHost) you can easily create a WCF service.
In order to use GET http requests to make it simple to communicate with mobile devices (such as iphone) you can use WebGet above your service methods and make sure you manually add a service endpoint using WebHttpBinding for WebServiceHost or WebHttpBinding with an WebHttpBehavior for ServiceHost.
Then you can call your service methods such as http://localhost:port/webhttpendpointaddress/mymethod?x=2.