473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing a COM EXE Server from an ATL Web Server

Hello,

I've written an ATL web server that implements a HelloDCOM method which then
calls a DCOM EXE server only to return the bstrInput prefixed by a "Hello "
string.
When calling the DCOM interface, I get an E_ACCESSDENIED (0x80070005) error
code in return. What am I doing wrong?

my WebService method code:

HRESULT HelloDCOM(/*[in]*/ BSTR bstrInput, /*[out, retval]*/ BSTR
*bstrOutput) {
ITestServer* connection;
HRESULT hr;

// create the COM object
hr = CoCreateInstance(CLSID_TestServer, NULL, CLSCTX_ALL,
IID_ITestServer, (void**) &connection);
if(!SUCCEEDED(hr)) {
CString err;
err.Format("Error creating DCOM instance : %X", hr);
*bstrOutput = err.AllocSysString();
return S_FALSE;
}
return connection->HelloWorld(bstrInput, bstrOutput);
}

In dcomcnfg I've given full access allowed to the Everyone, ASPNET, and
IUSR_GABBY (which is the account under which the IIS is configured to run
anonymous calls) users, for launching and accessing the DCOM server.

Your help will be much appreciated,

Gabby Shainer
The Relegence Corporation.
Nov 16 '05 #1
1 2041
Where do you fail? At the CoCreate or at the point of the method call?
Because, if you fail at CoCreate, you might be having problems with
Launching the DCOM server.. That might mean that the launching user is not
someone with enough credential.
If its failing at the point of call, that might mean that the person making
the request might be different than you thought it would be . :) Try logging
the USER (GetUserName() or some such API) currently doing the call. Also,
you can turn on security auditing and watch the event log for any failure
entries.
--
Girish Bharadwaj
"Gabby Shainer" <ga****@relegence.co.il> wrote in message
news:OB*************@TK2MSFTNGP12.phx.gbl...
Hello,

I've written an ATL web server that implements a HelloDCOM method which then calls a DCOM EXE server only to return the bstrInput prefixed by a "Hello " string.
When calling the DCOM interface, I get an E_ACCESSDENIED (0x80070005) error code in return. What am I doing wrong?

my WebService method code:

HRESULT HelloDCOM(/*[in]*/ BSTR bstrInput, /*[out, retval]*/ BSTR
*bstrOutput) {
ITestServer* connection;
HRESULT hr;

// create the COM object
hr = CoCreateInstance(CLSID_TestServer, NULL, CLSCTX_ALL,
IID_ITestServer, (void**) &connection);
if(!SUCCEEDED(hr)) {
CString err;
err.Format("Error creating DCOM instance : %X", hr);
*bstrOutput = err.AllocSysString();
return S_FALSE;
}
return connection->HelloWorld(bstrInput, bstrOutput);
}

In dcomcnfg I've given full access allowed to the Everyone, ASPNET, and
IUSR_GABBY (which is the account under which the IIS is configured to run
anonymous calls) users, for launching and accessing the DCOM server.

Your help will be much appreciated,

Gabby Shainer
The Relegence Corporation.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
1
by: Amy Tseng | last post by:
Hi, I am having a problem accessing SQL Server 2000 via UNIX. I am accessing SQL Server 2000 from Solaris using Sybase Open Client (CT-Lib). Here is the error message: CT-LIBRARY error:...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
4
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
3
by: Nathan Sokalski | last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain points in the code, I need to access other controls on the page containing the validator. I have the IDs of these...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.