Questions tagged [webservicehost]
27 questions
8
votes
2 answers
How to override WebServiceHostFactory MaxReceivedMessageSize?
There are a lot of similar questions out there, but I have tried every solution in every one of them to no avail.
We have a web service that initialises with WebServiceHostFactory, but if any more than 64k is thrown at it, we get a '400 Bad…

James R
- 651
- 1
- 12
- 21
4
votes
2 answers
C# Rest API return dynamic object
I have an webservice
WebServiceHost webServiceHost= new WebServiceHost(typeof(WebMethods), new Uri(url));
webServiceHost.Open();
public class Fish { public string name = "I am a fish"; }
public class Dog { public int legs = 4; }
public class Cat {…

patrick d.
- 41
- 1
- 4
2
votes
1 answer
Is it possible to instantiate a WebServiceHost via an instance of the service type, without a parameterless constructor?
I am trying to create self-hosted System.ServiceModel.Web.WebServiceHost (.NET 4), however I am running into an issue with the constructor. There are three options:
WebServiceHost() a parameterless constructor that seems pointless, as there's no…

nicodemus13
- 2,258
- 2
- 19
- 31
2
votes
1 answer
IoC Containers, WCF & ServiceHostFactories
I have been reading about IoC lately, and I think it would definitely come in handy in the WCF web-service I am developing. However, it seems that Ninject, StructureMap and Spring.Net (I only did check these three) require the custom Factory…

DotNetStudent
- 889
- 9
- 24
2
votes
0 answers
Windows Service with web interface .NET C#
I need to develop a windows service that will do some basic task a few times a day, nothing heavy. As part of the requirements it needs a web interface so it can be configured from a browser.
Example:
Mr Engineer opens up his browser and enters…

Murphybro2
- 2,207
- 1
- 22
- 36
2
votes
0 answers
Communication between browser and a local process
I have a web app that needs to communicate with a local .NET app that controls some specialized hardware. Basically, the main purpose of the web app is to acquire data from that hardware and post the data to a web server. The local .NET app could…

Qodex
- 299
- 3
- 12
1
vote
1 answer
WebServiceHost inside VSTO addin
I'm about developing an application level VSTO addin that consists, among others, of a UI with an embedded Webbrowser control and a simple REST-style service, based upon WCF's WebServiceHost. The service delivers content, in particular flash movies,…

Matthias
- 1,759
- 16
- 34
1
vote
3 answers
How do I get the WSDL/description so that I can add WebReference in another project?
I know how to add a WebReference in Visual Studio, easy enough.
I also know how to create a normal ASP.NET Web Service project, but that's not what I am doing here.
So, the WebService I have running looks like this:
try
{
if (host != null)
…

Ted
- 19,727
- 35
- 96
- 154
1
vote
1 answer
WCF: Programmatically enable both https and http on same ip/port
I have read some posts here, claiming that WCF can allow http and https on the same endpoint/port, but that sounds a bit wrong to me. I tried to set it up but I cannot figure out how to enable both https and http listening on the same port/ip,…

Ted
- 19,727
- 35
- 96
- 154
1
vote
0 answers
Using WebServiceHost in desktop apps
I'm hosting a service using WebServiceHost in my desktop application and not closing this service if the process is terminated. I checked the port I used after the process terminates and it was closed, and I was able to reuse the same port properly.…

Akhadra
- 419
- 3
- 10
1
vote
0 answers
Delphi SOAP Server exception unknown SOAP action
I have to write a SOAP server to serve a given client. The client requests cannot be changed, so the server has to adapt to the client. IDE is Delphi XE2, the result is a standalone .exe. Its my first project in delphi, so please apologize if I…

dieter c
- 31
- 5
1
vote
1 answer
WebServiceHost BaseAddresses
For the following class :
public class MyClass
{
private WebServiceHost m_WebServiceHost;
}
I need to trace the uri it was initialized with. I have implemented that method:
public void MyTrace()
{
Trace.TraceInformation("URI…

YAKOVM
- 9,805
- 31
- 116
- 217
1
vote
4 answers
WCF ServiceHosts, ServiceEndpoints and Bindings
I currently am running some WCF REST services in a Windows Service (not IIS), using the WebServiceHost. I have a separate interface and class defined for each service, but I'm having some issues understanding how WebServiceHost, ServiceEndpoint and…

bpeikes
- 3,495
- 9
- 42
- 80
1
vote
3 answers
How to implement WebServiceHost Authentication?
I'm aware that the authentication on the webservicehost class does not adhere fully to authentication standards (returns 403 forbidden rather than prompting for another set of credentials when the user enters incorrect credentials).
I'd still like…

rabbitt
- 2,558
- 8
- 28
- 41
1
vote
2 answers
Convert WebServiceHost to WCF Service Application
I have a working console application where all the adresses and configuration are in a config file. But when I try to move this code to a WCF Service Application i get all kinds of errors.
class Program
{
static void Main(string[] args)
{
…

Zeezer
- 1,503
- 2
- 18
- 33