|
|
can i return a hashtable from my webservice to the client application .. i hav tried but iyt dsnt allow.. so i added the hastable in an arraylist and returned the arraylist but there is still a problem
|
|
|
|
|
IDictionary cannot be serialized via XML, you will not be able to use the
hastable for a parameter over web services.
|
|
|
|
|
pls help me i m working on a project and requerement is :-
client wants to send mail to the responders outometically when they use the site with their mail id and name.
|
|
|
|
|
What language?
Brad
Australian
- bryce on "Problems with Code Project"
*sigh* Maunder's been coding again...
|
|
|
|
|
Dear sir
thanx for response.
currently i m working with c# language(ASP.NET).
i need ur help
jayant vaishnav
|
|
|
|
|
|
I am new to Enterprise Library January 2006 and its safe and gud to use with web application using asp.net. And also would like to have more information about Enterprise Library January 2006. Guide and Tx in advances
|
|
|
|
|
I have a classic ASP web site that has been running flawlessly for at least 6 years now.
I updated Windows Server 2003 to SP2 a few days ago, and now a "session counter" that I had implemented in Global.asa no longer works. Here is the code.
From Global.asa:
function Application_OnStart()
{
Application("Visitors") = 0;
}
function Session_OnStart()
{
Application.Lock();
{
Application("Visitors") = Application("Visitors") + 1;
}
Application.Unlock();
}
function Session_OnEnd()
{
Application.Lock();
{
iVisitors = Application("Visitors");
if( iVisitors > 0 )
{
Application("Visitors") = iVisitors - 1;
}
else
{
Application("Visitors") = 0;
}
}
Application.Unlock();
} It appears to me that Session_OnEnd is never being called now, because Application("Visitors") keeps incrementing with each session BUT never deincrements since installing SP2!
The code is so simple, that I can't see any reason why it is not doing so.
Can anyone see a flaw in my code? Or am I just hosed?
|
|
|
|
|
There are certain session types that do not call Session end. Along with that the session doesn't end until it timesout. So if your session timeout has recently changed that could be the issue as well.
Here is the MS help on it:
The Session_OnEnd Event
You can handle the Session_OnEnd event by adding a subroutine named Session_OnEnd to the Global.asax file. The Session_OnEnd subroutine is run when the Abandon method has been called or when the session has expired. A session expires when the number of minutes specified by the Timeout property passes without a request being made for the session.
The Session_OnEnd event is supported only when the session state Mode property is set to InProc, which is the default. If the session state Mode is StateServer or SQLServer, then the Session_OnEnd event in the Global.asax file is ignored. If the session state Mode is set to Custom, then support for the Session_OnEnd event is determined by the custom session-state store provider.
You can use the Session_OnEnd event to clean up session-related information such as information for a user that is tracked in a data source by the SessionID value.
Hope that helps.
Ben
|
|
|
|
|
Yeah, I'm aware how sessions work.
Unfortunately, unless I'm mistaken, the MS Help information above applies only to the ASP.NET Global.asax... while I'm using the classic ASP Global.asa.
Thanks for your help though. I do appreciate it. I'll try digging deeper.
|
|
|
|
|
I created a new blank web site that has ONLY the following 2 files in it:
===========
DEFAULT.ASP
===========
<html>
<body>
Sessions: <%= Application("Visitors") %>
</body>
</html> ===========
GLOBAL.ASA
===========
<SCRIPT LANGUAGE=JScript RUNAT=Server>
function Application_OnStart()
{
Application("Visitors") = 0;
}
function Session_OnStart()
{
Application.Lock();
{
Application("Visitors") = Application("Visitors") + 1;
}
Application.Unlock();
}
function Session_OnEnd()
{
Application.Lock();
{
iVisitors = Application("Visitors");
if( iVisitors > 0 )
{
Application("Visitors") = iVisitors - 1;
}
else
{
Application("Visitors") = 0;
}
}
Application.Unlock();
}
</SCRIPT> ... and absolutely NOTHING else. I also adjusted the session length from 20 minutes to 2 minutes (for the purposes of testing).
Same thing... the value of Application("Visitors") keeps incrementing with each new session, but NEVER deincrements.
As mentioned, all of this has worked flawlessly for years upon years... but after installing SP2 to Windows Server 2003... all of a sudden it is broken.
I don't see anyway to fix this. Which blows.
Any ideas?
|
|
|
|
|
Try to put something in the session object:
Session("Test") = 42
This will keep the session object alive.
I think that it might be a change in how the server handles session objects. If they don't contain anything they are discarded immediately without triggering a Session_OnEnd. The session id is kept by the browser, so when the user returns a new session object with the same id will be created. As it's a recreated session object, it probably doesn't trigger a Session_OnStart.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks, but it's not that. The original web site where I noticed this has thousands of users and uses session variables to track login information across pages.
|
|
|
|
|
I am trying to write a script that can download a batch of PDF files from a site that requires users to login first. To login, I used the following code:
Dim objIE As New InternetExplorer<br />
<br />
objIE.Visible = True<br />
objIE.Navigate sURL<br />
<br />
Do<br />
DoEvents<br />
Loop Until objIE.readyState = READYSTATE_COMPLETE And objIE.Busy = False<br />
<br />
objIE.Document.all("username").Value = sUserName<br />
objIE.Document.all("password").Value = sPassword<br />
objIE.Document.forms("loginForm").Submit<br />
<br />
objIE.Navigate somefile.pdf
I am stuck after this point.
I cannot use:
objIE.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER
because it saves the file as text with a bunch of header info and binary contents corrupted.
I tried using
URLDownloadToFile(0&, somefile.pdf, sLocalFileName, 0&, 0&)
but this doen't work either because the request is not authenticated (the request returns the login page). The server doesn't support basic authentication, by the way
I think the answer is in the first parameter of URLDownloadToFile. If I can somehow pass the reference to the Internet Explorer object, the authentication info should, in theory, carry over. I haven't been able to find anything on the Web to help me with this, however.
Any thoughts?
Any alternatives?
Thank you.
A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
|
|
|
|
|
Hi,
In my project,i am having many .aspx pages
i am calling web methods from my each .aspx page separately.
In one of the form, my page_load event is firing.
After putting break point also, the break point is itself not executing.
Can any one of you tell me the reason for this.
In my web.config file, i set debug =true;
I made ensure regarding startup page and startup project.
Please reply as soon as possible
Thanks and regards,
Shyam T S
|
|
|
|
|
Is your project running in Debug or Release mode (the drop down on your toolbar will tell you this)? Even if you say Debug=True, if you are running in Release mode it wont stop on breakpoints.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Thank you very much..
I have posted another query.. can u please look into it.. I am beginner.. Please help me..
|
|
|
|
|
Hi Guy's,
Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help!
<br />
System.Net.Mail.SmtpException was caught<br />
Message="Failure sending mail."<br />
Source="System"<br />
StackTrace:<br />
at System.Net.Mail.SmtpClient.Send(MailMessage message)<br />
at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28<br />
<br />
Thanks in Advance
|
|
|
|
|
|
First you have to make sure the SMTP service installed on your PC?
And you might post your code here...
<< >>
|
|
|
|
|
SMTP Service is running.
<br />
ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com");<br />
msg.Body = "Did u receive this, if u did don't reply, just testing";<br />
msg.Subject = "TESTING";<br />
try<br />
{<br />
SmtpClient sc = new SmtpClient("lookman");<br />
sc.Send(msg);<br />
}<br />
catch (SmtpException smtpex)<br />
{<br />
Label1.Text = smtpex.Message.ToString();<br />
}<br />
catch (Exception ex)<br />
{<br />
Label1.Text = ex.Message.ToString();<br />
}<br />
|
|
|
|
|
MailMessage mail = new MailMessage();
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");
mail.Subject = "This is an email";
mail.Body = "this is a sample body with html in it. This is bold <font color=#336699>This is blue</font>";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Send(mail);
That is from the link I provided. Does that shed any light on the subject?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
|
how we can validate the TextBox with length not less than 3 digit and not more than 15 digite.
witch validation control is best.
|
|
|
|