app-config

In SOAP message to WCF web service, how to put KeyIdentifier directly inside SecurityTokenReference (inline, without using Reference token)

南笙酒味 提交于 2019-12-07 05:44:29
I'm successful in communicating with a WCF service via SoapUI (I was given specification on how to configure it), but I'm having trouble in copying those settings to .NET application. Turns out the shape of generated SOAP message (peeked via Fiddler) is being rejected by the web service, who expects a stricter layout of envelope. I'm very close. On this picture... ... you can see three SOAP messages: 1. With X509SecurityTokenParameters.InclusionMode set to AlwaysToRecipient 2. With X509SecurityTokenParameters.InclusionMode set to Never 3. Expected security token, tested on SoapUI. How do I

Web.config-style transforms for App.config files for C# Console apps?

二次信任 提交于 2019-12-07 05:04:40
问题 My team is in love with publish profiles. We have a number of testing environments that we work in, and using Web.config transforms we're able to substitute the names of machines in each environment, configuration settings, etc, which makes our build/deploy/test process much easier. For example: Web.config Web.dev.config Web.int.config Web.prod.config However, we have a number of test applications that we use to hit our web services, implemented as Console applications. We'd like to be able

Entity Framework Code First without app.config

北城余情 提交于 2019-12-07 04:53:11
问题 I hope somebody is able to help me, because it seems I'm totally stuck. For upcoming projects in our company we'd like to use Entity Framework 5 with an code first approach. I played around a little while and everytime I try to use EF with our existing libraries, I fail because it seems EF heavily relies on an existing app.config. In our company, we have an inhouse database library that allows us to connect to various data sources and database technologies taking the advantages of MEF

How to read custom config section in app.config in c#

旧时模样 提交于 2019-12-07 04:42:41
问题 I want to read following custom section from app.config: <StartupFolders> <Folders name="a"> <add folderType="Inst" path="c:\foo" /> <add folderType="Prof" path="C:\foo1" /> </Folders> <Folders name="b"> <add folderType="Inst" path="c:\foo" /> <add folderType="Prof" path="C:\foo1" /> </Folders> </StartupFolders> I found this link, but it does not say for multiple <Folders> tag. Please help? 回答1: Hi You can Access custom sections like this CustomConfigClass section = (CustomConfigClass

How do I store an XML value in my .NET App.Config file

大城市里の小女人 提交于 2019-12-07 03:57:31
问题 I am trying to store an xml value in my app.config file. The app.config does not like this and I cannot use the <![CDATA[ construct to ignore the XML'ness of my value. Is there a way to do it? Value example: <FieldRef Name='LinkfileName' Nullable='True'/><FieldRef Name='Web' Nullable='True'/> 回答1: You can save an XML document as text in an attribute value if you escape the character entities: <FieldRef Name="Linkfilename" ... You can then use XmlDocument.Load() to parse the text value. Note

Combined Azure web role and worker role project not seeing app.config when deployed

让人想犯罪 __ 提交于 2019-12-07 02:42:35
问题 I'm implementing the combined web/worker role scenario as described here where you simply add the following to your worker role: public override void Run() { // This is a sample worker implementation. Replace with your logic. Trace.WriteLine("WorkerRole1 entry point called", "Information"); while (true) { Thread.Sleep(10000); Trace.WriteLine("Working", "Information"); } } The problem, as noted in the post's comments, is that this worker process cant read web.config so you have to add an app

App.config on windows phone 7?

这一生的挚爱 提交于 2019-12-07 01:48:36
问题 Dear all, I am building an application on windows phone 7. My application needs some configurations such as Web-service Urls, database name, ... These configurations may be changed whenever needed during deployment time ( but I don't want to re-build the application). In WPF application, I often save these configurations at App.config file, but in WP7 application I can't. If you met this problem before as well as you have any solution for it, please tell me. Thanks so much. Binh Nguyen. 回答1:

How to read AppSettings from app.config in WinForms

爷,独闯天下 提交于 2019-12-06 23:47:39
问题 I usually use a text file as a config. But this time I would like to utilize app.config to associate a file name (key) with a name (value) and make the names available in combo box <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Scenario1.doc" value="Hybrid1"/> <add key="Scenario2.doc" value="Hybrid2"/> <add key="Scenario3.doc" value="Hybrid3"/> </appSettings> </configuration> will this work? how to retrieve the data ? 回答1: Straight from the docs: using using

How can I prevent VS2010 to create a new binding each time I update a service reference?

北慕城南 提交于 2019-12-06 23:07:08
问题 I'm developing a Winforms Client application with a WCF Service in C # 3.5 and Visual Studio 2010. Every time I use " Update Service Reference " in the IDE, considering I have already a working binding in app.config , an additional binding entry is generated with the same name and a trailing "1". My app.config on the client side is : <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IIssueTracker" closeTimeout="00:01:00"... After a "Update Service Reference", I have : <bindings>

How is one supposed to use the F# SqlDataConnection TypeProvider with an App.Config file?

泄露秘密 提交于 2019-12-06 20:11:29
问题 I am using the type expression: type dbSchema = SqlDataConnection<ConnectionStringName="X1", ConfigFile="App.config"> This works great at compile time (I have full access to all the db types), but it fails at run time. I presume it's because the config file generated in the console application's bin directory is named something else, such as MyAppName.exe.config , and therefore the App.config file is not found. Certainly, for an ASP.NET MVC type app that uses web.config , there's no issue