app-config

Why did my Visual Studio 10 stop using App.Config for my SQL connection string?

一个人想着一个人 提交于 2019-12-08 13:32:50
问题 I have a working database application using WPF and SQL Server 2008 R2, which for two years has been getting its SQL Server connection string from the App.Config file. A few days ago on one dev machine, it started ignoring the App.Config file's connectionString, and is now using a string from somewhere else (looks like either settings.settings, or the DBML file). Why might this be happening, and how can I get it to stop doing that? The app.config starts out like this: <configuration>

How to configure Enterpise Library 6.0 logging to database?

不问归期 提交于 2019-12-08 09:12:32
问题 In my App.config I have a second things: <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /> <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0,

The underlying connection was closed: The connection was closed unexpectedly

落爺英雄遲暮 提交于 2019-12-08 08:35:00
问题 Problem: The underlying connection was closed: The connection was closed unexpectedly. This happens on my WCF service that is hosted on the visual studio 2010 built in development server. Information: this does not happen all the time I believe it is a "big Data" issue, I have googled as hard as I can but non of the solutions I have implemented have fixed anything (and I have tried most of them out there) I most likely am just missing something stupid. Question: Why is this happening and how

WCF .config file - something is plainly wrong

偶尔善良 提交于 2019-12-08 08:05:55
问题 Folks, I've got something wrong with this .config for my WCF. When I send data to it more than 8192 bytes (the default) it fails, telling me my "maxStringContentLength" is only 8192. I think I have it set here to 10,000,000. Any clues? <system.serviceModel> <bindings> <wsHttpBinding> <binding name="wsHttpBinding" maxReceivedMessageSize="50000000" maxBufferPoolSize="50000000" messageEncoding="Mtom"> <readerQuotas maxDepth="200" maxStringContentLength="10000000" maxArrayLength="16384"

Dotfuscator : Error after obfuscation

时光怂恿深爱的人放手 提交于 2019-12-08 07:21:13
问题 I am using dotfuscator to obfuscate my vb.net application(myapp.exe). But i am getting error while running the obfuscated file. Below is the error when i open the exe which is obfuscated. "The settings property 'Import' was not found. ImportSetting" My application uses .config(myapp.exe.config) file which has setting like below <userSettings> <myapp.My.MySettings> <setting name="Import" serializeAs="String"> <value>True</value> </setting> </myapp.My.MySettings> </userSettings> If i don't

App.config transformation for appharbor background workers

只谈情不闲聊 提交于 2019-12-08 06:35:45
问题 I would like to use app.config transformation as it is done for web.config on AppHarbor background workers. I tried the solution proposed in a previous question but it doesn't seem to work. Is this possible? Thanks 回答1: AppHarbor actually already applies transforms before backgroundworkers are deployed, but the problem is that the file names no longer match up. So if we're transforming App.config, we look for a transformation called App.Release.config. After the build however, the file name

Create custom section in config file

大兔子大兔子 提交于 2019-12-08 04:24:02
问题 I am trying to create custom section in app.config file <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="BlogSettings" type="ConsoleApplication1.BlogSettings, ConsoleApplication1" /> </configSections> <BlogSettings Price="10" title="BLACKswastik" /> </configuration> C# code : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Configuration; namespace ConsoleApplication1 { class Program { static void Main

Clickonce application not seeting AppSettings

爱⌒轻易说出口 提交于 2019-12-08 03:02:53
问题 I have a Full trust, online only, click-once application that relies on settings in the App.config --> appSettings collection. Once published, the first time the application is executed, the settings are read and everything works fine. If I close the application and run it again, the items that are in appSettings are no longer there and appSettings.Count is equal to 0. I have set the app.config as "Content" and to "Copy Always". Any Idea what could be causing the items in appSettings to

How to use encrypted connection string on app.config with Dataset.xsd generated by Wizard on Windows Form

隐身守侯 提交于 2019-12-08 02:53:51
问题 I'm developing an MDI application with Visual Studio 2013 (.NET 4.5) and Oracle Developer Tools latest release. I need to create a main form that then will be the container for many different forms, each of which will be a different application. The application have to connect to different Oracle databases and now I'm trying to set the main form to keep all the connection strings encrypted and possibly on a separate file. For now the connection string is only one. To encrypt the connection

Log4net for windows service

只谈情不闲聊 提交于 2019-12-08 01:38:49
问题 This is first time I am using Log4net . It doesn't show any errors, but is not writing to file. I added following in my AppConfig file: <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/> </configSections> <log4net> <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%5level [%thread] (%file:%line) -