|
Hi peoples,
i m trying to send an mail from my application (localhost)
this is my code..( i copied from website)
// Command line argument must the the SMTP host.
SmtpClient client = new SmtpClient("localhost");
// Specify the e-mail sender.
// Create a mailing address that includes a UTF8 character
// in the display name.
MailAddress from = new MailAddress("hbairavan@yahoo.com", "Jane " + (char)0xD8 + " Clayton",
System.Text.Encoding.UTF8);
// Set destinations for the e-mail message.
MailAddress to = new MailAddress("hbairavan@yahoo.com");
// Specify the message content.
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(from, to);
message.Body = "This is a test e-mail message sent by an application. ";
// Include some non-ASCII characters in body and subject.
string someArrows = new string(new char[] { '\u2190', '\u2191', '\u2192', '\u2193' });
message.Body += Environment.NewLine + someArrows;
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Subject = "test message 1" + someArrows;
message.SubjectEncoding = System.Text.Encoding.UTF8;
// Set the method that is called back when the send operation ends.
client.SendCompleted += new
SendCompletedEventHandler(SendCompletedCallback);
// The userState can be any object that allows your callback
// method to identify this send operation.
// For this example, the userToken is a string constant.
string userState = "test message1";
client.EnableSsl = false;
client.UseDefaultCredentials = false;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Credentials =
new System.Net.NetworkCredential(from.ToString(), "f00bar");
client.SendAsync(message, userState);
after this line am getting exception that
failure sending mail..
wat may be the reason.please help
\
thanks in advacnce
|
|
|
|
|
Hema Bairavan wrote: // Command line argument must the the SMTP host.
SmtpClient client = new SmtpClient("localhost");
You have putted "localhost" as your SMTP Server name. I guess this is wrong. Does your SMTP Server configured properly. What is the name of the Server ?
Try This link.
http://support.microsoft.com/kb/323436[^]
Hema Bairavan wrote: after this line am getting exception that
failure sending mail..
Please check your server configuration as I have suggested. Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
If you are sending your mail via system.net.mail. you should use smtp server ip or smtp server name and should be configured properly on server.
Farogh Haider
Web developer
|
|
|
|
|
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 44: <add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Line 45: <!--<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>-->
Line 46: <add assembly="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Line 47: <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Line 48: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Assembly Load Trace: The following information can be helpful to determine why the assembly 'CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
how to resolve this problem
|
|
|
|
|
It Seems the problem is related with the missing DLL. Does crystal reports installed on the server ? Please verify do you have "CrystalDecisions.Enterprise.Framework.dll " in your Server GAC or not.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 21: <compilation debug="true" defaultLanguage="c#" targetFramework="4.0">
Line 22: <assemblies>
Line 23: <add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
Line 24: <add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
Line 25: <add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Source File: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\WebSites\mhms\trunk\MHMS\hms_my\web.config Line: 23
Assembly Load Trace: The following information can be helpful to determine why the assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded.
|
|
|
|
|
Dear Friend,
I have one control DIVSION (Server side) on more then 20 forms, i am using that control as Error Message or Successful message control all working fine but now i want that control work dynamic as if there is error message it should show message in red coloured and so on...
I know i can manually go each and every control and set this but i want to handle it with some smart way by using base class of that form but don't know how to capture Error and Successful message, can any one help me regarding the same
Thanks and Regards
Sasmi
|
|
|
|
|
Create a method in the BaseClass which might find the control from the page and show the proper error message if found.
Use
this.FindControl("hypMainMenu");<br />
|
|
|
|
|
please help me sir
i am using ajaxcontrol tool kit.and my autocompleteextender and calenderextender hide behind the controls(textbox and combo box).
i mean my web page controls hide autocompleteextender list and calenderextender list.
please give me your suggestions..
|
|
|
|
|
Hi guys, I am having some trouble trying to get multi-handle slider (AJAX Toolkit for ASP.NET) to work. After 6 hours of trying, I feel like banging my head on a wall. I probably code it wrong, since multi-handle slider is not documented very well and I had little luck finding an example online.
The problem is that when I load up the page that contains a slider with two handles, whenever the first handle (the one on the left) is clicked, it automatically jumps to the position of the second handle. The second handle has its problem too: it can only move to the right but not the left.
Please help me if you could! I'd greatly appreciate it!!
Here's the source code (there's no code-behind):
<Form>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server" >25</asp:TextBox>
<br />
<asp:TextBox ID="TextBox3" runat="server">75</asp:TextBox>
<asp:MultiHandleSliderExtender ID="MultiHandleSliderExtender1" TargetControlID = "Textbox1"
runat="server" Enabled="True" HandleAnimationDuration="0.1" Maximum="100"
Minimum="0" BehaviorID= "MultiHandleSliderExtender1" EnableInnerRangeDrag="False" InnerRailStyle="AsIs">
<MultiHandleSliderTargets>
<asp:MultiHandleSliderTarget ControlID = "Textbox2"/>
<asp:MultiHandleSliderTarget ControlID = "Textbox3"/>
</MultiHandleSliderTargets>
</asp:MultiHandleSliderExtender>
</Form>
|
|
|
|
|
I right clicked on my setupproject and click on project output option ,it opend a dialog project output group .
it shows only content file option ,options like primary output etc are not there .
plz help me how can i get these options
|
|
|
|
|
anilaabc wrote: I right clicked on my setupproject and click on project output option ,it opend a dialog project output group .
it shows only content file option ,options like primary output etc are not there .
I am not able to understand that what is your exact problem. Can you please give some more clarity on it.
Thanks ~!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi
I have to send SMS from my asp.net site from SMS received from user side.
For ex
user send Code:1458689
user receive Code:1458689
User Name: ABC
Address : XYZ etc...
|
|
|
|
|
|
I am an ASP.NET web dev but I am trying to build myself a little desktop application that takes control of another application for me.
What i want it to do is pretty simple, type some text into a textbox on another application then click a few buttons for me. Problem is i don't even know where to start or what language would be best to write this in? Can anyone point me in the right direction.
I can give more information for anyone who is interested
Thanks,
Colum
|
|
|
|
|
cullyk wrote: but I am trying to build myself a little desktop application that takes control of another application for me.
you should ask this question on C# forum insted of ASP.NET forum, as you want to build desktop application.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
If there are multiple controls on a web page with complex GUI, How can we increase the performance issue of the page ? What are the different options ?
|
|
|
|
|
Its depends what kind of control you are using. What are the data you are showing in those controls ? Is it common for all user, then you can use Fragment caching for that.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
How to edit record, if multiple users trying to access the same record same time in
Grid View control in web form ? What is the possible solution to manage such problem ?
|
|
|
|
|
Fragment caching we can do with only user controls. Lets suppose we have Grid view, List Box, Combo box, Data list on the same web page that are using heavy data and no user controls are there and the page is dynamic, In this case what are the different options to increase web page performance ?
|
|
|
|
|
Can anyone help me in how to increase performance issue when we fetch very large amount of data from sqlserver db and display in Grid view ?
|
|
|
|
|
Hi guys, I've tried using the built-in membership in ASP.NET, I want to build my own membership (I want to customize it myself and make it simpler than this),
can anyone help me out and provide some tips or possibly articles to help me out.
Thanx guys
K
|
|
|
|
|
If you are talking about asp.net membership, then its vast, means it involves many functionality. So what exact functionality you are looking for ? Why you are not want to use inbuilt functionality ?
Thanks !!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I want to customize it make it abit simpler than what it is now.
|
|
|
|
|
Is there a way to beable to right click a row in a gridview to bring up a context menu?
|
|
|
|