WCF service calls SSIS package, w3wp.exe memory keeps climbing

My .net WCF service calls a SSIS package using the Package.Execute(); method. After I call execute, I set pkg.Dispose() and app = null; The memory usage keeps climbing, 100mb to 150mb all the way to almost 300mb. I am recycling the process now, but want to know the source of the problem. Any ideas? Update The application that calls the WCF service is on another server so there is no issue there.

WCF WebService / IIS Hosting & Configuration Issue Behind a Firewall

I have a simple WCF Web service. It's hosted on IIS under the default website in our production domain. (local address: 10.10.20.100) By default this default website was setup for "All Unassigned" IP's on Port 80: however, I noticed that this caused the WCF Service to generate it's WSDL using the servers local DNS name. i.e. all the URIs in the wsdl were http://myserver.subdomain.domain.com/.../... This was no good as I need to expose this service to sites who have no knowledge of the produc

Programmatically and globally adding a custom WCF client endpoint behavior extension

I have the need to add a custom behavior extension to my WCF client endpoints. I tried doing this through configuration, but have been bitten by the often-mentioned bug where WFC configuration can't parse the type name correctly. So can I do this programatically instead? I can't modify the configuration sections at runtime because they are read-only. I know if I get ahold of an instance of a client proxy (i.e. ClientBase), I can add to its Endpoint.Behaviors an instance of my custom behavior

How do I authenticate a WCF Data Service?

I've created an ADO.Net WCF Data Service hosted in a Azure worker role. I want to pass credentials from a simple console client to the service then validate them using a QueryInterceptor. Unfortunately, the credentials don't seem to be making it over the wire. The following is a simplified version of the code I'm using, starting with the DataService on the server: using System; using System.Data.Services; using System.Linq.Expressions; using System.ServiceModel; using System.Web; namespac

Wcf No Endpoint Listening

Get the error message "There was no endpoint listening at http://subdomain.domain.com, This is often caused by an incorrect address or SOAP action. See InnerException" Any suggestions?

Problem in Hosting WCF Service using wsHttpBinding in IIS

I am trying to host my service using following configuration. <system.serviceModel> <services> <service name="Test.MyService" behaviorConfiguration="MyServiceBehavior"> <!-- Service Endpoints --> <endpoint address="MyTestService" binding="wsHttpBinding" bindingConfiguration="WebserviceHttpBinding" contract="Test.IMyService"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

C# WCF - Sending Custom BindableDictionary<string,CustomObject>() Over The Wire

EDIT Ok, I've got it, it's not serializable.........so, how do I go about serializing it? Scenario I have a custom BindableDictionary that I use to bind with a grid control for automatically updating the grid when the underlying datasource changes. I now want to extend my application to use WCF, so that when the server-side has finished updating the BindableDictionary with new values, it can pass this dictionary to the client, which in turn can perform the update on the Client GUI. Problem

How should the web.config look like in Unity Dependency Injection for WCF services?

I am creating new instnace provider which resolve services through Unity. I am not sure how to add the configuration in web.config. Following is my service class. public class Service : IService { private IUnitOfWork _unitOfWork; private IMyRepository _myRepository; // Dependency Injection enabled constructors public Service(IUnitOfWork uow, IMyRepository myRepository) { _unitOfWork = uow; _myRepository = myRepository; } public bool DoWork() { return true; } }

Setting Message version in code for WCF client

I want to set message version for WSHttpBinding to EnvelopeVersion.Soap11. I don't know how to do that. Can any one help me. Here is my binding code var binding = new WSHttpBinding() { UseDefaultWebProxy = true, Security = { Mode = SecurityMode.Transport, Transport = { ClientCredentialType = HttpClientCredentialType.Basic }, }, }; EDIT: here is t

AspNetCompatibilityRequirement error when hosting a WCF service with AppFabric Endpoint in SharePoint 2010

I am trying to host a WCF service within SharePoint 2010 with an AppFabric endpoint. I am using the basicHttpRelayBinding. When I host the service with a standard endpoint using the basicHttpBinding (not a service bus endpoint), the service works fine. However, as soon as I add the endpoint using the basicHttpRelayBinding, I receive the following error in the event log and the service does not register with the service bus. WebHost failed to process a request. Sender Information: System.Ser

WCF DataContract deserialization issue with empty values

Say i have something like: [DataContract(Namespace="http://bla.bla")] public class MyClass { [DataMember] public long ResponseCode { get; set; } [DataMember] public long Fee { get; set; } } and the following is coming from a channel: <ns0:MyResult> <ns2:ResponseCode xmlns:ns2="http://bla.bla">101</ns2:ResponseCode> <ns2:Fee xmlns:ns2="http://bla.bla"></ns2:Fee> </ns0:MyResult> I'm getting the error: ----> System.Xml.XmlException : The va

WCF - Service Certificate with User Name Validation

Can any one explain me, what exactly the role of Service Certificate and what exactly it does in this Combination (Message Security - Client: UserName Validator, Server: Server Certificate).. If you can explain me step by step, it'll be really helpfull. Thanks in advance

WCF and Linq Service

i am making wcf rest service using linq. i wanna use stored procedure to access the database in linq..i came to know to about the accessing syntax but ToList() property i m not finding in my project..can anybody suggest me the solution ? Code : [OperationContract] [WebGet(UriTemplate = "/CList/")] public CList[] GetCList() {string strConnection = ConfigurationManager.ConnectionStrings["HConnectionString"].ConnectionString; HDataContext dc = new HDataContext(strConnection);

Wcf Checking for Linq Variables

i m making wcf service for login. my code for accesssing db data using linq is : var result = from detail in dc.tbl_User_Masters where detail.User_Type_Id == 2 select new UserVerification { Uname = detail.User_Login_Name, Password = detail.User_Pwd }; where UserVerification is class which has Uname and Password properties stored..now how to check that variable that if they are null t

Interface segregation in WCF for JSON

I am a newbie in WCF. I was wondering if we can retrive properties from base interface in the REST output. Please consider following structure. Product includes IVenueView not Venue. Is it possible to only have Venue.Id in Product JSON response? [DataContract] public class Product { [DataMember] public Guid? Id { get; set; } [DataMember] public string Name { get; set; } [DataMember] public IVenueView Venue { get; set; } } public interface IVenue

How can I stop VS2010 from lauching the wcf host when it's not needed?

I imported a vs2008 solution containing a class library with a wcf service defined in it. The solution also contains a console project which holds the hosting app for the service. The console app is set as the startup project. When I hit Debug, the console app tries to open the service host, but vs2010 also launches the generic WcfHost. This causes console app to crash. How do I stop the WcfHost from launching and competing with the console app that hosts the services too? or should I stop the

WCF 400 Bad Request

I created a simple function [OperationContract] [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)] string Start(); Definition, public String Start() { JavaScriptSerializer serializer = new JavaScriptSerializer(); return serializer.Serialize("Check"); } From browser using Javascript/Jquery, http://localhost/service1.svc tells me I have created a service and all other info.. Looks fine. I'm trying to call th

How can I stop the WCF test client from opening when I start debugging?

I realize that I can just make sure I don't have the service open in my active window when I start debugging, but that's a little annoying. It seems like there's got to be some setting in VS2010 somewhere to turn this off. For anyone who asks "why would you want to turn it off?", it's because the service is using both SOAP and ReST. I test ReST in browser or in Fiddler and test SOAP in SOAPUI, and really don't have a need for it. Thanks.

How to create and handle session in wcf?

I am newbies to wcf application. In my project, client will send userid and password to wcf logon service and server need to create a session for each user if user is authenticated. I also need to clean the session when the client log out.How can I create and handle session in wcf?All userid and password information are stored in MySql database. Please guide me the right way and share me if you have any simple examples.I really appreciate your help.I am using visual studio 2008 and MySql. Than

A misbehaving WCF service asynch call

Okay, I have a WCF service which is going to be acting as a way to access my SQL database. That part has become largely irrelevant to this question, since for some reason my WCF service crashes. Or, at least, it causes my client Silverlight application to crash. This is why I come here to ask you guys about it. So here's the code. Bear in mind that it is called asynchronously from my Silverlight client. When it is done, the string that is returned from this method is put on the screen for the c

UsernameToken and SSL in WCF 4 web service - but with basicHttpBinding

A few months ago I asked about UsernameToken and SSL in WCF 4 web service and received a good answer using wsHttpBinding. However now we have had to revert to using basicHttpBinding due to incompatibilities with a Java client. I've tried switching the configuration as follows.... <bindings> <basicHttpBinding> <binding name="secureBinding"> <security mode="TransportWithMessageCredential"> <transport clientCre

Wcf How to clear the outgoing message buffers at the Server?

I've written a service using PollingDuplexHttpBinding which has a Silverllight client that consumes it. My Service basically has a given number of clients sending their data (quite often, every second, and the data is quite large, each call is around 5KB) to the service, and also listening for new data sent by other clients to the service to be routed to them, very similar to a chat room architecture. The problem I'm noticing is that when clients connect to the service over the internet, after

Can't change wcf contract's method return values

I'm building a WCF service, I have written the contract in the IService file and Implemented it in the Service file, The problem shows up when I try to change any of the return values of the methods I have declared and that's because they are being saved behind in the code in CustomersService namespace specifically in the CustomersServiceClient class which is locked and can't be accessed to change. This is the code I have in the ICustomersService file: [ServiceContract] public interface

Wcf Xml-configuration IRepository<T>. Is MSDN wrong?

I'm trying to implement constructor injection for a generic type repository interface. I do this by applying http://msdn.microsoft.com/en-us/library/ff660933(v=pandp.20).aspx documentation. The xml-editor however does not accept the square brackets in for instance: <alias alias="IGenericRepository" type="Design.DataModel.Interfaces.IGenericRepository'1 [[Design.DataModel.Entities.GaugeModel, Design.DataModel]], Design.DataModel"/> The xml-editor gives the following er

Wcf Asynchronous call in one more Asynchronous call not working in silverlight

I have a UI view lossreport.xaml in that below code is there LossReportTowGlassServiceClient wcf = new LossReportTowGlassServiceClient(); wcf.HouseholdSearchCompleted += (o, ev) => { string a = errorMessg.ToUpper(); //Code to work with ev }; wcf.HouseholdSearchAsync(lossDate, txtPolicyNumber.Text, errorMessg); in service.svc page try { policyinq.retrieveHouseHoldPo

Best way of validating WCF input

In my services all the methods except certain mandatory parameters and all the input parameters are encapsulated inside message contract. Right now, we are validating the input in each and every service method, Its like duplicating validation logic in all the service methods. Is there any way I can move all these validation to common place and more over I don't want my service method to be executed as the input is not valid. Appreciate your suggestions.

Which port numbers to use/avoid for web services (WCF + Rest?)

I'm looking to deploy a WCF services project to IIS - the services are both wsHttp and webHttp (not that it makes much difference!) in the same project at the moment. The server is already hosting MVC3 web sites on port 80, separate to the web services. In the future, the services and sites may be separated...depending on load/performance/cost etc. Are there "accepted/common" ports or port ranges to use for web services? Any ranges to really avoid (*obvious ports ignored of course - 25/80/80

WinRT - consume WCF service

I have a windows service, which acts as a propagator for data received from external source. This windows service hosts WCF ServiceHost with NetNamedPipeBinding(). ServiceContract also defines CallbackContract There is also a client DLL component, which consumes the server and bubbles up parsed data as an event. Data is bubbled upon receiving callback from the server. The code works in desktop app, however when I try to reference client DLL in WinRT app I get following error: The pipe name c

WCF Relay not receiving messages

I have several queues on the Azure service bus and are now setting up a WCF relay service (inhouse) for processing messages. I have written a console application that hosts this service and looks like this: var sh = new ServiceHost(typeof(MyWcfService)); try { sh.Open(); foreach (var endpoint in sh.Description.Endpoints) Console.WriteLine(String.Format("Listening at: {0}", endpoint.Address)); Con

WCF self hosted service with certificate authentication

I have created a self-hosted WCF RESTful service with basic http authentication that runs over https with a self-signed SSL certificate. Everything works fine. When users access the service operations via a web browser,they get a pop up asking for credentials (login/password). Now I want to do certificate authentication instead of basic, but it does not work. The client's browser(IE/chrome/firefox) never prompts for certificate selection, I always get a HTTP 403 error and when I set a breakpoin

WCF data contract serialization with custom XML attribute

Is there a possibility to get the response as the following since in my experience using data contracts does not allow to add an id inside an element (e.g. ). Is there a way to achieve the following structure? Also notice that this is without a root tag. <Number Id=”1”> <FName>1234567890ABC</ FName > <Date>7/1/2012 12:00:00 </ Date > </Number > < Number Id=”2”> < FName >9876543210XYZ</ FName > < Date >7/1/2012 12:00:00 </ Date &g

Wcf Debugging has not been enabled on server

I am new to WCF architecture. When I am debugging an application, it gives me the error: "Unable to step into a server. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on server." The execution scenario is like: Line by line execution from top to bottom. When debug execution flow comes to the line that generates error, it calls a web service (having one line above service signature that is "http://liveUrl", RequestNamespace:="http://li

Wcf Monitor ThreadPool use

I wish to do some benchmarking on a busy WCF service (IIS-hosted, PerSession). Since WCF gets a new ThreadPool thread for each service call, I'd like to know if the ThreadPool's max threads count is ever reached, and if I should increase it (SetMaxThreads). The only way to get hard facts I can think of is to instrument the code with ThreadPool.GetAvailableThreads. Is there any way for me to monitor if ThreadPool has reached max threads and is waiting for threads to be released? Thanks.

WCF Self-Hosted Data Services with CORS and Basic Auth support

I'm building a WCF Self-Hosted Data Service (OData, by the way) and I'm using Basic Authentication to authenticate users. It wasn't very hard, I just needed some configuration steps, build a UserNamePasswordValidator and a IAuthorizationPolicy - DONE. Now I need to support CORS (Cross-Origin Resource Sharing). I've tried many implementations, some documented (for instance, this), other made by myself. The problem is, if I let Basic Auth enabled, because the CORS preflight request (OPTIONS) doe

Suggestion to choose correct WCF Instance Mode

I am Balu from Hyderabad. I have writing WCF Restful services for our Andriod / Iphone developers()They can use JSON format so that we are choosing REST). Actually we can do Mobile Application only one APP that can runs differnt projects. All the projects are dynamically comes from WEBSERVICE to MobileApp. So we can configure all the dynamic data from Web services only. Only one App can handle 5 projects having totally 100-150 users. so i can write only one service using Factory Reflection meth

WCF Service Hosted in Windows Service Throwing Exception When Deployed On Server

I have a WCF Service library that I have hosted in a Windows Service. Both projects are using .NET Framework 4.5. I have copied WCF Service configuration into Windows Service “app.config”. For reference the config in windows service project looks: <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <connectionStrings> <add name="SmartDataExchangerCon

WCF- Sign a specific field inside the body of a soap message

I only need to sign one specific field inside a WCF message. The class has the next aspect: [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] [System.ServiceModel.MessageContractAttribute(WrapperName="simpleInputData", ProtectionLevel = ProtectionLevel.None , IsWrapped=true)] public partial class SimpleOperationRequest { [System.ServiceModel.MessageHeaderAttribute( ProtectionLevel = Protection

WCF Transactions without MSDTC

I need to coordinate a transaction between several SOAP services implemented in WCF. I know I can use the WS-Atomic transaction or oleTransactions. For some technical reasons, I cannot make any use of the MSDTC. Is there a way I can coordinate a transaction between services without using the MSDTC? Thanks!

WCF Show/Hide Methods For User Groups

I have a wcf web service and there are two types of users that will use this service.Service methods need to be different for each user group. In other words, User group A should not see service methods that belong to user group B. How can I achieve this?

Wcf Passing objects vs records in F# web service

As I know I can passing the objects and the records in WCF F# Web Service: [<DataContract>] type Item(id : string, name : string) = [<DataMember>] member val ItemId = id with get, set [<DataMember>] member val ItemName = name with get, set new() = new Item("", "") type Person = { First : string Last : string Age : int } Web Service Implementation: type SimpleService() = interface ISimpleService with member

Wcf How to configure custom security token handler?

I have implemented custom Saml2SecurityTokenHandler as shown here http://leastprivilege.com/2015/07/02/give-your-wcf-security-architecture-a-makeover-with-identityserver3/. The constructor of this handler accepts two custom parameters - authority and requiredScopes. In the example this handler is registered in the code. However, I want to do this in web.config file. <system.identityModel> <identityConfiguration saveBootstrapContext="true"> <securityTokenHandlers>

Wcf OperationContextScope vs MessageInpectors

Help me in understanding differences between these two. as per to me, Operation ContextScope can be used irrespective of .NET application you are using like WCF, Console, Web, etc, anywhere this can be used if you are calling any other service like WCF or Java based service [ it this will not work in case of ASMX service] to add headers into outgoing message. If so then why we need MessageInspectors at any client side to add headers? OperationContextScope is much simpler than MessageInspectors.

WCF and Access 95

First, don't be hatn'. I know people born when MS stopped supporting Access 95 are now in high school. I am trying to provide a path forward. I have a WCF being developed on my Win 8.1 64 bit computer (VS 2013). When my unit test makes the call, the WCF it needs to query the DB and return a dataset. I do this using traditional dataAdapter.fill() call. This causes a 'Microsoft.jet.OLEDB.4.0' provider is not registered on local the machine.' error. I have found several posts on this forum that s

WCF service method returning MessageContract works but the service itself throws errors

I have a requirement to create a WCF restful service containing couple of operation contracts, where one of the operation contract of type GET takes input parameter as a string ID and returns a MessgeContract(as I needed to modify the SOAP body structure, i used MessageContract). Now, when I browse the service http://appname/service1.svc in browser, it throws exception, saying that service method cannot use primitive parameters and MessageContract return type together, but when I execute the se

WCF error management using WebFaultException - Wrong HttpStatusCode

I have implemented a simple web service and I want to return appropriate Http Status Error codes depending on the error that occurred in the method being called. I am using .NET framework 4.7.2 with Visual Studio 2019 and the IIS Express 10 built into Visual Studio for testing at the moment. I am using the Boomerang extension for Chrome to call the service. I have implemented a FindPerson method that takes a name. If the person is not found, or more than one person is found, I want to return a

  1    2   3   4   5   6  ... 下一页 最后一页 共 69 页