wcf

Instrument web site security and architecture questions

Hello, I’m developing a .NET/C# application software for an instrument which has a built-in PC (Core 2 CPU/2.66GZ/4GB RAM) and will have access to the Internet from behind the facility IT firewall. The software is made up of two parts: a rich client desktop app for UI and device control and a web app (silverlight) for providing remote ma...

Returning raw json (string) in wcf

The title says it all. I want to build my own json, and have the service return a string, here is the code [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)] public string GetCurrentCart() { //Code ommited string jsonClient = nul...

TimerCallback.PerformTimerCallback memory allocation

I have a WCF service and I'm profiling its memory allocation. I see that 36% of the memory allocated on each request, is allocated through TimerCallBack.PerformTimerCallback, which in turn calls the following: ExecutionContext.CreateCopy ExecutionContext.Run All these allocation don't even go through my code and only allocates generic ob...

RIA services/DataForm: How to use ReadOnly & Description attributes together

I have several cases where I have a property that I want to declare readonly, but also give some explanation of how it is calculated/set using the [Display(Description="")] attribute. I would like to do this in the metadata, if possible, rather than override in the dataform itself. Here's an example: [Display(Description = "Total n...

how can you deploy an XBAP app with WCF connection to Self hosted service using Windows identity for authorization?

I'm having trouble finding coherent information about this deployment option for a client-server application: Client side: partial trust XBAP client windows authentication for single signon Server side: self hosted WCF service running in a windows service performing custom role authorization based on a custom authorization policy ...

using wcf proxy project instead of app.config files for each client

I have created several WCF services. In order to avoid adding service references in each and every one of my client projects I've created a proxy project which contains all service references and that every project can use as a dll reference. problem is I still need an app.config file in every one of my client projects. which brings me ...

How does google mail implement the new upload functionality with html5?

I noticed while using Firefox and Chrome that in gmail I can now simply drag & drop multiple files in a new mail. Then suddenly a bar grows and I can drop the files there and they get uploaded. I think this is html5 functionality. Does anyone have information about how to implement this? What is needed from html5 and how to handle it se...

Using WCF 4 and EF 4

When using wcf and entity framework 4 is it necessary to use POCO? If not how to combine DataContracts with generated classes(i figure one solution is to recreate the domain classes as business classes)?Or what is the best way co combine wcf 4 and ef 4? ...

Hosting WCF service on IIS...

I am trying to host a WCF service using IIS, (works fine in Cassini). However when I host it in IIS I get the following error: "A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)" I ...

Unable to Access Remote server path through WCF service in XP

I created a wcf service hosted in windows service manager on windows XP sp3, and this service shall generates some file on shared drive/folder on remote PC. but when i try to give shared path as "\Server\SharedFolder" it gives Access Denied error and when i Map this drive as "Z:" it gives "Could not find a part of the path 'Z:\R1_180620...

Channel Factory Class - WCF

May I Know the use of channelfactory class in WCF. Does it help us to prevent updating the service reference manually if there is any code change in the service ? ...

Error generating proxy with svcutil

Hi, I'm building a contract-first SOAP client. When I try to generate the proxy classes with svcutil, I get the error messages listed below and no classes are generated. Some of the error messages are in Dutch, but they're similar to the errors in this question on MSDN. The poster of that question provides the following solution: [....

WCF challenge (in AfterReceiveRequest method of IDispatchMessageInspector Interface).

I'm getting some values in AfterReceiveRequest and want to use that in BeforeSendReply in WCF. Please help me, how I can do that. I'm working in C# project files. I can't use Seesion, ViewState here. I can use static fields, but It will not a good solution. Please give me best solution for this. Below are some lines of my code. pub...

PNRP - limit scope to LAN only?

I've started playing with the Chat sample for WCF P2P. I've modified the sample to use the PNRP binding instead of the custom resolver since I want a pure p2p network with no designated servers (or am I not understanding something here? Am I supposed to run the custom resolver service on each node?). Each chat instance now takes approx 2...

JSONP and sharing cookies from one server to another?

I'm working on an intranet system (.NET 3.5); the main pages are served up from a standard ASP.NET server. I would like to use Ajax on those pages to contact a WCF service running on a different machine, to retrieve data, do CRUD operations - the usual Ajax stuff. The problem I'm trying to resolve is: can I take cookies which were set ...

Why am I randomly getting a "There was no endpoint listening at" error?

I am using .NET to create a WCF and a website that calls it. About 5% of the time I get an error that says there was no endpoint listening. I don't know why it works most of the time but then sometimes it doesn't. Here is the code I am using, I am not sure if it is the way I am creating the WCF. I added a reference to the version of th...

Selfhosted WCF and SSL (Again)

Hello, I've configured ssl usign httpcfg set ssl, after this I've written next code: using System; using System.Net; using System.Security.Cryptography.X509Certificates; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Security; namespace SelfHost { internal class Program { pr...

WCF - Message Based Security and SSL Accelerator

I'm using a WCF service currently that uses message-based security and is intended to be accessed over HTTP, rather than HTTPS. This has been tested and works a treat. On deploying to a machine that uses an SSL accelerator I am getting the following error. "An error occurred while receiving the HTTP response to http://.....svc. This ...

Overriding config file WCF Base Addresses in code.

Hi, I have a WCF Windows service with an endpoint specified in the config file for the service. <baseAddresses> <add baseAddress="net.tcp://localhost:9000/MyEndpoint"/> </baseAddresses> All works ok. However, in some cases port 9000 might already be in use which causes the ServiceHost to fall over on Open(). I nee...

How do I Get a WCF Service & a Website calling it to execute under your network login rather than NETWORK Service

When I developed a site with VS 2008 it happily connected to a the webservice in the solution, then connected to the database (using ADO.Net Entities) and ran my query. Now I come to rolling out the site. When it connects to the webservice it is connecting as NETWORK SERVICE - which I don't want - I need it to connect as 'MYCREDENTIAS'....