.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

IgnoreNulls in validation Configuration file

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

How to specify IgnoreNulls in validation Configuration file rather attribute for proerty?

I could not see Add Validator -> IgnoreNulls in Configuration Editor.

View Complete Post

More Related Resource Links

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


set messageTemplateResourceName from resource file in Validation appication block.



  I am using Validation application block in my project and want to set validation message from resource file, but not able to do that. I tried giving the path of resource file in messageTemplateResourceType and name of resource in messageTemplateResourceName. But it did not help as I only receive the message if I have set something in messageTemplate even after setting the resource file.

Here is my code:

<validator lowerBound="1" lowerBoundType="Inclusive" upperBound="250"
              upperBoundType="Inclusive" negated="false" messageTemplate=""
              messageTemplateResourceType="Asurion.jCare.Common.Resources.UIResources.PerilTypeAndDetailsSection, Asurion.jCare.Common.Resources, Version=, Culture=neutral, PublicKeyToken=null"
              tag="" type="Microsoft.Practices.EnterpriseLibrary.Validation.Validators.StringLengthValidator, Microsoft.Practices.Enterpris

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

An error has occurred while trying to access the license validation key file. Please reinstall SQL S

I'm getting this error following installing SQL 2008 on a Windows 2008 R2 OS when trying to open SQL studio, can anyone offer explanation why this is occurring ?  I have installed SQL 2008 SP1. I see many others have also had this issue but cannot find a documented solution and/or confirm reason as to why it occurs.

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

Configuration file missing

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

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?

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:

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?

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!


server side validation to file upload control in asp.net



how to validate a file upload control to allow  maximum "100kB" Size images.if exceed it should fire a asp validation"file size must be 100KB maximum".


Many Thanks in Advance. 

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


How to specialize the path of configuration file which the application about to read?


Simplily, i have a solution which can be normally run, but after i renamed the app.config to otherName.config, the app would not file the configuration file at its runtime. so how to specialize the path(include the file name such as otherName.config).



i recently build a WCF solution, in Server project, i manipulate data by using ADO .NET Entity Framework. both WCF Host project and EF project needed their configuration files and the default name of these configuration files is app.config.

When we code, there is no need to manipulate the XML formatted app.config file, we just use following codes, ant the .NET application can automatically retrieve elements from app.config:


 // WCF Project
 using (var host=new ServiceHost(typeof(Server.Settings.Configration))) {
 Console.WriteLine("WCF has been started, press any key to end..");
// EF Project

MVC File Upload Validation


I like how the "Html.ValidationMessageFor" and "Html.ValidationSummary" helpers work for validating textboxes, such as for required fields.  Is there some way I can accomplish the same thing for a file input control?  From the examples I've seen so far you cannot directly bind a file upload to your model, so I can't use the [Required] attribute that I am using for the textboxes.  Any suggestions/examples on how you'd accomplish this.

(I am using MVC 2 & .Net 3.5 in Visual Studio 2010)

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