Global.asax on a shared Server

vita10

Perch
Hi,
I implemented a simple user/roles system for the website I use it on shared Windows server.
It is basically what is described here:
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=433
It works fine as long as I run it on my inhouse server.
If I deploy the application it seems like the code part were user roles are checked on
"Application_AuthenticateRequest" in code behind of Global.asax.
is not executed.
I can reproduce it on the inhouse server if I do NOT copy the Global.asax into the root directory. How ever on my jodohost server it is in the root, and yet it seems as were it missing. I requested support but I was just forwarded back and forth for 2 weeks now. One thing I know that permissions on Global asax seems to be fine. And user gets authenticated only the roles are gone.

I think I am not the first one on Jodohost who does some thing that is describe in the article above.

Does any one know were to look for errors? What am I doing wrong?

Thank you

Vita
 
Hi Vita

This may be totally irrelevant but I'm a big fan of Rocky Lhotka's CSLA framework. His examples create the principal etc on the Application_AcquireRequestState event.

I don't have Rocky's book with me right now but I remember reading something in it saying that Application_AuthenticateRequest might sound like the obvious event to use but it's really too early in the sequence of events. There are things that are not setup properly until AcquireRequestState. So ... that might be worth a try.

CSLA unfortunately won't work on shared hosting. It needs full trust.

Cheers
Ross
 
thanks for the tip.

After buggin the guys from support it finally works on my jodo host test server
but not on production. I am not quite sure whether why cause i never got an answer to why it did not work and how they made it work.so once more i have to wait. Hopefully less than 3 weeks this time
 
Hi
thank you Jodohost support for being there for me 24/7!!! :D
I my case it was start stop the server.
I was googleing this topic and basically there a number of issues that can resolve the problem.

Problem: Events are not fired in Global.asax
Resolution (one of em could work)
Stop the Website deploy Start the Website (worked for me but i never read about that)
Put the code behind of Global.asax inside a <script > block
Remove the Gobal.asax from the VS2005 Project and add it again.
Change the Event Name from Application_Start to Application_OnStart
Remove PrecompiledApplication.config

Anyway in case someone will have the same prob
 
Back
Top