Click here to Skip to main content
15,890,336 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How can you access the Application Attributes via API? Pin
Abhijit Jana14-Dec-09 6:25
professionalAbhijit Jana14-Dec-09 6:25 
GeneralRe: How can you access the Application Attributes via API? Pin
msell015014-Dec-09 7:29
msell015014-Dec-09 7:29 
GeneralRe: How can you access the Application Attributes via API? Pin
Ashfield14-Dec-09 21:01
Ashfield14-Dec-09 21:01 
QuestionA question regarding website design Pin
James Shao14-Dec-09 4:25
James Shao14-Dec-09 4:25 
AnswerRe: A question regarding website design Pin
Abhishek Sur14-Dec-09 5:03
professionalAbhishek Sur14-Dec-09 5:03 
AnswerRe: A question regarding website design Pin
Abhijit Jana14-Dec-09 5:59
professionalAbhijit Jana14-Dec-09 5:59 
AnswerRe: A question regarding website design Pin
James Shao14-Dec-09 12:20
James Shao14-Dec-09 12:20 
QuestionApplication State object is destroyed - Dont know why? Pin
vivasaayi14-Dec-09 1:28
vivasaayi14-Dec-09 1:28 
I am running a web service, which provides some updated quotes every 2 minutes. It takes quotes from a quote server.
I expected this service to establish a single connection to the quote server.

But few times I have notices that this web service establishes more than one connection to the Server.

I think that the updateManager.Start() method is called more than one time. But how that could happen? Whether the
Application State object is destroyed because of timeout or any internal error? I have a Destructor in UpdateManager Class. Will that be called automatically or I have to call it explicitly? If so how?

I welcome your advise and comments.

public class Service : System.Web.Services.WebService
{
    UpdateManager updateManager;
    string key = "update";
    	
    public Service()
    {        
        if (Application[key] != null)
        {
            updateManager = (UpdateManager)Application[key];						
        }
        else
        {
            updateManager = new UpdateManager();
            Application[key] = updateManager;
			
			//This method will establish a TCP connection with a remote server. 			
			//In server, sometimes I am finding more than one TCP connections from this webservice.
			
			//Objects placed in the Application State will be persisted till the application ends
			//so there should be one connection to the server.
			updateManager.Start();
        }        
    }
	
	[WebMethod(Description = "Get the Current Quote")]
	public string GetUpdate()
	{
		return updateManager.GetUpdate();
	}	
}

AnswerRe: Application State object is destroyed - Dont know why? Pin
Abhishek Sur14-Dec-09 3:58
professionalAbhishek Sur14-Dec-09 3:58 
GeneralRe: Application State object is destroyed - Dont know why? Pin
N a v a n e e t h14-Dec-09 5:47
N a v a n e e t h14-Dec-09 5:47 
GeneralRe: Application State object is destroyed - Dont know why? Pin
vivasaayi14-Dec-09 18:46
vivasaayi14-Dec-09 18:46 
GeneralRe: Application State object is destroyed - Dont know why? Pin
Abhishek Sur14-Dec-09 22:04
professionalAbhishek Sur14-Dec-09 22:04 
AnswerRe: Application State object is destroyed - Dont know why? Pin
N a v a n e e t h14-Dec-09 5:43
N a v a n e e t h14-Dec-09 5:43 
QuestionCross site Scripting XSS Pin
sachees12314-Dec-09 0:45
sachees12314-Dec-09 0:45 
AnswerRe: Cross site Scripting XSS Pin
SeMartens14-Dec-09 1:23
SeMartens14-Dec-09 1:23 
GeneralRe: Cross site Scripting XSS Pin
sachees12314-Dec-09 18:37
sachees12314-Dec-09 18:37 
AnswerRe: Cross site Scripting XSS Pin
Abhijit Jana14-Dec-09 6:37
professionalAbhijit Jana14-Dec-09 6:37 
QuestionASP.NET Application Development – Tools Pin
Karina.R14-Dec-09 0:39
Karina.R14-Dec-09 0:39 
AnswerRe: ASP.NET Application Development – Tools Pin
SeMartens14-Dec-09 1:25
SeMartens14-Dec-09 1:25 
AnswerRe: ASP.NET Application Development – Tools Pin
Abhijit Jana14-Dec-09 6:01
professionalAbhijit Jana14-Dec-09 6:01 
QuestionWeb 2.0 & JavaScript Framework Pin
Karina.R14-Dec-09 0:21
Karina.R14-Dec-09 0:21 
AnswerRe: Web 2.0 & JavaScript Framework Pin
SeMartens14-Dec-09 1:29
SeMartens14-Dec-09 1:29 
AnswerRe: Web 2.0 & JavaScript Framework Pin
Abhijit Jana14-Dec-09 6:05
professionalAbhijit Jana14-Dec-09 6:05 
QuestionDynamic item template Pin
sekannak14-Dec-09 0:20
sekannak14-Dec-09 0:20 
AnswerRe: Dynamic item template Pin
Dinesh Mani14-Dec-09 0:46
Dinesh Mani14-Dec-09 0:46 

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.