Hello,
I have developed a WCF rest service for a Web AppBuilder widget to use. I developed it in Visual Studio 2010 on my PC using VB.NET. I tested it with Visual Studio's WCF Test Client. I also tested it by right-clicking the service in Solution Explorer and selecting 'View in Browser', then adding the service function name and parameters to the end of the URL that opens in the browser. (example: http://localhost:port#/ServiceName.svc/ServiceFunction?parameter1=parameter1¶meter2=parameter2)
Now I need to add it to our Server. How do I go about this? Do I copy the solution and paste it to the server's C:\inetpub\wwwroot\myWAB folder? Do I need to save the project in a different format in Visual Studio first? Do I need to register it with ArcGIS (Server Manager, Portal, Map, etc.)?
For some additional context, here is a link to a thread I used to start the rest service: How to query a non-ArcGIS database from WAB? (This thread is sort of a continuation of that one.)
Thank you for any assistance you can provide.
William
Solved! Go to Solution.
William,
Here is Google result for "how to deploy wcf rest service on iis" that should help with the basics of deploying to IIS.
William,
Here is Google result for "how to deploy wcf rest service on iis" that should help with the basics of deploying to IIS.
Hi Robert,
For some reason, my Global.asax.vb says ServiceRoute is undefined in the following function.
Imports System.Web.SessionState
Imports System.Web.Routing
Imports System.ServiceModel.Activation
Public Class Global_asax
Inherits System.Web.HttpApplication
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
RouteTable.Routes.Add(New ServiceRoute("", New WebServiceHostFactory(), GetType(Service1)))
End Sub
...
End Class
Any ideas?
William
William,
Did you build the solution before you attempted to publish it?
Hi Robert,
This is an error I get in Visual Studio 2010. Type 'ServiceRoute' is not defined.
William
William,
Add the System.ServiceModel.Activation namespace to your project's references.
Also I am a little concerned with your service route not having a name:
RouteTable.Routes.Add(New ServiceRoute("", ....
Hi Robert,
I published the WCF rest service to my local machine this morning. Why is leaving the route prefix empty a problem?
Thank you for all your help.
William
I guess it does not matter for a simple REST service. I have several routes in mine so that is why it is important in my RESTful service.