I have a Web.config in my application root dir with the following pages
directive:
<pages buffer="true"
enableViewState="false" enableSessionState="false"
enableViewStateMac="false"/>
And then one in a subdirectory with this one (viewstate enabled):
<pages buffer="true"
enableViewState="true" enableSessionState="false"
enableViewStateMac="true"/>
View state does NOT get enabled in the subdirectory. If I change the pages
directive in the root dir, ViewState goes on. Otherwise, it doesn't. I
can't imagine how this isn't a bug... Any ideas?
As a possible aside, the page in the subdir uses a control, that is also in
the subdir. I put a check in the controls Page_Load of the control to check
ViewState. It thinks it's on.
if (Page.EnableViewState == false || this.EnableViewState == false)
{
Response.Write("Cannot run without view state");
Response.End();
}
Thanks
--max 7 2992
Hi Max,
As for the problem( <pages enableViewState="true|false" /> can't be
override via web.config in sub dir), I've also done some tests on my side
and did encounter the same problem. And currently I'm consulting some
further experts to confirm whether this is a known issue of the asp.net
configuration and will give a update soon. Also, I think as for such
problem on specifying a override configure schema for asp.net sub dir , we
can use the <location> element in the root web.config file instead of
puting a separate one in sub dir. Here are some reference on applying the
<locaiton> elemtn to implement hierarchy configuration in asp.net app:
#<location> Element http://msdn.microsoft.com/library/en...ationElement.a
sp?frame=true
#Configuration <location> Settings http://msdn.microsoft.com/library/en...igurationlocat
ionsettings.asp?frame=true
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks for the reply. It looks as if doing it in a location directive
doesn't work either. Same behavior, it says it's working (the page thinks
viewstate is on), but it's all a big lie. :)
--Max
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:q9*************@cpmsftngxa10.phx.gbl... Hi Max,
As for the problem( <pages enableViewState="true|false" /> can't be override via web.config in sub dir), I've also done some tests on my side and did encounter the same problem. And currently I'm consulting some further experts to confirm whether this is a known issue of the asp.net configuration and will give a update soon. Also, I think as for such problem on specifying a override configure schema for asp.net sub dir , we can use the <location> element in the root web.config file instead of puting a separate one in sub dir. Here are some reference on applying the <locaiton> elemtn to implement hierarchy configuration in asp.net app:
#<location> Element http://msdn.microsoft.com/library/en...ationElement.a sp?frame=true
#Configuration <location> Settings http://msdn.microsoft.com/library/en...igurationlocat ionsettings.asp?frame=true
Thanks.
Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Max,
Thanks for the followup. I'm still consulting some further experts on this
issue. I'll update you as soon as I've got any new infos. Thanks for your
understanding.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Max,
It seems a bit strange, I've try set the sub dir ( in IIS manage console )
as an application and then set it back to a normal dir and restart the IIS
server, after that , all is working well. The web.config in the sub dir's
setting can override the root web.config file's setting. Would you please
also have a try on this.
You can make the sub dir as an application virutal dir and test again.
Then, reset it back to a normal dir and test to see whether this helps.
Currently on my side, the enableViewState override works well.
If you have any new findings or question, please feel free to post here.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Max,
Have you got any further ideas on this issue? If you have anything unclear
or if there're anything else we can help, please feel free to post here.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
My not-so-fun-but-no-so-hard solution was just to mark enableviewstate=false
everywhere, in all controls and pages, and the remove it from web.config.
Then I can turn it on selectively.
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:3S**************@cpmsftngxa10.phx.gbl... Hi Max,
Have you got any further ideas on this issue? If you have anything unclear or if there're anything else we can help, please feel free to post here. Thanks.
Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Max,
You mean the setting in sub folder's web.config file still not working on
your side? Have you tried the means mentioned in my last reply? Or you can
try this on another machine to see whether it work. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Verwer |
last post by:
Hi
I have a problem which is easily reproducable using VS.NET 2003 and the .Net
framework 1.1 (not tested with framework 1.0) regarding disabling ViewState
for dynamically created controls.
...
|
by: Ravikanth[MVP] |
last post by:
Hi
Even though the Viewstate has been disabled, ASP.NET
still uses about twenty bytes for Viewstate.
Not only can you disable Viewstate at the page level, but
you can also disable Viewstate...
|
by: Bruce Chao |
last post by:
I tried to turn off viewstate and so I added enableViewState=false in
side the Page directive, rebuild the page, test it. - not working
Then I set all controls on the page so all their...
|
by: Brian Henry |
last post by:
Hi,
I want EnableViewState = false turned on to optimize the end output page (it
was over 600KB with it on) but when i turn it off, our pageing functionality
no longer works mainly the...
|
by: Michael Baker |
last post by:
Overriding the view state in web.config for various locations never worked
for me before. However, i just tested it on my machine after the 1.1 sp1
framework upgrade and it appears to work now. I...
|
by: bdeviled |
last post by:
I am deploying to a web environment that uses load balancing and to insure
that sessions persist across servers, the environment uses SQL to manage
sessions. The machine.config file determines how...
|
by: Just D. |
last post by:
Does anybody know any good solution to avoid this setting to be enabled? I
guess Microsoft doesn't care of the Internet connection of the potential
client working with asp.net. This EnableViewState...
|
by: |
last post by:
Here is an interesting one. If I disable viewstate in the web.config file,
but enable it on a specific page, it doesnt save the viewstate on postbacks.
I have to actually enable it in web.config.
...
|
by: John H Clark |
last post by:
I am designing a site that requires AnonymousID. I set my web.config to
allow this using <anonymousIdentification enable="true".../as recommended
in the documentation.
To verify the settings I...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |