Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 26th, 2004, 02:03 PM
Registered User
 
Join Date: May 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with creating Word file using dll in ASP

I have created a ActiveX dll in VB to open a word template and then create a new word file with certain data. I am using this dll in an ASP page and it gives me "Permission Denied" error. The code in the dll

====================================
Dim wdApp As New Word.Application
Dim sSourcePath As String
'sSourcePath = "c:\Complete\W_532A_R.dot"
sSourcePath = App.Path & "\Complete\W_532A_R.dot"

wdApp.Documents.Open sSourcePath
====================================

The last line causes the error when used through ASP with the path specified both ways(commented & uncommented). The dll works fine if used in another VB app on the server.

The folder where the dll and the Word template is stored has full access for everyone including the IUSR... user.

Please Help.

Thanks

RB
 
Old May 27th, 2004, 10:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I am not too experienced with running Word from within an ASP component. Somehow I have always been able to avoid this kind of slow and unscalable solutions, but I am sure there are some good reasons to do it anyway.

It looks like a security issue to me. Although the IUSR has sufficient permissions, are you sure your site is running under the IUSR account? Where is your DLL hosted? In a COM+ package?

Take a look here for example: http://www.aspfree.com/index2.php?op...ge=0&hide_js=1
This article talks a bit about configuring DCom apps. I think you'll need to configure Word to act as a remote server. To do that, type dcomcnfg in the Run box and hit enter. You'll get a different program depending on your Windows version. For XP, somewhere under DCOM Config, you'll find Word or Word document. That's where I would start my "configuring business".

This may not be the answer you were hoping for, but I hope it's a least a good starting point for searching the web. Stuff like dcom and dcomcnfg are terms you'll find quite a lot of info about.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 27th, 2004, 10:43 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In addition to this, you want to read this: http://support.microsoft.com/default...b;en-us;288366

You can find this, and other useful articles by searching for Configure DCOM word.application at the MX support site: http://support.microsoft.com/default.aspx?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 27th, 2004, 02:29 PM
Registered User
 
Join Date: May 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

Thanks for you suggestions, they were not a starting point but the last thing I had to refer to find the solution!

The problem was, as you said, with the security on the Word DCOM. I modified the Identity under which to run Word to 'The interactive' user and added the IUSR... user to the access and launch security settings.

Thanks,

RB

 
Old May 28th, 2004, 02:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great. I knew it had something to do with the DCOM settings for Word, but wasn't sure what exactly you had to change. Did you change the settings for "Microsoft Word-document"? Or did you change something else?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 8th, 2004, 12:31 PM
Registered User
 
Join Date: May 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I changed the settings for 'Microsoft Word Document'

 
Old September 7th, 2006, 05:18 AM
Registered User
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi rupakb,

         I need your help very urgently. I saw your post on 05/26/2004 as
 "I have created a ActiveX dll in VB to open a word template and then create a new word file with certain data". Could please explain how you solve this requirement?



Thanks,
Kalees





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "WORD" document in ASP mcinar Classic ASP Components 9 April 10th, 2007 08:13 AM
Creating MS Word documents in ASP Nicky2k Classic ASP Components 3 April 10th, 2007 08:12 AM
Creating a "WORD" document in ASP mcinar Classic ASP Basics 7 June 30th, 2005 03:44 PM
Creating MS Word File at Client Side zaeem Classic ASP Components 1 November 2nd, 2003 07:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.