wcf

Can I edit Resource file at runtime

霸气de小男生 提交于 2021-02-07 14:44:42
问题 I have a WCF service, it response with JSON. I need to create a language file, which I can edit on production server. no problem if I will need to recycle App pool. I was about to use Resource file, but I was worry that it is not editable by end user. I don't need to edit it pragmatically, the end user will edit it by opening the file in notepad without recompiling the application. What do you suggest? Thanks 回答1: Yes you can using the ResXResourceWriter class. If you need to generate the

Can I edit Resource file at runtime

白昼怎懂夜的黑 提交于 2021-02-07 14:43:39
问题 I have a WCF service, it response with JSON. I need to create a language file, which I can edit on production server. no problem if I will need to recycle App pool. I was about to use Resource file, but I was worry that it is not editable by end user. I don't need to edit it pragmatically, the end user will edit it by opening the file in notepad without recompiling the application. What do you suggest? Thanks 回答1: Yes you can using the ResXResourceWriter class. If you need to generate the

Can I edit Resource file at runtime

独自空忆成欢 提交于 2021-02-07 14:41:13
问题 I have a WCF service, it response with JSON. I need to create a language file, which I can edit on production server. no problem if I will need to recycle App pool. I was about to use Resource file, but I was worry that it is not editable by end user. I don't need to edit it pragmatically, the end user will edit it by opening the file in notepad without recompiling the application. What do you suggest? Thanks 回答1: Yes you can using the ResXResourceWriter class. If you need to generate the

How to consume wcf in .net core without adding service reference?

假如想象 提交于 2021-02-07 14:20:26
问题 net core, I want to consume a wcf service in my core application without adding service reference? I am able to consume wcf by installing wcf connected service and adding service reference but I don't want to add any service reference. 回答1: if you are using wcf service then you can expose it as a restful service. then you can simply consume it. actully i have been use it for many years and its been really useful. here you can read more about that: REST / SOAP endpoints for a WCF service 回答2:

How to start a process from an IIS hosted WCF service?

試著忘記壹切 提交于 2021-02-07 12:14:32
问题 I would like to run a process from an intranet client on the WCF service side. In my case a client asks a server to create a new process on the server's machine under the provided credentials. WCF service is hosted on IIS 7.5 and I start a process using this code var processInfo = new ProcessStartInfo("C:\\Windows\\System32\\notepad.exe") { UserName = "some user", Password = MakeSecureString("some password"), UseShellExecute = false, LoadUserProfile = true }; Process process = Process.Start

How to start a process from an IIS hosted WCF service?

时光毁灭记忆、已成空白 提交于 2021-02-07 12:14:32
问题 I would like to run a process from an intranet client on the WCF service side. In my case a client asks a server to create a new process on the server's machine under the provided credentials. WCF service is hosted on IIS 7.5 and I start a process using this code var processInfo = new ProcessStartInfo("C:\\Windows\\System32\\notepad.exe") { UserName = "some user", Password = MakeSecureString("some password"), UseShellExecute = false, LoadUserProfile = true }; Process process = Process.Start

Where does console output go in an IIS hosted app?

微笑、不失礼 提交于 2021-02-07 11:40:35
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

Where does console output go in an IIS hosted app?

一曲冷凌霜 提交于 2021-02-07 11:40:03
问题 Say I have a WCF app hosted in IIS. And in that app I run this line of code: Console.WriteLine("Testing, testing 1 2 3"); Where will that be written to? Or is it ignored and just lost? Is there someway to capture it when needed? 回答1: Nowhere. More specifically: NullStream , which is defined as "A Stream with no backing store.". All the methods do nothing or return nothing. It is an internal class to Stream . The following code is taken from Microsoft's source code. Basically, when one of the

How can I control the name of a generic WCF Message Contract

风格不统一 提交于 2021-02-07 11:19:15
问题 I'm generating a WCF service using the message contract model. I have created a generic request message contract like so: [MessageContract] public Request<T> { [MessageBodyMember] public T Details { get; set; } } I'm used to using [DataContract(Name="Contract{0}")] to produce readable names for generic data contracts, but this approach does not seem to work for me using message contracts. Is there a way to achieve the same behaviour using the message contract model? 回答1: It seems like a lot

Add Service Reference not appearing

冷暖自知 提交于 2021-02-07 10:20:58
问题 In a Windows Phone 7 Silverlight project, I had a service reference to a WCF service. This morning when I opened up the project, suddenly the namespaces for my WCF service were unknown. The option for "Update Service Reference" in Solution Explorer was not there, so I deleted the Service Reference with the intent of re-adding it. But the option for "Add Service Reference" is also not there. Gone. Disappeared. Closed and re-opened the solution. Restarted VS2010 Ultimate. No dice. Anyone run