Click here to Skip to main content
15,921,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this code

C#
public void FaxDocument(String TheFile, string faxnumber)
{
    FAXCOMLib.FaxServer server = new FAXCOMLib.FaxServerClass();
    FAXCOMLib.FaxDoc doc = null;
    int response = -11;

    try
    {
        Response.Write(Environment.MachineName + "<hr>");
        server.Connect(Environment.MachineName);
    }
    catch (Exception e)
    {
        Response.Write("1" + e.Message);
    }

    try
    {
        doc = (FAXCOMLib.FaxDoc)server.CreateDocument(TheFile);
    }
    catch (Exception e)
    {
        Response.Write("doc error" + e.Message);
    }

    try
    {
        doc.FaxNumber = faxnumber;
        doc.RecipientName = "Test";
        doc.DisplayName = "work";
    }
    catch (Exception e)
    {
        Response.Write("assignments" + e.Message);
    }


    try
    {

        response = doc.Send();
    }
    catch (Exception e)
    {
        Response.Write(response + e.Message);
    }

    try
    {
        server.Disconnect();
    }
    catch (Exception e)
    {
        Response.Write("2" + e.Message);
    }



    Response.Write("w00t<hr>");
    Response.Write(response);

}


it's work correctly when i use it on local machin but when i upload it on my server i get this error


Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))-11The data is invalid. (Exception from HRESULT: 0x8007000D)w00t -11


i know it's for accessing from client to server

how can i solve it? it is so important for me
Posted
Comments
Herman<T>.Instance 15-Jul-15 6:05am    
ACCESSDENIED....you do not have the rights on the server to do this. Talk to your SYSADMIN

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900