<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

How to enhace max upload size and solution for MAC failed error in your web application

Published on
10,985 Points
4,985 Views
Last Modified:
Approved
Q1.Enhance max upload size:=>

It's a problem I'm sure many of you have faced in developing web applications
that how could i upload the file with large size so here is solution for this problem:

Make change in web.config it will help you to enhance max upload size try this
:

<httpRuntime executionTimeout="1200" maxRequestLength="102400" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>

Open in new window



Q2. Mac faild error in your web application.

Validation of view state MAC failed.

 If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.


Try this:


<pages enableViewStateMac="false" >

Open in new window

0
Author:apexpert
1 Comment
LVL 4

Author Comment

by:apexpert
hello,

this is a tip to enhance max upload size and general coming error on web applications like validation of viewstate MAC failed...
0

Featured Post

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month