'WEB service' in a SubDomain

Discussion in 'General troubleshooting' started by edkaufmann, Jan 13, 2011.

  1. I would like to access a WEBservice which runs as a subdomain on Winhost (WEBservice being the name of the SubDomain).

    When calling in IE: 'http://WEBService.myDomain.org' I only get a list of the WEBservice directory.
    PS: 'http://WEBService.myDomain.org/WEBService.svc' 00> exactly the same

    is it possible to 'access' a WEB service in Winhost?
    How would I call it?

    thanks for your time and hints

    below code extract of course runs fine on my localhost!

    public class MainViewModel : INotifyPropertyChanged
    static readonly Uri serviceUri = new Uri("http://localhost:50346/WEBService.svc");
    //static readonly Uri serviceUri = new Uri("http://WEBService.myDomain.org/WEBService.svc");

    //static readonly Uri customersUri = new Uri("/customer", UriKind.Relative);
    //static readonly Uri customersUri = new Uri("/customer?$top=5", UriKind.Relative);
    static readonly Uri customersUri = new Uri("/customer(678)", UriKind.Relative);
    Last edited by a moderator: Oct 14, 2015
  2. Ray


    Did you setup the subdomain correctly on the account? You'll need to go into the control panel and under Site Manager/Subdomain Manager setup the subdomain "webservice"
  3. Ray, thanks for your time

    yes, I think I defined correctly the Subdomain and the App starting point

    below my re-direct:
    else if ((sname.ToLower().Contains("ksvc.asg.....oux.org"))) { Response.Redirect("/Subdomains/ksvc"); }

    This is what I get when running the service (sorrry for the format; it's just the directories of my subdomain):

    ksvc.asg.......oux.org - /Subdomains/ksvc/

    [To Parent Directory] 1/13/2011 7:43 AM <dir> bin 1/13/2011 7:44 AM 25081 KontaktsModel.Designer.cs 1/13/2011 7:44 AM 8087 KontaktsModel.edmx 1/13/2011 7:44 AM 5260 KontaktsService.csproj 1/13/2011 7:44 AM 1358 KontaktsService.csproj.user 1/13/2011 7:44 AM 222 KontaktsService.svc 1/13/2011 7:44 AM 852 KontaktsService.svc.cs 1/13/2011 7:43 AM <dir> obj 1/13/2011 7:44 AM <dir> Properties 1/13/2011 7:44 AM 8021 Web.config
  4. Ray


    I'm going to need a URL so I can look at it and test it myself.
  5. I vaguely remember that I added an IIS entry as indicated below BECAUSE my WEB service (classic appPool) is based on Framework 2.0.
    I learned then that I had also to add an appropriate 'handler mapping' for *.svc in IIS7 i.e:

    IIS-7; handler mappings: I added svc-ISAPI-2.0-64bit ===> after this it worked on my system!

    Could this entry be missing!?

    below the 'serviceuri' I use(d) in my VS2010 Windows Phone App for testing

    //static readonly Uri serviceUri = new Uri("http://localhost:49252/KontaktsService.svc");
    static readonly Uri serviceUri = new Uri("http://localhost/KontaktsService/KontaktsService.svc");
    //static readonly Uri serviceUri = new Uri("http://ksvc.asgbarbaroux.org");
  6. Ray


    Is that what your running your Winhost site account on? If you are running on Integrated Pipeline mode it shouldn't matter because all calls to your root will be processed by the ASP.Net engine. But if you want to modify your Handler Mapping you can do so by connecting to our server using IIS 7 Manager and going to the Handler Mapping Module.

    Last edited by a moderator: Oct 14, 2015
  7. Ray, thanks again .... I didn't even realise up to now that I can access Winhost's IIS ... that's ok now!

    Unfortunately, after adding the appropriate .svc mapping, I still got only a view of all my directories in subdomain ksvc!
    Well, I guess I've to familiarize myself 'some more' with this matter ...

    let's close this thread for now .. I might come back!
    Thanks again for your time

Share This Page