.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Configuration file missing

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :Windows Application
I am trying to use app configuration file (I added App.config file to solution, reading it with ConfigurationManager), when I start the program from VS (in debug mode) everything is fine, but if I start it like a application (exe file) it can't find config file. The name are equeal (app.exe and app.exe.config). Anybody knows the solution? Thank you

View Complete Post

More Related Resource Links

Missing tmpF7.tmp file

I am missing the tmpF7.tmp file that prohibits the uninstall of net programs. I tried finding the uninstaller recommended in an earlier post but the link no longer works. Basically I need to have the tmpF7.tmp file in order to install/uninstall .net software. Any suggestions greatly appreciated.

using application configuration file in AppData special folder

Hi! So I understand it is a best practice to save the application configuration files under the AppData folder, rather than in Program Files, since UAC will restrict write acces to the Program Files folder, which is fine. Now, saving the configuration file to another location is no problem, using the SaveAs method. However, when I load the application, I expect some settings to be read. From what I know, this is done either using direct calls to the ConfigurationManager class, either initializing a Configuration object. For the first case, a example is this: if (ConfigurationManager.AppSettings["Title"] != null) { this.Title = ConfigurationManager.AppSettings["Title"]; titleTextBox.Text = ConfigurationManager.AppSettings["Title"]; } For the second case, I would use it like this: Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); string setting = config.AppSettings.Settings["Title"].Value.ToString(); So, if the application runs in the Program Files folder, an exception is thrown when I save the file. However, if I save the file using SaveAs and save it to AppData folder, obviously, when loading, the settings are not loaded from the AppData folder, but from the configuration file existing in the Program Files folder. One way to solve

Placing ..... configuration information in a config file other than app.config

Hi, I'm sorry if this question has been asked/answered before on this forum. I have searched both here and on the web in general, but to no avail as yet... I am running VS2010 and .Net 4, so in theory have all the latest versions of everything at my disposal. I have an executable a.exe. This downcalls into a dll b.dll. b.dll wants to send an MSMQ message using WCF. For cleanness (a.exe is a generic service and knows nothing about WCF) I want to define the client endpoint in b.dll.config. However I am finding that WCF is insisting that the information is held in a.exe.config. The exact problem is that when I create my proxy (i.e. the class which derives from ClientBase<T>), I get the message Could not find endpoint element with name 'XXX' and contract 'YYY' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element. From what I have seen I have just described an extremely common problem that people have had with WCF over the years. My questions is basically to find out, given that I have WCF 4 at my disposal, whether there is now a standard approach to this scenario? Things I have tried so far: The obvious one...putting all my config info in a.exe.config. When I do this, everything works file, so I

SMS reporting server configuration error: The MemoryLimit Element is not a configuration file elemen

Attempting to configure reporting services for SCCM 2007 SP2 R2. Installed SQL Standard 2008 reporting services. Attempting to configure reporting services, but service will not start w/ error: System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.    at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)    at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start) Digging into Reporting Services logs reveals: rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: CLR runtime is initialized. rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: Derived memory configuration based on physical memory as 16775112 KB appdomainmanager!DefaultDomain!1b54!09/08/2010-14:50:25:: i INFO: Entered managed ServiceMain in DefaultDomain. configmanager!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Error loading configuration file: The configuration file contains an element that is not valid. The MemoryLimit element is not a configuration file element. library!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: , Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.&nb

The configuration section 'system.web.extensions' cannot be read because it is missing a section d

My system: I have installed Windows 7, VS2010 and .NET40 and ASPAJAXExtSetup.msiI'm getting the error below. Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration Config File \\?\C:\inetpub\tickets\web.config Requested URL http://www.tickets.com:80/ Physical Path Logon Method Not yet determined Logon User Not yet determined Config Source 45: </connectionStrings> 46: <system.web.extensions> 47: <scripting> My web.config:<?xml version="1.0"?><configuration>    <connectionStrings>            </connectionStrings>    <system.web.extensions>        <scripting>            <webServices>                <!--http://weblogs.asp.net/andrewfrederick/archive/2008/02/18/a-client-sid

SSIS package - change Web reference's addres from Configuration file?

Greetings. The SSIS packages provide very nice options to configure them from an XML file, which allows to change credentials, database names etc w/o editing the package. This lets me, say, transfer package from one server to another or from test to production w/o any hassle - just changing the xml. Problem is, i need to acces a web service in my package, and built-in SSIS web service task is useless and just SUCKS. It fails to work even with miscrosoft's own sharepoint web service. So, i have to use scripting task. And scripting task uses "web reference" to access web services, which in turn gives no way to change it's url.  So, if i want to test and then move to production, i'll have to edit my package to change the web reference url from "testserver:5123/mywebservice" to "productionserver:81/webservices/mywebservice". And then change it again to test it again. Etc. Is there a solution to this? A way to programmatically change web reference's url from inside scripting task?

SQL Server Browser missing on SQL Configuration Manager

Hi guys! Strange Issue, after installing SQL Server 2008 R2 Std on a Windows 7 the SQL Server Browser is missing on SQL configuration manager, although the service appears on the services.msc console. Log on as an user authenticated with administrator priveleges. Firewall is off. Can you help me?      

Created Package missing "[Content_Types].xml" file


I am creating a package using "System.IO.Packaging.Package" class.

when does the  "[Content_Types].xml" gets added to the created package. I am missing the xml file in the generated package.

Also in my code I am not closing the package till the end of the application and the xml is missing if the application get crashed in between only. else it is there.


Could not generate configuration file error



I am trying to create an xml configuration file for a very simple SSIS package, but I get an error "Could not generate configuration file."

While creating the config file using the Package configuration wizard, I do get an error saying "The properties tree could not be initialized" for one of the steps. I am sure this is somehow related to not being able to create the config file. The package was created on test server 01 and then copied to test server 02. When trying to create a new configuration file, I am getting this above error. I searched others who had similar questions. I am not using any user variables that store objects either. I am just storing the connection strings in the xml file.

Can someone please help?

Thank you


Technical Details


Could not complete wizard actions. (Microsoft Visual Studio)


Could not generate the configuration file. (Microsoft.DataTransformationServices.Wizards)

For help, click:

File MPR.dll Missing

Where can i download that file?

Doubt on WorkingSetMinimum setting in SSRS 2008 configuration file


Hello All,

I have been reading about memory settings for SSRS 2008 for better performance in this link.                                                          http://msdn.microsoft.com/en-us/library/ms159206.aspx  WorkingSetMinimum definition here says that "Specifies a lower limit for resource consumption; the report server will not release memory if overall memory use is below this limit."

Now, I have set the WorkingSetMinimum value as 2.4GB and when I am executing a report with 300K records, I observed in Perfmon that it has consumed around 1GB of available memory during report run time but the report server has not acquired the designated memory of 2.4GB in WorkingSetMinimum as I can see more memory as available MB than the value supposed to be after dedicating minimum memory of 2.4 GB to report server.

  1. My first question, has report server not acquired the minimum memory configured in WorkingSetMinimum because it didn't required that much memory to construct the report? &nb

Package configuration file with multiple connection strings


I am using the configuration file to read the connection string in the SSIS packages. In one of my packages i have to use two different connection strings. If i specify the second connection string in the config file, then the current package works well but other packages fails during validation saying the second connection manager does not exist in the package. Is it not possible to have multiple connection string in a single config file?

Using SQL CE 3.5 in a framework 4.0 environment. Missing file msvcr80.dll


Hi, we have an application that use SQL CE 3.5, distributed to several desktop machines via clickonce. The application has the framework 4.0 as prerequisite. To redistribute SQL CE 3.5 we followed the instructions provided at this page : http://msdn.microsoft.com/en-us/library/aa983326.aspx in the section "Private File–Based Deployment".

On one client machine, with XP SP3, and only framework 1.1 and framework 4.0 installed, we got an error, because the dll "msvcr80.dll" required by "sqlceme35.dll" was not found.

I remark that .net framework 2.0 and 3.5 are NOT installed on that machine.


Is there any prerequisite that we can add in the Visual Studio project that contains msvcr80.dll and any other dll required by SQL CE 3.5?


Daniele Bortoluz

BEDIN Shop Systems

Cannot save Configuration File ["ConfigurationSection properties cannot be edited when locked."]


I have the following code Segment

public Form1()
	Configuration MyConfig;
	ExeConfigurationFileMap MyMap = new ExeConfigurationFileMap();

	MyMap.LocalUserConfigFilename = Application.UserAppDataPath + @"\" + Application.ProductName + ".xml";
	MyMap.RoamingUserConfigFilename = Application.LocalUserAppDataPath + @"\" + Application.ProductName + ".xml"; ;
	MyMap.ExeConfigFilename = Application.CommonAppDataPath + @"\" + Application.ProductName + ".xml"; ;

//	MyConfig = ConfigurationManager.OpenMappedExeConfiguration(MyMap, System.Configuration.ConfigurationUserLevel.None );
	MyConfig = ConfigurationManager.OpenMappedExeConfiguration(MyMap, System.Configuration.ConfigurationUserLevel.PerUserRoaming);
//	MyConfig = ConfigurationManager.OpenMappedExeConfiguration(MyMap, System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal );

	MyConfig.AppSettings.Settings.Add("Now", DateTime.Now.ToString() );


I am running for the 1st Time and trying to create the initial Config file.

I get an exception "ConfigurationSection properties cannot be edited when locked." on the MyConfig.Save() method.  This happens with the OpenMappedExeConfiguration( ...PerUserRoaming ...PerUser

XML Configuration File Order in a Job


I have and SSIS 2008 package that is configured to two different XML files. One called 'Global' that has database and server name information for connection strings (that all packages point to), and another that is more specific to operations in the specific package (file paths, file names, etc).

A SQL Server Job will execute this package. Does it matter what order I have the config files in? My thought is that the database connections have to happen first, so the Global config file should be first, but I'm not sure.

Thank you for your help!


Missing "Foreach File Enumerator and Foreach Item Enumerator"


Ever since installing SQL Server 2005 SP1, when using the Foreach Loop
container in SSIS the Foreach File Enumerator and Foreach Item Enumerator are
missing from the Enumerator drop down box.  Anyone else seen this issue?  and
know how to fix it?




SSIS package is not reading from the configuration file in job step configuration tab

Hi everyone,

I have the following question. I have an SSIS package and it has in SSIS in BIDS 'Enable package configuration' and a full path to a file. The packages works ok and reads from this file.

 If I invoke the same package from sql agent as a job step and apply another configuration file in the job step (in tab COnfigurations), the package still uses the one in BIDS. Shouldn't this new config file overwrite the one from BIDS or?

Thank you

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend