Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...First Run Problems - EventQueue Issue ?First Run Problems - EventQueue Issue ?
Previous
 
Next
New Post
11/5/2006 1:22 PM
 
I will keep looking into this as time permits. I have also seen a blog by one of the IIS team I think (I will have to try to find it again), that recommends ASP.Net sites run under the same App Pool. This is to reduce the overhead on the .Net Framework, since it only has to be initiated once, go figure......

Now I have not tried this, as I do not know the DNN code well enough. But would it be possible to store the Identity that the Schedule is running under, and also the identity that the site is running under in the database. Then at some point in the web site code (when it would definatly be running under the website identity) to check these values. If the differ, then shutdown the schedule tasks. Once they are shut down restart them (ie dispose of the schedule object, then create it again). This way it would be created and running under the site identity and not the App Pool one?

Just an idea, not sure how fesable it is though.
 
New Post
11/5/2006 2:17 PM
 

Running a fairly large host here in the UK I am well aware of .NET security in the shared hosting environment. The real problem is that .NET code in the Application_Start event is running before .NET enables impersonation of the IIS website user as per our .NET configuration, thus meaning the code in Application_Start runs as the Application Pool user.

Now whilst you and Microsoft say the "recommended solution" is to run each web site in its own Application Pool - its not a recommendation made very well as it is pretty generic. There is no way that a low cost budget host can afford to give every single website its own Application Pool - I have spoken to the Microsoft UK Hosting Manager about this and he agrees.

Now, there are two ways forward:

1) Have Microsoft fix the problem in .NET so that impersonation is applied on all executed code.

2) Implement a simple fix in DNN so that the code in Application_Start is actually executed later in the main application code. This would be the better option, would suit everybody and doesnt rely on us having to wait months for a Microsoft fix.

 
New Post
11/5/2006 7:02 PM
 
redfoxuk wrote

2) Implement a simple fix in DNN so that the code in Application_Start is actually executed later in the main application code. This would be the better option, would suit everybody and doesnt rely on us having to wait months for a Microsoft fix.

Do you know of another place later in the main application code that the code can be executed only on application startup?  The closest place I know of is in the init command of an httpModule, but this method can be executed several times inside an application.  If I remember right we even moved the starting of the scheduler from the application start to the init method and then had to move it back again because it was being executed multiple times.

 


DotNetNuke Modules from Snapsis.com
 
New Post
11/6/2006 4:18 AM
 
Is it not possible to set some sort of Application level flag that says if the code has ran or not? Then you just need to check this flag, if the code has ran already then you don't run it..
 
New Post
11/6/2006 10:49 AM
 

Tanzy wrote
Is it not possible to set some sort of Application level flag that says if the code has ran or not? Then you just need to check this flag, if the code has ran already then you don't run it..

Yes, this was discussed at the time when we were moving the schedule code areound. It was rejected for some reason, but I think it may work.  What I would like to try is putting the flag into the application cache and execute the code in the Init method of an httpModule (the UrlRewrite module would work).  I have a feeling that even the init method may not have the impersonated user switch yet, but it is worth a try.

If you get a chance to try it before I do let me know what you find out.


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...First Run Problems - EventQueue Issue ?First Run Problems - EventQueue Issue ?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out