need help with SSL

Discussion in 'Site Programming, Development and Design' started by Zorglub, Aug 2, 2014.

  1. Hi,

    I got my SSL certificate registered in the SSL Manager.

    I create a webservice that I deployed on my website.
    I also have a website that is deployed.
    I want the site to use SSL to communicate with the webservice.

    But I cannot find how to do that.

    I am guessing that just adding the SSL certificate to the SSL Manager is not enough. (Help #1 required)

    But I am also trying to understand how to use the SSL programmatically from C# (asp.net) to let the aite access the webservice. (Help #2 required)
    All the article I found on the net refer to self create certificate, and localhost servers.
    Which does not relate to Winhost setup.
    I also searched the Winhost knowledge base but could not find anything useful.
    For now I am using something like this in my site C# code to connect to the webservice
    Code:
    Service webservice = new Service();
    webservice.Url = "http://myWinhostSite/WS/Service.asmx";
    string result = service.MyTestWebcall();
    On the webservice side I have
    Code:
    public class Service : System.Web.Services.WebService
    {
        public Service()
        {
        }
    
        [UseSSL]
        [SoapHeader("Authentication")]
        [WebMethod(EnableSession = true)]
        public string MyWebcall()
        {
    return "test";
    }
    }
    So any help would be really welcomed.

    Thanks.
     
    Last edited by a moderator: Oct 14, 2015
  2. ComputerMan

    ComputerMan Winhost Staff

    If you want to use the SSL Certificate for the site account where you installed the SSL Certificate. You will need to use https:// protocol

    However, if you want your ASP.NET user/anonymous user or your main FTP user for the site account to have access to the SSL Certificate. Than you will need to open a support ticket and ask them to grant access to your ASP.NET user/anonymous user or your main FTP user to your SSL Certificate.
     
    Last edited by a moderator: Oct 14, 2015
  3. the problem is that I am new to the SSL authentication process.

    Basically what I want is for my site to use SSL when connecting to my webservice so my users can login (and send their credentials securely)

    Right now I am totally at a lost about how to do that.
    I could not find any tutorial on the net related to that.
    The only thing I can find is about IIS on machine you have access to so you can put the certificate yourself.
    So basically what they do is use a certificate stored locally to authenticate with the server (on their localhost).
    With Winhost that's not the way it works.
    The certificate is stored on your server.
    So the authentication has to be done somehow on the server side.

    I think right now the most important thing I need is to know what is the connection string I am supposed to use for the SSL.
    I am trying (for my site) to use
    I am guessing I am missing the port, but trying with 443 fails each time.

    So either the port is wrong, os my IIS on Winhost is not configured properly (in which case I could really use a tutorial)
     
    Last edited by a moderator: Oct 14, 2015
  4. Hum, I am getting a hunch that my settings are actually correct.
    The current problem is that I am transferring my domain from another registrar.
    So right now I am using the Winhost alternate address for my site to connect to it.
    But I requested the certificate using my domain name instead of the alternate address.
    So maybe my problem is just that, a conflict because the address I use to connect is not the same as the address in the certificate?
    Could you confirm that?

    If so, I will have to wait for the completion of the move before I can do anything else.
    Because I do not want to get another certificate for the alternate address, and I do not want to remove the current certificate because then I would lose it.
     
    Last edited by a moderator: Oct 14, 2015
  5. Yes. If you try to access an alternate URL using a certificate with your domain name, SSL is going to say, "Something is wrong here - yoursite.w11.wh-2.com is not yoursite.com," and you won't be able to establish a secure connection. That is as it should be.
    You wouldn't lose it. You might want to contact support to ask the best way to go about removing/reinstalling it though. I'm not sure of the details there. It might be a bit of a pain.
    You couldn't get a cert for wh-2.com anyway. You can only get certs for domain names you own/control. Which is again, as it should be. ;)
     
    Last edited: Oct 14, 2015
  6. It's ok for now.
    I got a work around.
    I disabled the SSL in IIS7, so I can connect to it for now.
    When the domain transfer will be complete (hopefully by the end of the week), I will try again.

    Thanks for the answers
     

Share This Page