daltoncabrera / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

FileNotFoundException thrown in web application #230

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Production Web Server, when I try to invoke messenger.Connect()
2.
3.

What is the expected output? What do you see instead?
I got this exception
System.IO.FileNotFoundException: 
Could not find file 'c:\windows\system32\inetsrv\267640359d.mcl'. 
File name: 'c:\windows\system32\inetsrv\267640359d.mcl' 
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
at System.IO.File.SetAttributes(String path, FileAttributes fileAttributes) 
at MSNPSharp.IO.MclFile.SaveAndHide(String filename) 
at MSNPSharp.IO.MCLSerializer.SaveToHiddenMCL(String filename) 
at MSNPSharp.IO.DeltasList.Save(Boolean saveImmediately) 
at MSNPSharp.IO.DeltasList.Save() 
at 
MSNPSharp.MSNService.ChangeCacheKeyAndPreferredHostForSpecifiedMethod(SoapHttpCl
ientProtocol ws, MsnServiceType st, MsnServiceState ss, Object request) 
at MSNPSharp.MSNService.RunAsyncMethod(BeforeRunAsyncMethodEventArgs e) at 
MSNPSharp.ContactService.msRequest(PartnerScenario partnerScenario, 
FindMembershipCompletedEventHandler onSuccess) 
at MSNPSharp.ContactService.SynchronizeContactList() at 
MSNPSharp.ContactService.SynchronizeContactList() 
at MSNPSharp.NSMessageHandler.OnMSGReceived(MSNMessage message) 
at MSNPSharp.NSMessageHandler.HandleMessage(IMessageProcessor sender, 
NetworkMessage message)

What version of the product are you using? (MSNPSharp, OS, Mono etc.)
MSNP 3.0.3.1717
Windows 2003 Server, .net 3.5
Is your code check out from SVN or download from our download site?
download from download site

Please provide any additional information below:
It is working on my test workstation, windows xp 64bit, VS2008 development 
server. However, it can't work on production server.
And also I have logon as administrator in production server, so it shouldn't be 
privilege issue

Original issue reported on code.google.com by cheng....@gmail.com on 12 Nov 2010 at 2:03

GoogleCodeExporter commented 8 years ago
Tried MSNP 3.1.0.1719, same code, 
got another exception a few time on test workstation,
but 100% of time on production server
Exception: System.NullReferenceException

Message: Object reference not set to an instance of an object.

StackTrace:    at MSNPSharp.MSNStorageService.GetProfileImpl(PartnerScenario 
scenario)
   at MSNPSharp.MSNStorageService.GetProfile()
   at MSNPSharp.ContactService.SetDefaults()
   at MSNPSharp.ContactService.<SynchronizeContactList>b__1(Object , ABFindContactsPagedCompletedEventArgs )
   at MSNPSharp.ContactService.<>c__DisplayClasse.<abRequest>b__b(Object sender, ABFindContactsPagedCompletedEventArgs e)
   at MSNPSharp.MSNWS.MSNABSharingService.ABServiceBinding.OnABFindContactsPagedOperationCompleted(Object arg)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

Original comment by cheng....@gmail.com on 12 Nov 2010 at 2:48

GoogleCodeExporter commented 8 years ago
It seems that you are using this library in a ASP.NET web application. However, 
I don't know whether the web app support async callback. You also need to set 
Settings.NoSave to true avoiding the library write files to your hard disk.

Original comment by freezing...@gmail.com on 12 Nov 2010 at 7:36

GoogleCodeExporter commented 8 years ago
I add Settings.NoSave = true, seems works most of time,
however, I receive exceptions and asp.net server crashed some time when I 
trying to Messenger.Connect()
MSNP version 3.1.0.1719
exception:

EventType clr20r3, P1 webdev.webserver.exe, P2 9.0.0.0, P3 488f1aa2, P4 
msnpsharp, P5 3.1.0.1719, P6 4cdd957c, P7 151d, P8 14c, P9 exception, P10 NIL.
An unhandled exception occurred and the process was terminated.

Application ID: 60cf2f5e

Process ID: 3956

Exception: System.NullReferenceException

Message: Object reference not set to an instance of an object.

StackTrace:    at MSNPSharp.MSNStorageService.GetProfileImpl(PartnerScenario 
scenario)
   at MSNPSharp.MSNStorageService.GetProfile()
   at MSNPSharp.ContactService.SetDefaults()
   at MSNPSharp.ContactService.<SynchronizeContactList>b__1(Object , ABFindContactsPagedCompletedEventArgs )
   at MSNPSharp.ContactService.<>c__DisplayClasse.<abRequest>b__b(Object sender, ABFindContactsPagedCompletedEventArgs e)
   at MSNPSharp.MSNWS.MSNABSharingService.ABServiceBinding.OnABFindContactsPagedOperationCompleted(Object arg)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

Original comment by cheng....@gmail.com on 12 Nov 2010 at 8:42

GoogleCodeExporter commented 8 years ago
Did you export the trace log of MSNPSharp? If you have, please email a copy to 
me.

Original comment by freezing...@gmail.com on 13 Nov 2010 at 6:00

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
BTW, logging on your production server as an admin will not solve any privilege 
issue for your application, you need to give write permission of your app or 
the IIS server, but that's very dangerous.

Original comment by freezing...@gmail.com on 13 Nov 2010 at 6:08

GoogleCodeExporter commented 8 years ago
any easy way to get trace log?

Thank you

Original comment by cheng....@gmail.com on 16 Nov 2010 at 8:40

GoogleCodeExporter commented 8 years ago
Take a look at TraceForm.cs, output the text to a file instead of to the 
RichTextBox.

Original comment by freezing...@gmail.com on 16 Nov 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by freezing...@gmail.com on 21 Nov 2010 at 9:52