Click here to Skip to main content
15,889,116 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Silverlight concept.... Pin
Christian Graus15-Mar-09 23:38
protectorChristian Graus15-Mar-09 23:38 
AnswerRe: Silverlight concept.... Pin
rakeshs31215-Mar-09 23:47
rakeshs31215-Mar-09 23:47 
GeneralRe: Silverlight concept.... Pin
Ch.Gayatri Subudhi16-Mar-09 0:34
Ch.Gayatri Subudhi16-Mar-09 0:34 
GeneralRe: Silverlight concept.... Pin
Christian Graus16-Mar-09 1:00
protectorChristian Graus16-Mar-09 1:00 
Questionregular expression in ajax tab container/tab pannel Pin
wasifmuneer15-Mar-09 23:23
wasifmuneer15-Mar-09 23:23 
QuestionHttpCOntext is null for windows application Pin
gottimukkala15-Mar-09 23:15
gottimukkala15-Mar-09 23:15 
AnswerRe: HttpCOntext is null for windows application Pin
SeMartens15-Mar-09 23:24
SeMartens15-Mar-09 23:24 
GeneralRe: HttpCOntext is null for windows application Pin
gottimukkala15-Mar-09 23:35
gottimukkala15-Mar-09 23:35 
Hi Sebastian,

Thank you for your reply. I didn't get exactly. The followign code explains clearly how I want to have it in windows applciation.

My dll which access my handler.


private void button1_Click(object sender, EventArgs e)
{
LoadConfigFile(System.Threading.Thread.GetDomain().BaseDirectory);
HttpContext context;
try
{
context = (HttpContext)HttpContext.Current;
}
catch { }
doXtopNotifications.EmailNotifications emailNotifications = new doXtopNotifications.EmailNotifications(this.lastExecutionTime, this.actions, context);
}

EmailNotifications.cs

public GlobalSettings gs;

public void Init(HttpContext ctx)
{
ConfigurationProvider configProvider = new ConfigurationProvider(ctx);
this.gs = configProvider.GlobalSettings;
}

public EmailNotifications(DateTime lastExecTime, XmlNodeList actions, HttpContext ctx)
{
Init(ctx);
}

My Handler class:


public class ConfigurationProvider
{
GlobalSettings _globalSettings = null;
HttpContext context = null;

public ConfigurationProvider()
{
context = HttpContext.Current;
}

public ConfigurationProvider(HttpContext ctx)
{
context = ctx;
}

public GlobalSettings GlobalSettings
{
get
{
//My Code fails in this block of code. I need to get GlobalSettings to access.

if (this.context != null)
{
if (this.context.Application["GlobalSettings"] == null)
loadSettings();
else
_globalSettings = (GlobalSettings)this.context.Application["GlobalSettings"];
}
return _globalSettings;
}
}
}
GeneralRe: HttpCOntext is null for windows application Pin
SeMartens16-Mar-09 2:10
SeMartens16-Mar-09 2:10 
GeneralRe: HttpCOntext is null for windows application Pin
gottimukkala16-Mar-09 2:15
gottimukkala16-Mar-09 2:15 
GeneralRe: HttpCOntext is null for windows application Pin
SeMartens16-Mar-09 2:33
SeMartens16-Mar-09 2:33 
QuestionJavascript [modified] Pin
Ch.Gayatri Subudhi15-Mar-09 23:05
Ch.Gayatri Subudhi15-Mar-09 23:05 
GeneralRe: Javascript Pin
Christian Graus15-Mar-09 23:17
protectorChristian Graus15-Mar-09 23:17 
GeneralRe: Javascript Pin
Ch.Gayatri Subudhi15-Mar-09 23:25
Ch.Gayatri Subudhi15-Mar-09 23:25 
GeneralRe: Javascript Pin
Christian Graus15-Mar-09 23:38
protectorChristian Graus15-Mar-09 23:38 
GeneralRe: Javascript Pin
Ch.Gayatri Subudhi16-Mar-09 0:36
Ch.Gayatri Subudhi16-Mar-09 0:36 
GeneralRe: Javascript Pin
Christian Graus16-Mar-09 1:01
protectorChristian Graus16-Mar-09 1:01 
GeneralRe: Javascript Pin
Ch.Gayatri Subudhi16-Mar-09 18:11
Ch.Gayatri Subudhi16-Mar-09 18:11 
QuestionRefresh parent Grid Pin
Member 322226415-Mar-09 22:34
Member 322226415-Mar-09 22:34 
AnswerRe: Refresh parent Grid Pin
Christian Graus15-Mar-09 23:17
protectorChristian Graus15-Mar-09 23:17 
QuestionMaster Page in VS 2005 Pin
Member 322226415-Mar-09 22:30
Member 322226415-Mar-09 22:30 
AnswerRe: Master Page in VS 2005 Pin
Christian Graus15-Mar-09 23:19
protectorChristian Graus15-Mar-09 23:19 
Question[Message Deleted] Pin
bikash pattanayak15-Mar-09 21:57
bikash pattanayak15-Mar-09 21:57 
AnswerRe: Refresh the parent window from chield Pin
rakeshs31215-Mar-09 22:02
rakeshs31215-Mar-09 22:02 
AnswerRe: Refresh the parent window from chield Pin
www.Developerof.NET15-Mar-09 22:35
www.Developerof.NET15-Mar-09 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.