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

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

web.config has incorrect settings for the requestFiltering element

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint

HI! When I upgrade from wss 3.0 to sharepoint foundation 2010, i find this error and the error is shown below:

Web.config file has incorrect settings for the requestFiltering element.

The requestFiltering element in web.config must have the allowDoubleEncoding attribute set to true in order to support file names with the + character in them. Also, it must have a child requestLimits element with the maxAllowedContentLength attribute set to 2147483647 to avoid interfering with file uploads.

Ensure the requestFiltering element exists in web.config, that its allowDoubleEncoding attribute is set to true, that it has a child requestLimits element, and that its maxAllowedContentLength is set to 2147483647. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=163442".


In the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\web.config, the maxAllowedContentLength is already set to 2147483647. 

Does anyone have any idea?


View Complete Post

More Related Resource Links

New appliesTo attribute on assemblyBinding element in web.config after upgrading website for Visual


We just upgraded from Visual Studio 2008 to Visual Studio 2010. We had to convert our projects and solutions, but we thought no changes were need for regular ASP.net websites. However, Visual Studio 2010 modified the assemblyBinding element in the web.config file to include the appliesTo attribute. The website is still targeting .net 3.5 and will be for a little while until we upgrade everything to 4.0.

So, is this attribute necessary? If so, why? We had hoped we didn't need to update all our websites solely for the purpose of using Visual Studio 2010 as we have a lot of them. We'll take the effort to upgrade them when we finally change them to target .net 4.0. Until then, is the web.config change necessary?

Here is what we had in web.config before the upgrade to Visual Studio 2010:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

Using web.config settings in a


Hi there,

I understand that one can specify a connection string in an <asp:SqlDataSource /> tag, like so:

<asp:SqlDataSource ID="sds" runat="server" ConnectionString="<%$ ConnectionStrings:LiveConnectionString %>" SelectCommand="SELECT Col1 FROM MyTable"></asp:SqlDataSource>

Is there a similar way to specify the table used in the SELECT command?  The following doesn't work for me:

<asp:SqlDataSource ID="sds" runat="server" ConnectionString="<%$ ConnectionStrings:LiveConnectionString %>" SelectCommand="SELECT Col1 FROM <%$ AppSettings:NewContentsListSQLTable %>"></asp:SqlDataSource>

I see from a previous post (http://forums.asp.net/p/1325626/2646097.aspx) that it's possible to set parameter values from web.config settings, so I'd hope you could specify the table (or columns etc.) as well!

All advice gratefully received.

Convert user.config to database storage via my custom settings provider



I've created my own custom settings provider to save user settings (formerly in the user.config) to a database. To point the particular settings that are to be saved to the database I specified

for each property to point to the BlobSettingsProvider instead of allowing them to default to the LocalFileSettingsProvider.
Now I need to convert existing user.configs to save to the database on the fly - a one time conversion. Because I've now specified the properties to use the BlobSettings provider they can no longer access the local user.config.
Does anyone have any thoughts on how best to accomplish this conversion (i.e. read the local user.config and populate the BlobSettingsProvider). The app can be run as a ClickOnce installed app or as a simple .net app - finding the correct local user.config looks to be a problem.
Thoughts, ideas,...?


Encrypt App.config for SMTP settings


Hi all,

I need to encrypt SMTP settings in the app.config file.I also read MSDN article that uses RSA also to encrypt/decrypt.
This is my code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace EncryptionDecryptionCA
  public class Program
    private static void ProtectConfiguration()
      // Get the application configuration file.
      Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

      // Define the Rsa provider name.
      string provideRsa = "RsaProtectedConfigurationProvider";


SELECT failed because the following SET options have incorrect settings: ANSI_PADDING


I come across the following error message quite frequently whenever I have to reinitialize any of the subscribers. Even though I know how to resolve it but always wondered why it would be produced at the first place as offending script is auto-generated by snapshot agent.


Error messages:

SELECT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Source: MSSQLServer, Error number: 1934)
Get help: http://help/1934

SELECT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Source: MSSQLServer, Error number: 1934)
Get help: http://help/1934

As a resolution what I have to do is to go to snapshot folder and update sch file for the offending table; i.e; change SET ANSI_PADDING from OFF to ON in sch file and it resolves the error message. What I have observed, though, that ANSI_PADDING is always off for those tables which contain only numeric data types. That is how I suppose it should be as I

First WCF Connection Slow and Proxy Settings in app.config file


I'm new to the WCF and currently facing problems with my first connection to a service we created to connect an Excel OBA to SAP. The first connection is extremely slow, approximately 20 seconds, but once it is establish everything goes really quick afterwards. I've read through some posts and seems like the proxy settings could have an impact. I'm pasting the code of my app.config file below, can you please let me know how I should modify it to include proper proxy settings to improve the first connection?

Also, the proxy thing is just a guess, is there anything else I could do to improve this? Any hint would be appreciated.

Thanks a lot!






xml version

Reconnect WCF klient useing app.config settings




I have a webservice with a reconnect button in the client. I'd like to implement the reconnect function. I have seen a lot of example how to reconnect but all of them implements it with setting the endpoint and everything in the code.

When open my client it uses the app.config settings to open the WCF channel. Actually I'm not a developer so I don't really understand how. I just instantiating my implemented webservice class and it do the job itself.

Is it possible to reopen channel / reconnect using the app.config settings without setting everything in code? Or do I have to set in the code every parameter?




I'm not a development! I'm an infrastructure engineer! Please be patient on the development forums! :)

hard code app.config settings in class



I wonder how to hard code the configuration below in a class. I have a case where I cannot use app.config (due to creation of dll).  The code below is probably not enough..any help is appreciated. Thanks in advance.

hard coded in class

ContractDescription contract = new ContractDescription("Common.MyInterfaces.IConnector");

Binding binding = new NetTcpBinding();

binding.Name = "net.tcp.binding";

EndpointAddress endPointAddress = new EndpointAddress("net.tcp://localhost:9001/Connector");

ServiceEndpoint serviceEndpoint = new ServiceEndpoint(contract, binding, endPointAddress);






        <binding name="net.tcp.binding"></binding>





        <behavior name

Service throttling behaviour app.config settings

How can I calculate the MaxConcurrentSessions, MaxConcurrentCalls and maxConcurrentInstances properties to set in the app.config ? I believe it should have some dependency on the # of CPU and the Max and Min worker threads based on which these parameters can be set.

Can you please guide me how can I provide them the number for these properties like we could calculate for ASP.NET.

FAST Search Server 2010 Config Error - ValidationException 1034: Username or domain is incorrect.



I've seen other related threads and I've tried all the tricks in getting through the post-setup configuration, but I can't get by the "ValidationException 1034: Username or domain is incorrect." error message taken from the FAST psconfig log. I've tried both the wizard and the psconfig, but get the same results. I'm attempting to deploy the single server (stand-alone) on a single x64 box, under ws2008 SP2, w/SP2010, the server is also the domain controller, and i've been passing the FQDN to the post-setup script as described in the FAST deployment document (see log below):

Verbose [1] PostSetupUI - Displaying next panel :Enter the user name and password
Verbose [1] PostSetupUI - Displaying button set to the default settings
Verbose [1] PostSetupUI - Next button clicked
Verbose [1] PostSetupUI - Starting to process form data of panel :Enter the user name and password
Verbose [1] PostSetupUI - Collecting input parameters from the text input controllers.
Verbose [1] PostSetupUI - Collecting value:dev.devnet.com\fastuser of input parameter: userName
Verbose [1] PostSetupUI - Adding config parameter: userName for the next validation parameter batch
Verbose [1] PostSetupUI - Collecting value of input parameter: password
Verbose [1] PostSetupUI - Adding config parameter: password for the ne

Visual Studio - Element ID Auto Complete Settings


I am a bit frustrated at the following. Yesterday I had a block of code that I wanted repeated in a series of conditional statements, ie., if ... elseif.... elseif... end if   When copy that block of code from one statement to the next VS replaces the id values for elements. I know that there can only be on ID per element per page but how can I stop VS from doing this? Thanks.

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Convert English to Arabic number without changing any regional settings in .net

Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.

validateRequest appears to be kicking in in MVC RC1 despite settings

After upgrading a project to the RC a System.Web.HttpRequestValidationException is thrown when posting a value containing HTML from a TextArea. I have checked that validateRequest=false in Views/web.config, and have set this in the application's root web.config. I have also created a fresh MVC project, created a simple view & controller and posted a simple html paragraph element with the same result. Call stack provided. [HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (html="

hello world

").] System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +8718538 System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +111 System.Web.HttpRequest.get_Form() +129 System.Web.HttpRequestWrapper.get_Form() +11 System.Web.Mvc.ValueProviderDictionary.PopulateDictionary() +113 System.Web.Mvc.ValueProviderDictionary..ctor(ControllerContext controllerContext) +74 System.Web.Mvc.ControllerBase.get_ValueProvider() +31 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +53 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +109 System.W

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

get value from xml element



i have this xml

<Field Name="Users_wff_AU" Type="FIELD_TYPE_STRING" MultiValue="True">
<Value No="1">xyz</Value>
<Value No="2">abcl</Value>
<Value No="3">xcc</Value>

i want to get the  xcc in string variable

Dim strwfUser As String = xNode.Item("Value").InnerText

reading values from config files in NUnit tests


One of my NUnit tests has to read in some values from config files.  In my main application this process works perfectly well, however when I run the unit test, the code that reads in the values from the config files doesnt read anything in.  Ive tried putting app.config in my unit test project (I even tried web.config) but nothing seems to work.  Are there any special steps involved when reading from config files in an nunit test ?

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