views:

141

answers:

4

I have an ASP.net web app and on my test (database) server I have enabled sqlserver to store the viewstate and when I run the app from visual studio this works fine.

However when I try to host the app on the production machine (IIS 6) the viewstate is still present in each page request.

If I use the exact same connection settings against the production machine and run the web app from within visual studio the viewstate is not present.

This leads me to believe that theres either

1) Something I need to enable/disable in IIS 2) Something in my production web.config thats interfering.

If anyone can help me solve this problem it would be much appreciated.

Note Should add that I'm using Ironspeed to generate the pages. So there might be a configuration issue that ironspeed requires.

SOLVED It was an issue with Ironspeed which is a third party application for generating asp.net pages - a key was required in the web.config which was on my local machine but not in the production machine. Guess when you inherit another framework you also need to make sure you follow the framework requirements.

A: 

Do you have <pages enableViewState="false" /> inside the system.web section of your web.config...? This should disable viewstate for all pages.

Simon Fox
+2  A: 

The first problem I see is with your question itself because 'session' and 'viewstate' are two entirely different things.

Viewstate will be there regardless what your session persistence mechanism is...

POST EDIT:

Good that you changed your question but there is not a native or built in method for persisting viewstate outside of the default behavior - which begs the question what method are you using?

keithwarren7
Hi thanks for your answer, I've got the problem fixed now but to answer your question I was using the ASPState database in SQLServer created with the ASPnet_regsql.exe -ssadd command.
JSmyth
A: 

Make sure you understand the difference between Session and View State. They are similar, but separate concepts. You are storing your Session in SQLServer, but you still have View State enabled.

Eric King
A: 

SOLVED It was an issue with Ironspeed which is a third party application for generating asp.net pages - a key was required in the web.config which was on my local machine but not in the production machine. Guess when you inherit another framework you also need to make sure you follow the framework requirements.

JSmyth