|
Hi i cerated one console application...,
It will send email...,
Now i want run this console automatically on every last day of the month ...,
So i will put in schedular task...,but there is no option is there for assign last day of the month...,
plz help me how to tell in schedular last day of the month...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You are in a wrong forum.
Create a windows service so that you can check system date to find end of the month.
|
|
|
|
|
Schedule it to run every day and check in the app to see if its the last day of the month - if not just close down.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hey...
Everything when i send mail with some huge attachment file this error occur - Web.HttpException: The transport lost its connection to the server. What the issue or any solution that i can resolve this issue?
Thanks a million
KaKaShi HaTaKe
|
|
|
|
|
Open Web.Config file of your solution and add the following in the System.web section of configuration section , like its added below
httpRuntime executionTimeout="90" maxRequestLength="4096" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"
Increasing the execution timeout will solve your problem. Please note that it is in seconds.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hi bro..... The webconfig setting is already according as what u mention but the issue still arise
it still show Web.HttpException: The transport lost its connection to the server. Cos i sending multiply attachment too...
KaKaShi HaTaKe
|
|
|
|
|
increase the executiontimeout to something like 600
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
bro i have increase till 1000 result still the same. Dos sending multiply attachment affect the issue as well?
KaKaShi HaTaKe
|
|
|
|
|
then try changing it in the machine.config file. Though i dont think it will have much of an effect. Can you post your code?
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
I upload using fileupload in the toolbox
if (FileUpload5.PostedFile.FileName.Length > 0)
{
FileUpload5.PostedFile.SaveAs(strBaseDir + Path.GetFileName(FileUpload5.PostedFile.FileName));
attach1 = strBaseDir + Path.GetFileName(FileUpload5.PostedFile.FileName);
}
if (FileUpload1.PostedFile.FileName.Length > 0)
{
FileUpload1.PostedFile.SaveAs(strBaseDir + Path.GetFileName(FileUpload1.PostedFile.FileName));
attach2 = strBaseDir + Path.GetFileName(FileUpload1.PostedFile.FileName);
}
then i send
MailMessage mail = new MailMessage();
mail.To = mailto;
mail.From = mailfrom;
mail.Cc = strUserId + System.Configuration.ConfigurationSettings.AppSettings.Get("CCList");
mail.Subject = subject;
mail.BodyFormat = MailFormat.Html;
mail.Body = body;
if (attach1 != "")
{
MailAttachment attachFile1 = new MailAttachment(attach1);
mail.Attachments.Add(attachFile1);
}
if (attach2 != "")
{
MailAttachment attachFile2 = new MailAttachment(attach2);
mail.Attachments.Add(attachFile2);
}
if (attach3 != "")
{
MailAttachment attachFile3 = new MailAttachment(attach3);
mail.Attachments.Add(attachFile3);
}
if (attach4 != "")
{
MailAttachment attachFile4 = new MailAttachment(attach4);
mail.Attachments.Add(attachFile4);
}
if (attach5 != "")
{
MailAttachment attachFile5 = new MailAttachment(attach5);
mail.Attachments.Add(attachFile5);
}
SmtpMail.SmtpServer = System.Configuration.ConfigurationSettings.AppSettings.Get("SmtpServer");
SmtpMail.Send(mail);
KaKaShi HaTaKe
|
|
|
|
|
Please post the SMTP Server settings.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
was the code ok ? sorry bro the smtp setting is not control by me.... and i dun have the access to it. Could tell me what am i suppose to look out for sorry 4 the trouble and thank you so much
KaKaShi HaTaKe
|
|
|
|
|
code is perfectly fine. there might be some SMTP settings issue
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Ok thanks bro.... Any idea for the setting for SMTP Server?default SMTP server time out is 5 min rights? What else in smtp will cos this issue?
KaKaShi HaTaKe
|
|
|
|
|
* Is a VALID SMTP Server
* Check to be sure the server System.Web.Mail is executing on can connect to the mail server. Some times firewalls or proxy servers can get in the way.
* Try specifying the value by IP address. Poor DNS resolution can sometimes hinder name lookups.
* Make sure the that the mail server is running at port 25. If you did not specify a SmtpMail.SmtpServer property, or if SmtpMail.SmtpServer points to "localhost" (or the equivalent), be sure the SMTP Service is running on port 25.
* For testing purposes change the MailMessage.From and MailMessage.To properties to an address that exists on SmtpMail.SmtpServer. Some times this exception is thrown, when it really is a relay issue.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
other then this?
KaKaShi HaTaKe
|
|
|
|
|
|
hi there,
is there anyone who can give me an idea how to save the document such as word that allow to be save straight away in to the page without uploading it.
for example: right now I have an asp.net page that have a button that will open up a word document. this word document its only for editing the contents. After finishing with the contents they need to save it to their computer then uploaded to the web page.
is there any way doin it without uploading it but save straight away to the web page.
any help would be appreaciate
thank you
|
|
|
|
|
what do you mean by saving the doc directly to the page? you mean save it to their computer n later upload it?
|
|
|
|
|
No, that what we have right now.
what I need to save document straight to web page so we don't to upload them.
|
|
|
|
|
i don't know what on earth you're tring to do
please elaborate
|
|
|
|
|
well basicly,I need to create a word viewer in my asp.net web application that enable me to save straight to server.
gamzun wrote: hi there,
is there anyone who can give me an idea how to save the document such as word that allow to be save straight away in to the web page without uploading it.
for example: right now I have an asp.net page that have a button that will open up a word document. after finish with the document then it need to be save so in the web page they can view what document they have. in order to save it they need to save it to their computer first then uploaded to the web page. this way is take too much time for boss, so he wants a simple thing to do to save this word document straight to the web page
is there any way doin it without uploading it but save straight away to the web page.
any help would be appreaciate
thank you
hope this understood enough
thanks
|
|
|
|
|
Hey Guys need help.
I have came across this error. When in VS2005 ASP.net i using the Fileupload tool in the toolbox given. When I upload a small size file like about 3.73 MB. When I click a button it still works even without any function written on the button. But when i upload around 4.97 MB and i just click a button the web site display Internet Explorer cannot display the webpage
Any solution to this issue.
KaKaShi HaTaKe
|
|
|
|
|
By default, .NET allows upto 4MB of file size to be uploaded. You need to add/modify the following entry to system.web section of web.config.
<httpruntime maxrequestlength="4096">
4096KB
Please change it to desired value.
K.P.Kannan
|
|
|
|
|
Hey Thanks bro for the hint ...
Cheers
KaKaShi HaTaKe
|
|
|
|