FormsAuthentication and "unable to validate data": HELP!

H

Harrie Verveer

Hi,

I'm building quiet a large webapplication (CMS) in ASP.NET. On localhost
the application runs fine. For publishing we use 2 hosting providers at
the moment (let's call those 'A' and 'B'). Hosting provider A doesn't
give any problems and the application runs just fine. On hosting
provider B there are some problems, and I just can't figure it out =(.

My users login using FormsAuthentication. After clicking through the
application for a while (like 5 times) suddenly the login screen appears
(authentication data suddenly is lost). Sometimes the error "unable to
validate data" appears - which could indicate that there is a viewstate
error.

I phoned hosting provider B with this question. They said it is probably
because my application uses too much memory (the server flushes your
memory space when it exceeds 200MB(!!!)). I have monitored the memory
usage using the system monitor in the control panel - but the
application uses about 14MB only (with a peek of 80MB max).

I tried to fix this problem calling GC.Collect() almost everywhere in my
app, but it isn't any good =(. Now what really bothers me, is that I am
trying to fix this problem for 2 days now and I'm pretty much messing up
my application, just to make it work for hosting provider B - while the
app runs just smoothly on hosting provider A :(.

Any comments on this problem? What can I check? Maybe it's important to
say hosting provider B gives me medium trust, while I got full trust on A.

I'd really appriciate any comments on this topic.

Thanks in advance.

Harrie Verveer
 
G

Guest

What DB and provider do you use?
We had some memory leaks when using Oracle DB with Oracle's own dataprovider.

Application appeared to be working fine, but in fact it's memory usage was
raising slowly higher and higher until whole server crashed.
 
R

Richard Myers

Then why use the second provider? ;=)

Maybe it is a problem with viewstate. Are you generating your own machinekey
value for use in the config file? If your provider has a webfarm setup then
the viewstate transmitted from one server on the webfarm will be invalid
when received on another unless you have the machine keys in your
web.config.

i.e
<machineKey
validationKey="2A63B5A96C31043D2B327BD4B9800FE375747DDBE0842D04CC9161F8DBCBB
CECE2D86D4980A837C5C2B91B08F03B415D08B72D5B183840DD768FE1711DCFB6B1"
decryptionKey="46249DE4B29381B374EBC51DE30DC60556040F046D173C0B"
validation="SHA1"/>

Heres a couple of links:

http://support.microsoft.com/default.aspx/kb/831150

http://support.microsoft.com/default.aspx/kb/831150

Richard


"Harrie Verveer"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top