P
Patrick Bates
I've been struggling for two weeks now to duplicate a VB6 ActiveX control in
VB.Net, and also improve it's functionality. The control is used to collect
the user's fingerprint and compare it to a stored copy on the server, and if
the match is successful fill some hidden fields with values and call a form
submit. We wanted to use web services rather than direct SQL connections as
we do now, and to also have the web service URL set dynamically.
We built the project as a Windows Control (DLL) class with COM Class and COM
Visible set to True. We were able to get the control to load in IE, but due
to the need to interface with the local USB fingerprint device we had to
list the web site as Trusted and elevate the Trusted Zone to perform no
security checks (Problem #1).
The class required a couple of DLL files to function properly, and as
expected we were able to put them in the same folder as the class DLL file
and they were downloaded automatically. The problem was the App.Config
file, it never would download. (Problem #2) We recently figured out that
apparently a DLL can't make use of App.Config, but the calling app can.
This explained seeing the client attempt to download iexplore.exe.config in
the web logs. To make matters worse, it wasn't attempting to download the
file from the location of the class DLL, but rather from the root of the web
site and from /bin folder. (Problem #3)
So we renamed the App.Config file and placed it in the root. It still would
not download, this time with 403 Errors which we determined were the ASP.Net
interpreter trying to process the file rather than allow direct access.
(Problem #4) We decided to remove the parsing of .config files from the
configuration of the root web app, which finally allowed everything to
execute properly. But now, if we had any web.config files in the root app,
they would be open to being freely downloaded, and might not even work at
all (Problem #5)
I just know there has to be a better way to do this. I cannot believe that
it's this difficult with .Net to duplicate and improve on the functionality
we had using VB6. Perhaps someone with experience in things such as this
will step forward and point us in another direction.
Thanks,
Patrick Bates
VB.Net, and also improve it's functionality. The control is used to collect
the user's fingerprint and compare it to a stored copy on the server, and if
the match is successful fill some hidden fields with values and call a form
submit. We wanted to use web services rather than direct SQL connections as
we do now, and to also have the web service URL set dynamically.
We built the project as a Windows Control (DLL) class with COM Class and COM
Visible set to True. We were able to get the control to load in IE, but due
to the need to interface with the local USB fingerprint device we had to
list the web site as Trusted and elevate the Trusted Zone to perform no
security checks (Problem #1).
The class required a couple of DLL files to function properly, and as
expected we were able to put them in the same folder as the class DLL file
and they were downloaded automatically. The problem was the App.Config
file, it never would download. (Problem #2) We recently figured out that
apparently a DLL can't make use of App.Config, but the calling app can.
This explained seeing the client attempt to download iexplore.exe.config in
the web logs. To make matters worse, it wasn't attempting to download the
file from the location of the class DLL, but rather from the root of the web
site and from /bin folder. (Problem #3)
So we renamed the App.Config file and placed it in the root. It still would
not download, this time with 403 Errors which we determined were the ASP.Net
interpreter trying to process the file rather than allow direct access.
(Problem #4) We decided to remove the parsing of .config files from the
configuration of the root web app, which finally allowed everything to
execute properly. But now, if we had any web.config files in the root app,
they would be open to being freely downloaded, and might not even work at
all (Problem #5)
I just know there has to be a better way to do this. I cannot believe that
it's this difficult with .Net to duplicate and improve on the functionality
we had using VB6. Perhaps someone with experience in things such as this
will step forward and point us in another direction.
Thanks,
Patrick Bates