HOWTO? call dcom within webservice?

Discussion in 'ASP .Net Web Services' started by Michael Daniels, Nov 4, 2003.

  1. 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
    Michael Daniels, Nov 4, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex
    Replies:
    3
    Views:
    1,468
    Alvin Bruney
    Dec 2, 2003
  2. Ron Baakkonen

    Can't invoke DCOM call from ASP.NET

    Ron Baakkonen, Nov 19, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    255
    Ron Baakkonen
    Nov 24, 2003
  3. kozen

    A problem about WebService interop DCOM

    kozen, Sep 9, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    138
    kozen
    Sep 9, 2004
  4. calling DCOM from within a web service

    , Feb 20, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    113
    Keenan Newton
    Feb 20, 2005
  5. René Preußler

    Asynchronous Call of WebService method within a WebService

    René Preußler, Oct 29, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    182
    René Preußler
    Oct 29, 2008
Loading...

Share This Page