Simple .NET Set Up - System.TimeoutException

Advertisement

JohnMontet
Joined:
Posts:
5

Simple .NET Set Up - System.TimeoutException

I'm running a brand-new .NET installation using 5.7.7 and I'm receiving the following timeout error:

System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time (response log file C:\Windows\TEMP\wscp1230.017D53CE.tmp was not created). This could indicate lack of write permissions to the log folder or problems starting WinSCP itself. at WinSCP.Session.CheckForTimeout(String additional) at WinSCP.Session.Open(SessionOptions sessionOptions)

I've ensured that the user has read/write permissions to the C:\Windows\TEMP\ folder.

I'm using code very similar to the VB.NET example (https://winscp.net/eng/docs/library#vbnet). The WinSCP.exe and WinSCPnet.dll files are located in the /Bin folder of the site.

Any suggestions as to what might be going on? Any help is greatly appreciated.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Simple .NET Set Up - System.TimeoutException

In what environment are you running the code? Is it a desktop application, web application, or other?

Reply with quote

JohnMontet
Joined:
Posts:
5

Re: Simple .NET Set Up - System.TimeoutException

Thank you for your response and attention, prikryl. You can all mark this as solved!

I was using Impersonation. I shut this off in the Web.config and made sure that the IIS Application Pool user had access to the site's root directory.

Like a charm, my friends, like a charm.

Cheers!

:)

Reply with quote

martin
Site Admin
martin avatar

Re: Simple .NET Set Up - System.TimeoutException

Thanks for your feedback.

Did you really had to do both? Or what was the primary cause of the problem?

Reply with quote

Advertisement

JohnMontet

Re: Simple .NET Set Up - System.TimeoutException

I actually had to do both. The application user had to have "Write" privileges for log files to be written. (I couldn't figure out how to shut off logging in the current version.)

Reply with quote

martin
Site Admin
martin avatar

Re: Simple .NET Set Up - System.TimeoutException

OK. What did you do first? Did you try to run the code between the two changes? Did an error message change after the first change?

Reply with quote

JohnMontet

Re: Simple .NET Set Up - System.TimeoutException

Yes. The error I first listed above vanished after I turned off Impersonation.

At that point, the application threw a file stream accessibility issue. Ensuring that the application user had write credentials to the log file location fixed that one.

Reply with quote

Advertisement

You can post new topics in this forum