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

Top 5 Contributors of the Month
Post New Web Links

Application Settings Values

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :.NET Framework

In my application settings, I know there are some default values that the application can read from, for instance, using a string value for the default directory (something like this if you wanted to set the default application directory to a text file:   |defaultapplicationdirectory|/logfile.txt)  I'm just using that as an example, I'm not sure if " |defaultapplicationdirectory| " is the correct format, but that's what I'm looking for.  I'm also wondering if there are other "default" terms that can be used in the app settings values and where can i find a list of those defaults that can be used there?

edit:  (Visual Basic Application settings for Windows Forms Applications)



I will be legendary someday, just not today.

View Complete Post

More Related Resource Links

Application to Constantly query Table Values and Refresh with most recent value

Hello, I must apologize in advance because I am not sure if this is the correct place for this question. I am looking for ideas on how to build an application that in the most basic sense contains a field with the most current data from a table in a SQL Server database (this would be based off of a datetime timestamp in the table). I am new to this kind of problem and am unsure where to start looking for solution ideas. The table value updates variably and could possibly update every second to every hour. I would like to design an application that would be lightweight to both the server and the user's machine. This would take the place of an unneeded report on my Reporting Services server. Any and all suggestions would be welcome because I am not sure of options I even have on this. Thanks in advance for your time and consideration, Matt

The Best Place to store Settings for Web Application.

I want to create an Application Setting or Control Value for "Application Run Mode", which will indicate if the application is in Testing Mode or Live Mode. So I have created this Enum Type: Public Enum AppRunModeType Live Testing End Enum and, this will be used inside the the Web Application to determine if the application run mode, and hide/show some UI Controls accordingly. This Setting "Application Run Mode" is not a User Setting, it is a setting to be controlled by the developer who is deploying the application. Where is the best place to store this value ? I am thinking there are 2 places: 1. In web.config "appSettings" secting, 2. Or in Project Properties Page/Settings Section. If I choose to store it in web.config, then, I will not be able to have Strong Type Access to the value like the Enum type, and I have to convert from Enum Type to String and vise versa. If I choose to store it in Project Properties Page/Settings Section, then I cannot do that, becuase my Web Application is not a Porject and I cannot find this page there, or I will have to convert the Web Application to a Web Application Porject, and this is a Long Story. Also, How I can access My.Settings object from the Web Application ? Appreciate if some one could point me to the right direction and the best way to hanlde such requirement.

error: "The application-specific permission settings do not grant Local Activation "

Log Name:      System Source:        Microsoft-Windows-DistributedCOM Date:          9/14/2010 11:55:35 AM Event ID:      10016 Task Category: None Level:         Error Keywords:      Classic User:         XXXXX\spadm Computer:      XXXX.XXXXX.com Description: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {61738644-F196-11D0-9953-00C04FD919C1}  and APPID {61738644-F196-11D0-9953-00C04FD919C1}  to the user XXXXX\spadm SID (S-1-5-21-6236335-3733969977-3477648964-5701) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">   <System>     <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />     <EventID Qualifiers="49152">10016</EventID>     <Version>0</Version>  &nb

Cache settings on shared application pool

I have several web applications on a server using the same application pool. The worker process usually takes a lot of ram but usually only from one application. I can successfully limit the cache usage by setting "PrivateBytesLimit" in web.config file when the application uses it own dedicated application pool. Does anyone know how this setting will be applied when using shared application pool? Is it per application, per worker process or per application pool? Also if it is not per application which setting from which application will be applied?

Language settings in WPF application



Is there a way to change the keyboard layout for WPF applications according to the selected Region and Language settings of the system?

To explain more about the problem, please find the scenario below.

Normally, In English(US) culture, the decimal numbers are seperated by dot(.) seperator. But in Dutch(Netherlands), the decimal numbers are seperated by comma(,) seperator. After changing the Region and Culture settings to Dutch(Netherlands), if you open the excel sheet and type a number with number pad in the keyboard, when we you use dot(.) symbol in the number pad, it will be automatically replaced as comma(,) by the application. How can we achieve the same using our application in C#?

Thanks in Advance!!!!

Best Regards,
Subalakshmi Vijayarajan.

Unable to set "column settings" of Yes/No (Check Box) values "Required, Optional, Hidden" of content


Hi, SharePoint 2010 and I have created a number of site columns of type Yes/No (check box). I have created a number of content types and used these column types but when I try to change the column setting within the content type to "Required, Optional or Hidden" I am unable as the settings are greyed out and I am unable to change them.

Even in the Parent content type I am unable to change this particular type of column value so it isn't an inheritence setting as it's the parent content type. Am I doing something wrong?  

Note - I am recreating a list from a SharePoint 2007 site and I am able to change the setting here, have i configured this incorrectly or was this something that could be done in SP 2007 but not SP 2010.

Thanks fo any help.

Single Sign on - Manage settings for enterprise application definitions - Individual / Group



I am using Microsoft Single Sign On service in context to Sharepoint server 2007.

I want the external applications to use the single sign on service for authentication within a secure Enterprise portal environment.

Here the external application should be authenticated via single sign-on. But while configuring SSO in Share point central admin, it offers two methods of "Manage settings for enterprise application definitions" which is Individual and Group .

According to my requirements,

1. I need some set of users (may be a group of users) to make use of credential1 to authenticate the external application. so Group should be mapped to one common external credential1 .

2. I need rest of the users who does not belong to the above said user group should use individual external credentials mapped to Individual user .

I need both of these scenarios to be handles using a single Application definition created for my external application.

So suggest me an ideal way to achieve this mixed Individual and Group credential mapping in SSO



Thanks, Kesavamoorthi

User-specific application settings vs Isolated Storage


I was wondering what's the difference between these two ways to store user-specific settings.

In isolated storage you're supposed to have the security that the path to the files is unknown. But MSDN still recommends not to store sensitive information. On the other hand, user-specific settings, maybe with default values in the app.config file, are also stored in a randomly generated folder. In this case I imagine that you can encrypt the user settings the same way you do with the app.config file.

My question is, what are the advantages of using one method over the other to store user-specific settings?

Defining a regular expression in the application settings xml file.


I have a little question about application settings. I have a regular expression in my code which should be customizable by the user so I made an application setting for it.  The regular expression is used in a class in the project and has the following value

Dim email_regularex As String

So now I made a new Settings file in my project and gave the following value for this string in the settings file:



So when i do this in Visual Studio 2008, Visual Studio automatically creates a app.config xml file with the right settings in it.

But when I start my application and use the regular expression like this:


 myMatch As

 Match = Regex.Match(email, email_regularex)


 myMatch.Success Then

 MsgBox("Please enter a valid email address like: iiiiii@iii.com"

, MsgBoxStyle.Critical)


the application break

Incoming email settings on Application Template: Help Desk

I've installed the Help Desk application template and created a new
site based on it.  All looks great except that I can't figure out how
to set the site to receive incoming emails which would in turn create
a new service request.  Hopefully it's there and I'm just not seeing

TIA for your help.

SharePoint 2010 Service Application Proxy & My Site Settings


I have a SharePoint 2010 Site Configured with Claims based FBA. I have also made My Site work with FBA.

My question is:

In 2007 I would create a seperate SSP for FBA based my site and Set all configuration there. As SharePoint 2010 supports Service Application Proxy how can I isolate FBA based My site and Other AD sites.

While I was able to select the required services for my Site using Configure service application associations link in Central admin, all changes I make in My Site Settings reflect for both FBA & AD based application.

How do I isolate My Site changes ?? I wanted to have different configuration for each of the My Sites

Reading Web.Config to pass values to silverlight Application

In asp.net application we often use to save the connection string and some other information like user name , web service URL etc in the web.config and then in application read them and use in the application and even we can easily changes these value at later time.However, this scenario does not work out of the box from a Silverlight application, which doesn't seem to even have access to web.config.The reason is simple: a Silverlight application runs on the client side. The XAP -just like the browser- cannot access server resources such as web.config. In this post I will show you how you can read the web.config and pass to the silverlight application and then on the silverlight application how can you read the passed parameters.

using application settings in VB expression


I have a simple workflow that is hosted in a simple application that has a app.config and appropriate settings file.

In the settings there is a connection string and a timeout value.

I have a coded workflow activity in an activity library that can receive a connection string and timeout as input parameters.

So when I add this activity to my workflow I have to pass values to the parameters using the VB expression syntax in the expression editor. What expression can I use to refer to the settings ? My.Settings.MyConnectionString does not seem to do the trick. I have tried several possibilities but have failed to find it up to now. I had to modify my activity itself to access the settings but since it is in a seperate activity library I have to go via the configurationmanager which seems a bit less generic than simply passing in the connection string as a parameter.

Sharepoint web application settings




I'm trying to implement a test design, based on this http://technet.microsoft.com/en-us/library/cc261995.aspx sample.

I want to create an Intranet publishing site, a team site and a partner website for external users.


I have to admit, I'm a bit confused about the settings for the new web applications:

- should i create a separate IIS website for each web application (intranet, team, partner)?

- where should i put the urls (http://company, http://team, http:/partner.company.com), in the host header or in public url fields (or both)?

- what site collection template should i use to create the parner web design (project 1-3) shown at the sample?



Session-state values and session-level settings


what does it mean by Session-state values, stateless session and session-level settings mean??


Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:

Integrating a Legacy Web Application in SharePoint

This month we will continue with the theme of deploying Microsoft's SharePoint as a company intranet by describing a method for integrating a legacy Web application inside a SharePoint site.

In many companies the intranet site is not just a home page with announcements. It houses Web applications used by many different departments. In last month's article, I built a page to search the employee table in Northwind (the sample database included in Microsoft's SQL Server). This month, I will move the Web pages used to add/remove records from the table into the SharePoint intranet.
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