Project

General

Profile

Support #3654

Unhandled exception occurs when running some Wt example as ISAPI in IIS 8.

Added by Alan Parson over 7 years ago. Updated about 6 years ago.

Status:
InProgress
Priority:
Normal
Assignee:
Target version:
Start date:
11/08/2014
Due date:
% Done:

0%

Estimated time:

Description

Hello,

Here is the issue I am having when running "Hangman" or a "Blog" examples.

They work fine when using wthttp connector. But, they cause an the following error when running them

as ISAPI in IIS 8 on both Windows 8.1 64bit or Windows Server 2012 64bit: "An unhandled exception occured in w3wp.exe [5064]".

On windows 8.1 I then see a "Visual Studio Just-in-time debugger" window. In Windows Server 2012 IIS 8 just crashes and

requires a restart. It is important to note that examples like "Hello" or "Dialog" works fine with ISAPI on IIS 8.

I gave 'write' permission to the IIS user account to write to the examples folder, so, can not figure out what is

the root cause. All other steps are properly done based on the Wt doc page at

http://redmine.emweb.be/projects/wt/wiki/ISAPI_on_Microsoft_IIS

Wt compiled to target 64bit platform on Windows 8.1 64bit using Visual Studio Express 2013 using Boost 1.56.

Also, IIS 8 can not even log this error in the error log file. I can only attach the Application Error from Windows Log:

Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17278, time stamp: 0x53eebf2e
Exception code: 0xe06d7363
Fault offset: 0x000000000000606c
Faulting process id: 0x1a10
Faulting application start time: 0x01cffb0ffa71bb1b
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 384aa452-6703-11e4-8258-3c970ed1aad3
Faulting package full name:

Faulting package-relative application ID:

Thanks very much.

#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Wim Dumon
#2

Updated by Wim Dumon over 7 years ago

Hey Alan,

Hangman and Blog are indeed two applications that try to write a database to the approot directory, so that could very well be the issue. Are you absolutely sure that you configured the approot correctly, and that the w3wp.exe process has write permissions to that directory? I'd have to set up a Windows 8 development system to test this, which would take a reasonable high amount of time and frustration...

Best regards,

Wim.

#3

Updated by Alan Parson over 7 years ago

Hello Wim,

I found this very similar problem at:

http://stackoverflow.com/questions/5437723/iis-apppoolidentity-and-file-system-write-access-permissions

but still could not understand what else I should do in addition to giving IIS_IUSERS

a 'write' permission to the folder. I don't want you to spend your time on this as I am probably missing something

here. I will try to play with this a bit on my own.

Thanks for help!

#4

Updated by Wim Dumon over 7 years ago

Hey Alan,

I must admit that I never fully researched this, I believe I made the folder full-access for anything. Interesting post on stackoverflow, seems to provide useful information.

Best regards,

Wim.

#5

Updated by Alan Parson over 7 years ago

Hello there,

Unfortunately, I was not able to tackle the reported problem. I even had to close my Windows hosting

account as I could not move on with using ISAPI in IIS 8 on Windows Server 2012 R2.

I wonder, is there any alternative Web server solution for Windows platform that would work with Wt framework?

I would love to keep Windows Server 2012 R2 for my future solutions based on Wt.

Please advise.

Thank you.

#6

Updated by Wim Dumon over 7 years ago

I'd recommend to configure IIS as a reverse proxy for a wthttpd that listens on the localhost address (127.0.0.1). I think that's a much easier approach to configure than the ISAPI connector.

Best regards,

Wim.

#7

Updated by Alan Parson over 7 years ago

Thanks very much, Wim.

I will try this option.

Regards.

#8

Updated by Robert Tomek about 6 years ago

This issue is still here. The documentation should state that the isapi plugin only works for IIS 6 or something.

What's interesting is that when I run my isapi plugin w/dbo (and Auth::AuthWidget) it will create a brand new sqlite database, but when it tries to register a new user it will crash. The db-journal file will be created and still exists after the crash, but the database does not get updated. If I use a previously created database, it will crash upon trying to login as well. My assumption is that there is an issue with modifying files, but not with reading or writing new ones.

#9

Updated by Wim Dumon about 6 years ago

I'm not convinced the ISAPI plugin doesn't work with IIS 8. This really seems like an access rights issue. There's nothing related to IIS in the code for file accesses for IIS plugins, the normal open/read/write/... calls are used.

Wim.

#10

Updated by Robert Tomek about 6 years ago

It looks more like a write lock with the sqlite database. Like I stated above, it will create the database and tables and it will create a .journal file. It just never completes the update transaction. The file is locked, an exception (error) occurs and the login never completes because it can't update the timestamp for last login.

#11

Updated by Robert Tomek about 6 years ago

Actually, I'm testing with Postgres now, and I think it's the Auth module that has the issue, not the Dbo module.

Using the exact same code, my login page on the httpd version shows both 'Lost password' and 'Register' below the Login button. The isapi version only shows 'Register'. The Registration widget is also missing the email field on the isapi version even though the code has:

@

myAuthService.setEmailVerificationEnabled(true);

myAuthService.setEmailVerificationRequired(true);

@

I noticed this activity on the Registration widget using either database connector.

#12

Updated by Robert Tomek about 6 years ago

OK, there was one line different between my two main() functions that explained the missing email field. I'm getting a strong login before it crashes with postgres, at least.

#13

Updated by Robert Tomek about 6 years ago

So it turns out something was trying to write to the DefaultAppPool's home dir, which it couldn't find. I guess that's what happens when you share DLLs between a web app and a desktop application.

Also available in: Atom PDF