473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exposing COM+ Applications as Web Services

I have read several articles that tell me that a COM+ application can expose
its components as web services, but can't get things to work for me.

I have the following class (slightly modified from one example I found) :

using System;
using System.Enterpri seServices;
using System.Xml;
using System.Runtime. InteropServices ;
namespace MyMathClass
{
[Guid("2D0B6B56-8572-4f25-8B13-E5CF81783E77")]
[ComVisible(true )]
public interface ISimpleMath
{
Int32 DoAdd(Int32 Input1, Int32 Input2);
}

[Transaction(Tra nsactionOption. Supported)]
[Guid("33933BDB-794D-4d3e-963A-D6FBCEE068E4")]
[ClassInterface( ClassInterfaceT ype.AutoDual)]
[ComVisible(true )]
public sealed class SimpleMath : ServicedCompone nt, ISimpleMath
{
public SimpleMath()
{
}
public Int32 DoAdd(Int32 Input1, Int32 Input2)
{
return Input1 + Input2;
}

}
}

This code compiles fine, I can register the assembly in the GAC, register
the component with regasm and then create the COM+ application (server
application).
Once I check the box under the activation tab of the application properties
and specify the vroot (CSSOAP) the web service appears in IIS.

Browsing to the web service (http://localhost/cssoap/) I get the expected
page with the link to the wsdl, but that's as far as things go. When I click
on the link I get the following error:

System.IO.FileN otFoundExceptio n: File or assembly name CSSoap, or one of its
dependencies, was not found.
File name: "CSSoap"
at System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurit y, Boolean
throwOnFileNotF ound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef,
Boolean stringized, Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Strin g assemblyString,
Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Loa d(String assemblyString)
at System.Runtime. Remoting.Remoti ngConfigInfo.Lo adType(String typeName,
String assemblyName)
at System.Runtime. Remoting.Remoti ngConfigInfo.Ge tServerTypeForU ri(String
URI)
at
System.Runtime. Remoting.Remoti ngConfigHandler .GetServerTypeF orUri(String URI)
at System.Runtime. Remoting.Remoti ngServices.GetS erverTypeForUri (String URI)
at
System.Runtime. Remoting.Channe ls.Http.HttpRem otingHandler.Ca nServiceRequest (HttpContext context)
at
System.Runtime. Remoting.Channe ls.Http.HttpRem otingHandler.In ternalProcessRe quest(HttpConte xt context)

=== Pre-bind state information ===
LOG: DisplayName = CSSoap, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 5e5633b846f72f0 5
(Fully-specified)
LOG: Appbase = file:///C:/WINDOWS/system32/com/SOAPVRoots/CSSoap
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file
(c:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \aspnet.config) .
LOG: Using machine configuration file from
C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ config\machine. config.
LOG: Post-policy reference: CSSoap, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 5e5633b846f72f0 5
LOG: Attempting download of new URL
file:///c:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/cssoap/5babd251/42e46353/CSSoap.DLL.
LOG: Attempting download of new URL
file:///c:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/cssoap/5babd251/42e46353/CSSoap/CSSoap.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/system32/com/SOAPVRoots/CSSoap/bin/CSSoap.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/system32/com/SOAPVRoots/CSSoap/bin/CSSoap/CSSoap.DLL.
LOG: Attempting download of new URL
file:///c:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/cssoap/5babd251/42e46353/CSSoap.EXE.
LOG: Attempting download of new URL
file:///c:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/cssoap/5babd251/42e46353/CSSoap/CSSoap.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/system32/com/SOAPVRoots/CSSoap/bin/CSSoap.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/system32/com/SOAPVRoots/CSSoap/bin/CSSoap/CSSoap.EXE.
Please can you tell me what I am doing wrong here?

The assembly was compiled in VS.NET 2005 on Windows XP Pro SP2.

I have checked the /bin folder for the web service and it is empty, however
I believe this is correct as the assembly is installed in the GAC and there
are no COM wrapper classes involved.

I look forward to getting a resolution for this quickly as we would like to
use this method to expose existing functionality as web services with the
least effort (time!).

Thanks,

--------------------------
Shaun Venus

emailid: sunevnuahs
domain: hotmail.com
--------------------------
Nov 23 '05 #1
0 1672

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

Similar topics

0
1199
by: MarionEll | last post by:
XML 2004 to Focus on Government XML Applications Expanded Government Track to Highlight XML Applications in U.S. and Abroad; XML.gov, KM.gov, CIO Council, and SICoP to Co-Host Event Alexandria, Va. – Oct. 6, 2004 – IDEAlliance, a leading industry association dedicated to fostering XML and other information technology standards,...
26
4445
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using System.EnterpriseServices;
1
1268
by: David | last post by:
Hello. How can I expose some mehods from my Windows Servise application as Web Service and access thm from other application?
1
1086
by: Jo Blow | last post by:
Hi folks, I have a client that has a distributed access disaster that I want to move to a central ASP.NET system. I'm new to web services but is it possible to expose the raw database tables (subset off) in a web service that they can link to to query from Excel/access/whatever. The problem is that they don't want to move to web-based as...
3
2130
by: bill | last post by:
I need to open a asp.net web form from a classic asp page, and pass a username and password to the asp.net page. The username and password exist as session variables in the classic asp application. I can't put the password in the classic asp page form as a hidden field and submit it, because someone can view source and see the password. ...
8
1895
by: Dave A | last post by:
I have a class called 'PrimaryKey' that represents the primary key of a table. PrimaryKeys can only be created and the class only implements .ToString(). The PrimaryKey class internally stores the data as either a int or a Guid depending on the structure of the database. If we simply used int to represent a primary key, rather than this...
12
6808
by: Griff | last post by:
I have a two tier system. I've created a COM+ package on the data tier (Win2003) and exported it as a COM+proxy (v 1.0 compliant) and installed this onto a Win2000 web application. I've created a simple VB6 application that I run on the web tier to call a method on the proxy stub and this successfully runs on the data tier. However,...
0
7920
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...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3844
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...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
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
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.