October 07, 2008

server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay

The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for

Reason.

your connection ip or relay ip is not matching with ip you are using to send mails.

OPen iis from control-panel->administrative tools->internet information services.

now right click "default smtp virtual server" & selcect properties as shown in following image.


now select the appropriate IP in connection drop down that should match with the IP you are using to send mail.

now select the "Access" tab you will see the screen as follow



in Connection and Relay add same IP.

it will resolve the problem

Related Article(s):
The transport failed to connect to the server.

Generics Explanation benefit limitation

Generics: part of dot net type system where we have option to leave the type of member.
And that can be given by the consumer code.

Strong Type objects
type Safety.

Only the objects of the class will be allowed that was mentioned while declaring the object.

We can have other objects in the generics
Why.
• Reduced run-time errors The compiler cannot detect type errors when you cast to and from the Object class. For example, if you cast a string to an Object class and then attempt to cast that Object to an integer, the compiler will not catch the error. Instead, the runtime will throw an exception. Using generics allows the compiler to catch this type of bug before your program runs. Additionally, you can specify constraints to limit the classes used in a generic, enabling the compiler to detect an incompatible type.
• Improved performance Casting requires boxing and unboxing which steals processor time and slows performance. Using generics doesn't require casting or boxing, which improves run-time performance.

Limitation:

Essentially, you are limited to the capabilities of the base Object class when writing generic code
So we could not use the + or > operator.

Generics is CLR Supported: Generics is supported by CLR itself. so its not a wrapper kind of thing like properties,namespace etc. Its recognized by the CLR. So in Meta Data Generics class is IL-ed. In realty its will be impossible to do that. Because a generic class can be instantiated with many types so it will blot the IL.

Generic Collection: Entire collection library was rewritten for the Generics.
Here is comparison list :
System.Collections vs. System.Collection.Generic or
Weakly vs Strongly type

ArrayList List
Hashtable Dictionary
Queue Queue
Stack Stack
SortedList SortedList
IEnumerable IEnumerable
IList IList
CollectionBase Collection

New Classes In Genric that do not have non generic equivalent.

SortedDictionary
KeyedCollection
LinkedList


Framework :2.0+
Visual studio: 2005 and 2008
please comment if you have any doubt and further want info. it will be updated very soon after your questions.

October 06, 2008

Exception-The transport failed to connect to the server.

Error/Exception: The transport failed to connect to the server.

Reason: if this is occurring while sending mails.

then it can be two reasons

1. you have given wrong smtp address.

2. your smtp server is not running.
type services.msc, all services will be displayed, search for smtp service.
and start it, if its stopped.

Right click on services and check "startup type" if "disabled" selected then select "automatic".
and test it.

if still any problem comment with the proper description.

Related Links
Exception-The transport failed to connect to the server.

postgresql-npgsql-array pass-error-invalid Syntax integer

something users want to test the function/procedure in npgsql postgres PL/pgSQL from command rather than from dot net program

sometimes could get the error:

"invalid input syntax for integer:" it means some assignment problem is there.

how to call a function passing a array.

select * from insert jet_map(387::int4,array[1,2,5]::int4[],array['1245,128','697638,697643','45,78']::varchar[]
,'ChangeItAfterTest'::varchar)