I found the problem, basically I'm using a different project for my Business Logic so needed to import the System.Web assembly into the class to access the Httpcontext class. It's actually bad practice to use the httpcontext I guess as it then requires a web front end but in my case I'm going to use it anyway. Regards, Adrian
Adriann
Posts
-
Business Logic and the current context -
Business Logic and the current contextNo, I did think that would be how I could access it from the BLL but it's not available for some reason. Thanks for the suggestion though. Any other ideas? Thanks,
-
Changes not applying in productionDo you control the web-server? Could the site be being cached by a content acceleration server? If you re-name the folder on the website and can still hit the website then there is something wrong :). I would double check IIS to make sure it's pointing at the right location. If it is, then create a test HTML page in the root and try to access if from the site. If you can see it you know the website is working. Then update that file and see if you can see the updates. If you can then I agree, it must be something you're doing with the release of the new code. Thanks, Adrian
-
Business Logic and the current contextHey all, I've refactoring a site of mine from VB.Net to C# and using a more structured OO design. I have the main solution with the web project and then another project for the BLL and DAL. I'm creating a additional security class in the BLL and I want to be able to access the context of the user but I'm having a bit of a brain freeze. I know it's the HTTPContext.Context.User class but how do I inherit the this in the BLL function I've created? I've tried HTTPContext.Context but then User is not available. Any help provided would be greatly appreciated! Thanks, Adrian