Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / January 2005

Tip: Looking for answers? Try searching our database.

COM Component via Web Page.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Gutery - 13 Jan 2005 14:35 GMT
I have written a COM component who's purpose is to allow a user to change
his Windows (NT/AD) password via a web page. Now the component works fine
when I run it in VB 6, but not via the web page. The component also returns
an integer value that contains a return code from the Component (and the
appropriate Windows API). The result (using the ASP page) is Zero, which
indicates success. However the password doesn't change. (Zero = success, 100
= Invalid Domain, 101 = Invalid User, 102 = Invalid Password).

When using the component via VB or the LAN, we get correct results when
using bad Domains, Users and Passwords. So we are assured and confident that
the Component works as expected.

I suspected it had something to do with the IUSR account, so I added the
IUSR to the AD Domain Administrators group and the same result, ie return
result was Zero, which indicates apparent success - but the password didn't
change. So, I am at a bit of a loss as to why this doesn't work via an ASP
page.

As mentioned above, the component works fine via VB (both in the IDE and
Compiled), so we know that the code is all good and to make sure that I've
covered all the basis, I logged into AD with a normal user account and ran
the code. It worked fine. I realize that this is a security breach, but once
we have the component working via a browser, we'll tighten things up.

If anyone has any ideas, I would apprecicate pointers or some direction.

Thanks.

RG
Steve Easton - 14 Jan 2005 14:58 GMT
Run it from a html application .hta  instead of from a web page .htm  An .hta page has "system"
access.

<html>

<head>
<title></title>
<HTA:APPLICATION ID=yourappname
 applicationName=yourappname
 version="1.0"
 icon=you can designate an icon or delete this line
 singleInstance=yes
 showInTaskBar=yes
 minimizeButton=no
 maximizeButton=no
 border=thin
 borderStyle=raised
 sysMenu=yes
 windowState=Normal
 caption=yes

</head>
<body>

<body>
</html>

save with the .hta extension.

Signature

Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer

> I have written a COM component who's purpose is to allow a user to change
> his Windows (NT/AD) password via a web page. Now the component works fine
[quoted text clipped - 25 lines]
>
> RG
Richard Gutery - 14 Jan 2005 16:00 GMT
Thanks Steve. I'm not familiar with HTA applications so I'm not sure what is
meant by Run my app in .hta. Do I insert my ASP code inside the hta (my code
is in an ASP page)? If so, how would I do this or where in the tag stucture
would I place my code? Or do I call my ASP page from within? So many
questions, so many things to catch up on.

I'm actually reviewing an MSDN articacle for hta, but I suspect that will
take a while. This is the article I'm reviewing:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/
htaoverview.asp


In any case, I'll plod along with your tip (seems to be pretty powerful).

Thanks again,

RG

> Run it from a html application .hta  instead of from a web page .htm  An
> .hta page has "system"
[quoted text clipped - 63 lines]
>>
>> RG
Steve Easton - 14 Jan 2005 16:08 GMT
You would run it in the .hta exactly the same way you were trying to run it in a web page.

You can open / edit an .hta just like you would a .htm file with VS or FrontPage.

If run from a server when the .hta is opened the user will be prompted about safe files and then
have to select open.
When run from a client their is no prompt.

If you would like to see an example, there are two "clocks" built into .hta files here.
The clocks run javascript in the .hta

http://www.95isalive.com/java/clocks.htm

Click the links to open them.

Signature

Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer

> Thanks Steve. I'm not familiar with HTA applications so I'm not sure what is
> meant by Run my app in .hta. Do I insert my ASP code inside the hta (my code
[quoted text clipped - 79 lines]
> >>
> >> RG
Richard Gutery - 14 Jan 2005 16:38 GMT
Thank you sir. That was exactly what I was looking for, actually I started
playing with it a tad after my last post. One more quick question.

Can I elimiate the Open or Run dialog on the client side? I suspect not, but
I thought I'd ask.

Again, thanks for the direction.

RG

> You would run it in the .hta exactly the same way you were trying to run
> it in a web page.
[quoted text clipped - 114 lines]
>> >>
>> >> RG
Steve Easton - 14 Jan 2005 17:22 GMT
If opened from a server the open or run dialog will always display.
If run from a client machine as a file, there will not be a prompt.

Signature

Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer

> Thank you sir. That was exactly what I was looking for, actually I started
> playing with it a tad after my last post. One more quick question.
[quoted text clipped - 124 lines]
> >> >>
> >> >> RG
Richard Gutery - 19 Jan 2005 14:55 GMT
Hey Steve (and Group). I appreciated the information, but at the end of the
day my client was not pleased with having to click on "One More OK or Run"
button, so I did some more digging (in wanting to keep everything
streamlined within the context of ASP adn COM) I found this link, which
makes the Universe all better: http://support.microsoft.com/kb/248187/EN-US/

Again, thanks for the assist.

RG
> If opened from a server the open or run dialog will always display.
> If run from a client machine as a file, there will not be a prompt.
[quoted text clipped - 143 lines]
>> >> >>
>> >> >> RG

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.