Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: ISAPI on IIS 10 SendFile problem



Permlink Replies: 14 - Last Post: Jan 9, 2018 10:39 PM Last Post By: Alexandre Machado Threads: [ Previous | Next ]
Zdenek Vasku

Posts: 15
Registered: 7/13/00
ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 7:01 AM
Hello,

we have problem with IIS10 (W2016 server) and ISAPI made in IW14.x.x. When we try to download large (400MB) file using WebApplication.SendFile, download hangs after approx. 32 mb.
The same application has no problem under IIS 7 and 7.5. Content limits on IIS are 1GB.

Has someone any ideas, where is problem?

Thanks
Zdenek
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 7:23 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Zdenek Vasku wrote:
Hello,

we have problem with IIS10 (W2016 server) and ISAPI made in IW14.x.x. When we try to download large (400MB) file using WebApplication.SendFile, download hangs after approx. 32 mb.
The same application has no problem under IIS 7 and 7.5. Content limits on IIS are 1GB.

Has someone any ideas, where is problem?

Which exact version are you using? I seem to recall some fixes to file download in a recent version but I can't easily scan the version info at this time.

If you are not using the current version (14.2.3), please update and give it a try. Also, please let us know which IW version and which Delphi version you are using.

Dan
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 7:28 AM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:

Which exact version are you using? I seem to recall some fixes to file download in a recent version but I can't easily scan the version info at this time.

If you are not using the current version (14.2.3), please update and give it a try. Also, please let us know which IW version and which Delphi version you are using.

I'm using 14.2.3 with Delphi XE7. I check 14.0.59 and same result. All 32bit.
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 8:28 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Zdenek Vasku wrote:
Dan Barclay wrote:

Which exact version are you using? I seem to recall some fixes to file download in a recent version but I can't easily scan the version info at this time.

If you are not using the current version (14.2.3), please update and give it a try. Also, please let us know which IW version and which Delphi version you are using.

I'm using 14.2.3 with Delphi XE7. I check 14.0.59 and same result. All 32bit.

Thanks. I'm certain someone who has done more file download will respond before long, the first thing they would ask is the version you are on so this info gives them a head start.

Thanks
Dan
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 8:42 AM   in response to: Dan Barclay in response to: Dan Barclay
If I create simple dll with one button with OnClik event like this:

WebApplication.SendFile('c:\......CD1.zip ',false,'application/octet-stream');

App is not working.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2017 12:12 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Hi,

we did extensive testing on IIS 10 and I have just tested a big (500 Mb) file download on IIS 10 and it works as expected. No errors or issues.

Besides that, the fact that the same DLL works flawlessly in another server suggests that the the problem is probably on this particular IIS setup, no?

What exactly are you experiencing? Does the connection breaks and your file is partially downloaded?
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2017 2:02 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Hi,

we did extensive testing on IIS 10 and I have just tested a big (500 Mb) file download on IIS 10 and it works as expected. No errors or issues.

Besides that, the fact that the same DLL works flawlessly in another server suggests that the the problem is probably on this particular IIS setup, no?

This dll works on w2008, windows7 with iis, but not on this w2016 iis10. This is only one differrence i have found. All other config looks same. Firewall, UTM etc.


What exactly are you experiencing? Does the connection breaks and your file is partially downloaded?

Connection breaks, file is partially donwloaded. w3wp process with dll hang in ram. Must be killed manually. If I place file as static file on same web, download work ok.
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 31, 2017 3:01 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Now I test on w2012r2 and dll works ok.
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2017 5:03 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
I have done lot of investigation and confirm it's not intraweb problem. Plain isapi dll has the same problems. I found it never happens to nonsecure connection. Only with ssl and on w2016 in our virtual machines. On local network it's not so frequent and over wan it always happen.

Thank
Zdenek
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2017 12:24 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Zdenek Vasku wrote:
I have done lot of investigation and confirm it's not intraweb problem. Plain isapi dll has the same problems. I found it never happens to nonsecure connection. Only with ssl and on w2016 in our virtual machines. On local network it's not so frequent and over wan it always happen.

Thank
Zdenek

Hum... so in your case it only happens using HTTPS on WAN, right? Can you confirm that? This is an important piece of information in order to narrow it down....
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 8, 2017 7:50 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Zdenek Vasku wrote:
I have done lot of investigation and confirm it's not intraweb problem. Plain isapi dll has the same problems. I found it never happens to nonsecure connection. Only with ssl and on w2016 in our virtual machines. On local network it's not so frequent and over wan it always happen.

Thank
Zdenek

Hum... so in your case it only happens using HTTPS on WAN, right? Can you confirm that? This is an important piece of information in order to narrow it down....

Yes. I have solved problem by uninstaling latest "nonofficial" update KB4052231. KB4041688 is ok.
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2018 10:35 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Zdenek Vasku wrote:
Alexandre Machado wrote:
Zdenek Vasku wrote:
I have done lot of investigation and confirm it's not intraweb problem. Plain isapi dll has the same problems. I found it never happens to nonsecure connection. Only with ssl and on w2016 in our virtual machines. On local network it's not so frequent and over wan it always happen.

Thank
Zdenek

Hum... so in your case it only happens using HTTPS on WAN, right? Can you confirm that? This is an important piece of information in order to narrow it down....

Yes. I have solved problem by uninstaling latest "nonofficial" update KB4052231. KB4041688 is ok.

I have problem with SendFile again. Probably after windows 2016 update from 5.1.2018, but not sure. I'm not able to download large file using intraweb SendFile or WebBroker WebModule Response.ContentStream. Download hangs after cca 50 MB. I can download the same file as static file, so I think it's not related to firewall etc.

Both code is verz simple:

procedure TIWForm1.IWButton1Click(Sender: TObject);
begin
 WebApplication.SendFile('c:\pom\CD1.zip',false,'application/x-zip-compressed');
end;


or

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
  Response.ContentStream:=TFileStream.Create('c:\pom\cd1.zip',fmOpenRead);
  Response.ContentType:='application/x-zip-compressed';
end;


Does anyone have any ideas?

Thanks a lot
Zdenek
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 10:39 PM   in response to: Zdenek Vasku in response to: Zdenek Vasku
Zdenek Vasku wrote:
Zdenek Vasku wrote:
Alexandre Machado wrote:
Zdenek Vasku wrote:
I have done lot of investigation and confirm it's not intraweb problem. Plain isapi dll has the same problems. I found it never happens to nonsecure connection. Only with ssl and on w2016 in our virtual machines. On local network it's not so frequent and over wan it always happen.

Thank
Zdenek

Hum... so in your case it only happens using HTTPS on WAN, right? Can you confirm that? This is an important piece of information in order to narrow it down....

Yes. I have solved problem by uninstaling latest "nonofficial" update KB4052231. KB4041688 is ok.

I have problem with SendFile again. Probably after windows 2016 update from 5.1.2018, but not sure. I'm not able to download large file using intraweb SendFile or WebBroker WebModule Response.ContentStream. Download hangs after cca 50 MB. I can download the same file as static file, so I think it's not related to firewall etc.

Both code is verz simple:

procedure TIWForm1.IWButton1Click(Sender: TObject);
begin
 WebApplication.SendFile('c:\pom\CD1.zip',false,'application/x-zip-compressed');
end;


or

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
  Response.ContentStream:=TFileStream.Create('c:\pom\cd1.zip',fmOpenRead);
  Response.ContentType:='application/x-zip-compressed';
end;


Does anyone have any ideas?

Thanks a lot
Zdenek

You mentioned WebBroker as well? So it is definitely a IIS/Windows issue...
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2018 10:36 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
deleted

Edited by: Zdenek Vasku on Jan 8, 2018 10:38 AM
Zdenek Vasku

Posts: 15
Registered: 7/13/00
Re: ISAPI on IIS 10 SendFile problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2018 10:36 AM   in response to: Zdenek Vasku in response to: Zdenek Vasku
deleted

Edited by: Zdenek Vasku on Jan 8, 2018 10:38 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02