473,386 Members | 1,715 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,386 software developers and data experts.

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.EnterpriseServices;
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(TransactionOption.Supported)]
[Guid("33933BDB-794D-4d3e-963A-D6FBCEE068E4")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public sealed class SimpleMath : ServicedComponent, 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.FileNotFoundException: File or assembly name CSSoap, or one of its
dependencies, was not found.
File name: "CSSoap"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Runtime.Remoting.RemotingConfigInfo.LoadTyp e(String typeName,
String assemblyName)
at System.Runtime.Remoting.RemotingConfigInfo.GetServ erTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingConfigHandler.GetS erverTypeForUri(String URI)
at System.Runtime.Remoting.RemotingServices.GetServer TypeForUri(String URI)
at
System.Runtime.Remoting.Channels.Http.HttpRemoting Handler.CanServiceRequest(HttpContext context)
at
System.Runtime.Remoting.Channels.Http.HttpRemoting Handler.InternalProcessRequest(HttpContext context)

=== Pre-bind state information ===
LOG: DisplayName = CSSoap, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=5e5633b846f72f05
(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\Microsoft.NET\Framework\v1.1.4322\aspn et.config).
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\confi g\machine.config.
LOG: Post-policy reference: CSSoap, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=5e5633b846f72f05
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 1659

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

Similar topics

0
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 ...
26
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...
1
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
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...
3
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...
8
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...
12
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.