473,811 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = CoCreateInstanc e(CLSID_TestSer ver, NULL, CLSCTX_ALL,
IID_ITestServer , (void**) &connection) ;
if(!SUCCEEDED(h r)) {
CString err;
err.Format("Err or creating DCOM instance : %X", hr);
*bstrOutput = err.AllocSysStr ing();
return S_FALSE;
}
return connection->HelloWorld(bst rInput, 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 2086
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****@relegen ce.co.il> wrote in message
news:OB******** *****@TK2MSFTNG P12.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 = CoCreateInstanc e(CLSID_TestSer ver, NULL, CLSCTX_ALL,
IID_ITestServer , (void**) &connection) ;
if(!SUCCEEDED(h r)) {
CString err;
err.Format("Err or creating DCOM instance : %X", hr);
*bstrOutput = err.AllocSysStr ing();
return S_FALSE;
}
return connection->HelloWorld(bst rInput, 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
2991
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 2 : COM objects Tier 3 : SQL Server 2000 DB Flow is : ASP talks with COM objects and COM objects talks with DB Scenario 1
1
4248
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: ct_connect(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect
3
4322
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 geographical locations. I have been completely unsucessful in acheiving this goal so far however. Things I have tried: Create a shortcut to ftp sight via browser then tried to map local drive to
0
2270
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 updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization involves reading and writing some text and xml files using simple streamreader and streamwriter...
5
3071
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 explorer would do in this case. The headers I am getting are: Headers {Content-Disposition: attachment; filename="dynamic_file.mdb" Connection: close Cache-Control: private Content-Type: application/octet-stream
4
3785
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 testing purposes, the secure place is setup on the client machine. The client (window app) calls the web service (on a different machine) and connects successfully to the web service. However, when client calls a method that copies the file from...
3
5009
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 : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
4
4227
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 change that the application will be able to run on any other machine (using \\ syntax on the run command- not a problem) using the DB located on a static-different machine. for this purpose I need to create a Remote Connection from my
3
1578
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 controls, so I use the following statement to access them: Me.Page.FindControl(ControlID) However, this is returning Nothing, even though the control can be accessed in the Load event of the Page containing the control and the validator. I also...
8
10848
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 steps successfully with the following code... Control myContainer = (Control)Wizard1.FindControl("SideBarContainer"); DataList mySideBarList = (DataList)myContainer.FindControl("SideBarList");
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.