Works perfectly on my desktop, timesout on the web server.

Advertisement

rbakker
Joined:
Posts:
3
Location:
Canada

Works perfectly on my desktop, timesout on the web server.

Greetings
IIS 8.5
WinSCP Assembly 5.17.10
Uses Impersonate. Must be left on.

Runs perfect on my desktop. On the server I get this in the debug log.I can't genrate the XMl log.
Portions from the debug log.
Starting "d:\inetpub\root\appname\bin\winscp.exe" /xmllog="D:\folder\log\session.xml" /xmlgroups /xmllogrequired /nointeractiveinput /dotnet=5.17.10  /ini=nul /loglevel=2  /console /consoleinstance=_7796_7574610_82

Command: [open "sftp://username@ipaddress" -hostkey="hostkey" -privatekey="path to ppk file" -timeout=15]
[2021-03-10 11:17:36.359] [0024]   ExeSessionProcess.ExecuteCommand entering
[2021-03-10 11:17:36.359] [0024]   ExeSessionProcess.ExecuteCommand leaving
[2021-03-10 11:17:36.359] [0024]   Waiting for XML log file
[2021-03-10 11:17:36.470] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:36.470] [0017]   Total memory allocated: 164335400
[2021-03-10 11:17:36.470] [0017]   Waiting for request event
[2021-03-10 11:17:36.579] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:36.579] [0017]   Total memory allocated: 164335400
[2021-03-10 11:17:36.579] [0017]   Waiting for request event
[2021-03-10 11:17:36.689] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:36.689] [0017]   Total memory allocated: 164343592
[2021-03-10 11:17:36.689] [0017]   Waiting for request event
[2021-03-10 11:17:36.798] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:36.798] [0017]   Total memory allocated: 164351784
[2021-03-10 11:17:36.798] [0017]   Waiting for request event
[2021-03-10 11:17:36.907] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:36.907] [0017]   Total memory allocated: 164359976
[2021-03-10 11:17:36.907] [0017]   Waiting for request event
[2021-03-10 11:17:37.021] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:37.021] [0017]   Total memory allocated: 164368168
[2021-03-10 11:17:37.021] [0017]   Waiting for request event
[2021-03-10 11:17:37.137] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:37.137] [0017]   Total memory allocated: 164368168
[2021-03-10 11:17:37.137] [0017]   Waiting for request event
[2021-03-10 11:17:37.246] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:37.246] [0017]   Total memory allocated: 164384552
[2021-03-10 11:17:37.246] [0017]   Waiting for request event
[2021-03-10 11:17:37.355] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:37.355] [0017]   Total memory allocated: 164384552
[2021-03-10 11:17:37.355] [0017]   Waiting for request event
[2021-03-10 11:17:37.467] [0017]   2nd generation collection count: 6
[2021-03-10 11:17:37.467] [0017]   Total memory allocated: 164392744
[2021-03-10 11:17:37.467] [0017]   Waiting for request event
.
.
.
[2021-03-10 11:18:36.400] [0024]   Timeout waiting for WinSCP to respond - asking for callstack
[2021-03-10 11:18:36.400] [0024]   ExeSessionProcess.RequestCallstack entering
[2021-03-10 11:18:36.400] [0024]     Exception: System.Threading.WaitHandleCannotBeOpenedException: No handle of the given name exists.at System.Threading.EventWaitHandle.OpenExisting(String name, EventWaitHandleRights rights)
   at WinSCP.ExeSessionProcess.RequestCallstack()
[2021-03-10 11:18:36.400] [0024]        at WinSCP.Logger.WriteException(Exception e)
.
.
.
[2021-03-10 11:18:36.400] [0024]   ExeSessionProcess.RequestCallstack leaving
[2021-03-10 11:18:36.400] [0024]   Exception: System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file D:\folder\log\session.xml was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
I have tried giving my personal account, app pool and my ad group read/write and even full control to the root folder which the log folder is a child of.
What am I missing?

Reply with quote

Advertisement

rbakker
Joined:
Posts:
3
Location:
Canada

Works perfectly on my desktop, timesout on the web server.

When through suggested the link provided.

session.DebugLogLevel = 2
session.XmlLogPath = "D:\inetpub\wwwroot\AppName\log\sessionXML.txt" - I have given the appPool, all the relative AD groups hate write permissions to the folder. Same issue. Yes, I am using impersonate.
session.DebugLogPath = "D:\folder\folder\debug.log" This works

Is there a session setting missing for the server or a setting in IIS?
Thanks

Reply with quote

rbakker
Joined:
Posts:
3
Location:
Canada

Works perfectly on my desktop, timesout on the web server.

Greetings

In our attempts to resolve the issue with writing to a sessions log, we have tried various approaches from the forum:

1 Running the process under a different account.
processInfo.StartInfo.Domain = "DOMAIN"
processInfo.StartInfo.UserName = "username"
processInfo.StartInfo.Password = securePwd
2. Running the executable under a different account:
session.ExecutableProcessUserName = "DOMAIN\username2"
session.ExecutableProcessPassword = securePwd2
And combinations of the two with not success. We are using impersonate in our web.config because it is required.

Any suggestions or insights you can provide, would greatly appreciated.

Reply with quote

Advertisement

You can post new topics in this forum