Monday

air logging framework

Using this simple logging for now:
     
package Pomodorium
{
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;


public class Logger {

public static function Write(s:String): void {
var file:File = File.applicationStorageDirectory.resolvePath('pomodorium.log');
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.APPEND);
fileStream.writeUTFBytes("\n"+s);
fileStream.close();

}

}
}

Thursday

the connection was interrupted


I was working on moving certificates from one server to another,
and when I was doing that over exporting certificates as .SST file I was getting
"The connection was interrupted" error .

I order to fix it I have to export certificates on-by-one as PFX file from another server and import
them on new one.

After this problem has been fixed.

Wednesday

UnicodeDecodeError: 'ascii' codec can't decode byte

This error can be fixed by adding this code on top of python script:

import sys
reload(sys)
sys.setdefaultencoding("latin1")

create certificate for iis


1.Downloaded and installed The IIS 6.0 Resource Kit Tools:
http://support.microsoft.com/kb/840671
download link :http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499

2.Created certificate by
C:\Program Files\IIS Resources\SelfSSL\SelfSSL.exe /N:CN=www.mysite.com /V:1000

3.Go to IIS Manager , add certificate for virtual server you will see certificate you have created in a list.

linq Ilist select

paymentApplicableTransaction subcollection is List here is how to get it:
  
var accountTransactions = from dataObject in objectsDataContext.AccountTransactions
where
(dataObject.TransactionId == transactionID || dataObject.ParentId == transactionID) &&
dataObject.StatusId != deletedStatus
select new InvoiceRecord
{
TransactionId = dataObject.TransactionId,
Amount = dataObject.TotalAmountDue,
InvoiceDueDate = dataObject.DueDate,
Tax = dataObject.Tax ?? 0,
AdditionalGracePeriod = dataObject.AdditionalGracePeriod,
StatusId = dataObject.StatusId,
RecordStatus = (int) ScopeRecordStatus.Active
,
paymentApplicableTransaction = (from pats in dataObject.BillingTransactionDetails
where pats.StatusId != deletedStatus
select new PaymentApplicableTransaction
{
AccountTransactionId =
pats.AccountTransactionId
,
BillingTransactionId =
pats.BillingTransactionId

}).OfType<IPaymentApplicableTransaction>()
.ToList()
};


test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...