开发者

Why does a change of Session State provider lead to an ASPx page yielding garbage?

I have an aspnet webapp which has worked very well up until now.

I was recently asked to explore ways of making it scale better.

I found that seperation of database and Webapp would help.

Further I was told that if I changed my session providing mechanism to SQLServer, I would be able to duplicate the Web Stack to several machines which could each call back to the state server allowing the load to be distirbuted better.

This sounds logical. So I created an ASPState database using ASPNet_RegSQL.exe as detailed in many locations across the web and changed the web.config on my app from:

<sessionState mode="InProc" cookieless="false" timeout="20" />

To:

<sessionState mode="SQLServer" 
 sqlConnectionStrin开发者_开发百科g="Server=SomeSQLServer;user=SomeUser;password=SomePassword"
 cookieless="false" timeout="20" />

Then I addressed my app, which presented me with its logon screen and I duly logged in.

Once in I was presented, with a page that was not with the page I was expecting.

I can change the sessionstate back and forth. This problem goes away and then comes back based on which set of configuration I use.

Why is this happening?


Nice error Dude :)

Probably a red-herring, but what are you storing in Session state?

When you move from InProc to SQL Server, the stuff you store in SQL must be Serializable (I think)


Use Fiddler to see what's really going on over the wire. To me it looks like your app is sending back an image when the browser is expecting HTML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜