what is the global.asax Application_Start equivalent when using WAS in IIS7

I believe AppInitialize() is the method you’re looking for. Here’s an article on using it to initialise Castle Windsor in a WAS hosted WCF service: Castle Windsor and non-HTTP Protocol WCF Services The essence of the article is, instead of using Application_Start() which won’t get called in WAS: protected void Application_Start(object sender, EventArgs e) { … Read more

WCF service to accept a post encoded multipart/form-data

So, here goes… Create your service contract which an operation which accepts a stream for its only parameter, decorate with WebInvoke as below [ServiceContract] public interface IService1 { [OperationContract] [WebInvoke( Method = “POST”, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = “/Upload”)] void Upload(Stream data); } Create the class… public class Service1 : IService1 { public void Upload(Stream … Read more

What is WCF in .NET? [closed]

WCF = Windows Communication Foundation A communication-oriented set of APIs and a “runtime” inside .NET to make two (or more) systems talk to one another. It basically replaces ASMX (ASP.NET web services), .NET remoting (object remoting) and a few other communication-related API’s and products in the .NET space. It can and should be used any … Read more

WCF Metadata publishing for this service is currently disabled + Content Type error

Your code and config seems fine – except for one little point: In your <service> tag, you have defined a name that doesn’t seem to correspond to the class that actually implements your service: <service name=”DestructionServices.Destro” ……> ************************** but your class is: namespace DestructionServices { ….. public class TacticalNukeSVC : INukeInterface { Those names need … Read more

Wcf service exception good practices

On your service operation, you can specify a FaultContract that will serve both purposes like so: [OperationContract] [FaultContract(typeof(MyServiceFault))] void MyServiceOperation(); Note that MyServiceFault must be marked with DataContract and DataMember attributes, in the same way you would a complex type: [DataContract] public class MyServiceFault { private string _message; public MyServiceFault(string message) { _message = message; … Read more

WCF Service returning “requested service ‘…’ could not be activated” the first time it’s accessed from an MVC site

I’ve just manage to solve similar problem of random ‘System.ServiceModel.ServiceActivationException’ (thrown exception, then run on second hit.). The reason for the exception in my case was lack of memory on the server. To confirm the memory problem, you can do following: Application calling web service: System.ServiceModel.ServiceActivationException: The requested service, ‘XXX’ could not be activated. See … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)