Hello jpshilpa,
How are you specifying the connection credentials? If I had to take a guess, I bet you are using stored credentials - this would allow your local machine to connect (if you've logged into the client before) while the IIS server is not likely to have any stored credentials.
If you are manually specifying the credentials, then perhaps you should check the ININ logs for exceptions, warnings and/or errors. Posting the relevant information here might give us, and you, a better understanding of what is happening to the session object.