New Posts New Posts RSS Feed: SSL & https - Deployment not finding EntityService.svc/sl
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

SSL & https - Deployment not finding EntityService.svc/sl

 Post Reply Post Reply
Author
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Topic: SSL & https - Deployment not finding EntityService.svc/sl
    Posted: 19-Jun-2013 at 8:07pm
My application runs fine when accessed via http:// and https://. Once I set the application in IIS to "Requires SSL" I get errors.

In the app it displays
"There is no endpoint on https://www.xxx.com/dev_test/EntityService.svc/sl ....."


In the Event logs on the server it is :-
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/20411271
Exception: System.ServiceModel.ServiceActivationException: The service '/Dev_Test/EntityService.svc' cannot be activated due to an exception during compilation. The exception message is: The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.. ---> System.InvalidOperationException: The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.
   at .....



My app (modelled from the template) Global.asax has :
      System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());


What do I need to do get this behaving correctly, please?

Edited by Delta_Rich - 19-Jun-2013 at 8:08pm
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 19-Jun-2013 at 8:37pm
Back to Top
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Posted: 19-Jun-2013 at 8:55pm
Thanks for the links, however, yes I have been over each of these (and many others).
The web.config has very little in it. My understanding is that the code within the Global.asax is dynamically creating the required services.

Here's what I have in my config for reference:
<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
    <logging logFile="log\DebugLog.xml" />
    <objectServer>
      <serverSettings useAspNetSecurityServices="true" />
      <serverSettings allowAnonymousLogin="false" />
    </objectServer>
</ideablade.configuration>
...
<system.web>
    <authentication mode="Forms">
      <forms name=".DeltaCompanion_ASPXAUTH" />
    </authentication>
    <roleManager enabled="true" />
    <machineKey ..... />
    <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" .... />
      </providers>
    </membership>
</system.web>

Back to Top
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Posted: 19-Jun-2013 at 9:15pm
On checking the DebugLog file it would appear that it is atleast trying to create the Service - no indication that it failed. See the following extract from the Log:
<entry id="15" timestamp="2013-06-20T16:07:31" username="" source="IdeaBlade.Core.Composition.CompositionHost:GetImportDefSingle">CompositionContext: '-IbDefault-' - Probed for any 'ServiceHostEvents' and found 'IdeaBlade.EntityModel.Server.ServiceHostEvents'.</entry>
<entry id="16" timestamp="2013-06-20T16:07:31" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHostFactory:CreateServiceHost">EntityService listening on https://www.xxx.com/Dev_Test/EntityService.svc/sl</entry>
<entry id="17" timestamp="2013-06-20T16:07:31" username="" source="IdeaBlade.EntityModel.Server.EntityServiceHost:AddBehaviors">Using DC serializer for EntityService</entry>


Perhaps this is actually an IIS permission issue?
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jun-2013 at 2:00pm
Delta_Rich,

If you haven't updated web.config, then you shouldn't have to do anything other than the IIS configuration.

One thing to be aware of is that when you add the HTTPS binding, you must be sure to use a port that's not being used by another application. (i.e. Skype might use port 443 and if you choose this same port, the website won't start)

Also, be sure to set your firewall to allow traffic in the selected port. Actually, turn the firewall off for the sake of testing first. Later, if everything goes well, turn it back on and open the specified port.
Back to Top
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jun-2013 at 2:10pm
All ports and firewall settings are ok. This site has other areas that use SSL and are working fine (they aren't using Ideablade), it's just this app that won't do its magic.

It does work on my development machine, where I have setup a local IIS and published the app for using SSL like the walk-throughs and examples show but when delivered to production it won't.


Edited by Delta_Rich - 20-Jun-2013 at 2:10pm
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jun-2013 at 3:07pm
That's odd...

When you try to reach the service at There is no endpoint on https://www.xxx.com/dev_test/EntityService.svc what error message do you get?

Did you try unsecured (i.e. http instead)? Is it also failing?
Back to Top
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jun-2013 at 3:22pm
When I browse to the ...dev_test/EntityService.svc when SSL requirements are off i.e. http - then I get the service screen as desired. If I switch back to the SSL I get-

Exception Details: System.InvalidOperationException: The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 22-Jun-2013 at 2:13pm
DevForce doesn't by default add the ServiceMetadataBehavior so I'm not quite sure why you're seeing this. If you've implemented a custom ServiceHostEvents and have added a MEX endpoint or behavior you should check that. Otherwise, you can add the following to the system.serviceModel section in your web.config:

<behaviors>
<serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
    </behavior>
</serviceBehaviors>
</behaviors>

Disabling httpGetEnabled should fix the problem, and you can enable or disable httpsGetEnabled based on your needs.
Back to Top
Delta_Rich View Drop Down
Newbie
Newbie
Avatar

Joined: 19-Oct-2011
Location: NZ
Posts: 10
Post Options Post Options   Quote Delta_Rich Quote  Post ReplyReply Direct Link To This Post Posted: 23-Jun-2013 at 1:53pm
Excellent - that got it.
This application is published within an existing website, with inheritance. So, the site has other webservices published so without this setting here it was using the inherited setting.

Thank you so much for your help.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down