In .NET 2.0 using System.Net.Mail to send mail we do following:
Create object of MailMessage
Provide value for
From
Sender
ReplyTo
Subject
Body
Create object of SmtpClient
Assign Host
Assign Port
Call send() method
Using above simple steps, one can sent email using .NET System.Net.Mail library.
On other side, if using IIS as SMTP server, we need to have the same host address in allow list of SMTP server as we have provided in smtpClient object.
I was working on sending mail and it my application was not able to send mail as I have defined Host as 127.0.0.1 in application and in SMTP server in allow list the IP was 10.1.1.9 (actual IP of my machine). And system was unable to send mail. All the time I was getting exception kinda saying “mailbox unavailable”
Thursday, November 23, 2006
.NET 2.0 SmtpClient and IIS
Tuesday, November 21, 2006
Viewing Fusion log
Today I came across the situation where I need to resolve the dependency issue of assembly. I was referring an assembly remotely and that assembly was referring to some other assembly. I was getting error that assembly was not found but I could not able to figure out where I need to place the assembly file so that system can pickup. Then I came to know there is something known as Fusionlog. Fusionlog can help finding issues related to assembly bindings.
You might need to configure some settings before you able to see the log. You can use fuslogvw.exe to view the log. To create/modify settings you need to do following:
1. Create a folder where you would like to dump the log files. For example D:\MyFusionLogs
2. Add a key in registry of type string named “LogPath” at following location
HKLM\SOFTWARE\Microsoft\Fusion\
3. Set value of key “LogFailures” to 1 at same location
Doing this will enable writing fusion log and those logs can be viewed using fuslogvw.exe utility. This is a GUI and you need to run fuslogvw.exe command on Visual Studio’s command prompt to get this.
Fusion log can be used for debugging while you have issues related to assembly bindings.