HOWTO? call dcom within webservice?

  • Thread starter Michael Daniels
  • Start date
M

Michael Daniels

Hello NG,

I have the following Problem

I have:
1.WebService "TestService"
2.MFC appl with COM Interface
3.A c# froms application

"c#Anwedung"->(per soap)"Webservice"->(per com)"MFCAnwendung"

if i call the method the following expetion pops up ( sorry i only have the
german error message)
it says something permission denied to that dcom application
############################################################################
################################
Eine nicht behandelte Ausnahme des Typs
'System.Web.Services.Protocols.SoapException' ist in system.web.services.dll
aufgetreten.

Zusätzliche Informationen: System.Web.Services.Protocols.SoapException: Der
Server konnte die Anforderung nicht verarbeiten. --->
System.UnauthorizedAccessException: Zugriff verweigert
at TestCEDienst.Service1.HelloWriteMapfile(String strFileName, String
strByteStream) in c:\inetpub\wwwroot\testcedienst\service1.asmx.cs:line 68
--- Ende der internen Ausnahmestapelüberwachung ---
############################################################################
#############################

Do I have to set some security settings in dcomcnfg for the mfc apllication?

Code schnipsel Webservice:
--------------------------------
[WebMethod]

public long HelloWriteMapfile(string strFileName, string strByteStream){

MapfileDcomInterLib.MapfileDComClass Map = new
MapfileDcomInterLib.MapfileDComClass();

int iReturnValue = -1;

Map.WriteMapfileStream(ref strFileName, 256, ref strByteStream, out
iReturnValue);


return iReturnValue;

}



Code schnipsel C# application:

--------------------------------------------------------------

private void button1_Click(object sender, System.EventArgs e) {

localhost.Service1 webService = new WebDienstTest.localhost.Service1();

webService.HelloWriteMapfile("Test", "01020304");

}



Regards

Michael
 

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top