Print Page | Close Window

Push Notification

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3020
Printed Date: 13-May-2026 at 6:18pm


Topic: Push Notification
Posted By: Matt Foley
Subject: Push Notification
Date Posted: 18-Oct-2011 at 3:05pm
I am having trouble setting up the Notification.  For any user that is a local admin, the notification service works fine.  However, other users receive this error:

HTTP could not register URL http://+:9012/fb3f3460-6d05-41c5-9188-a695c0dfddcf/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).

I'm a little bit confused as the link refers to self-hosted wcf services and namespace reservations, but we are using a 2-tier setup with the model served up via iis.

Here is the app.config

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
  </configSections>
  <appSettings>
    <add key="Environment" value="Development"/>
  </appSettings>

  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">

    <logging logFile="DebugLog.xml"/>
   
    <!--Deploy-->
    <objectServer remoteBaseURL="http://msmdev.rsa-al.gov" serverPort="80" serviceName="web/EntityService.svc">
      <clientSettings isDistributed="true" />
    </objectServer>
   
    <!--Local-->
    <!--<objectServer remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService.svc" >
      <clientSettings isDistributed="true" />
    </objectServer>-->

   
   
    <!-- Additional configuration can be added to override defaults.
         See the sample config files in the Learning Resources for more information.
    -->
    <notificationService clientPort="9012"/>
  </ideablade.configuration>

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IAuthService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://sm.rsa-al.gov/web/AuthService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAuthService"
        contract="SM.IAuthService" name="BasicHttpBinding_IAuthService" />
    </client>
  </system.serviceModel>
</configuration>

and the server's web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core" />
  </configSections>
  <connectionStrings>
  </connectionStrings>
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
    <logging logFile="log\DebugLog.xml" />
    <!-- Additional configuration can be added to override defaults.
         See the sample config files in the Learning Resources for more information.
    -->
    <notificationService enabled="true" clientPort="9012" />
  </ideablade.configuration>
  <system.serviceModel>
    <!-- Set aspNetCompatibilityEnabled to true to allow use of ASP.NET security features.
         Set multipleSiteBindingsEnabled to true for Azure or if your web site has multiple http bindings.
    -->
    <bindings />
    <client />
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" />
    <!-- You can add Service definitions to override the default configuration.
         See the sample config files in the Learning Resources for more information.
    -->
  </system.serviceModel>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
  </system.web>
</configuration>





Replies:
Posted By: kimj
Date Posted: 18-Oct-2011 at 4:56pm
Hit Matt,
 
That exception and message are coming from WCF, and DevForce is just regurgitating it.  While confusing, it does actually have the answer.  When using Push a duplex WCF channel is used and a callback endpoint needs to be registered on the client.  So in effect, the client is a service too.  Because HTTP addresses are secured resources you need to enable access for the port in use (in this case 9012). 
 
You can use the Netsh command line tool to register the namespace with the account:
1) Open a command prompt using “Run as administrator” and enter:
2) netsh http add urlacl url= http://+:9012/ - -


Posted By: Matt Foley
Date Posted: 18-Oct-2011 at 5:26pm
Thanks for the reply; this is what I anticipated.


Posted By: Matt Foley
Date Posted: 19-Oct-2011 at 9:41am
Is there another way to accomplish this other than netsh?

We are trying to avoid having to run the command on all target machines for all users.


Posted By: kimj
Date Posted: 20-Oct-2011 at 1:52pm
There's the Http Server API for programmtic configuration, but it looks pretty hairy, and would also require admin rights to run.
 
If the target machines are part of Active Directory you could publish a small installation package which would modify the ACL for the reservation to grant access to a specific user or group.


Posted By: Matt Foley
Date Posted: 20-Oct-2011 at 7:32pm
Yes I spent a little time with the API and of course it does require the same permissions.

Thank you for your suggestion; I will try that.

On the whole the ideablade documentation is the best I've ever seen but I could


Posted By: Matt Foley
Date Posted: 20-Oct-2011 at 7:34pm
see how a small note in the sample config file or the documentation for this feature that gave a heads up on this would be very useful to us novice wcf guys


Posted By: kimj
Date Posted: 21-Oct-2011 at 9:46am
Our documentation is always a work in progress.  I've updated the main page to include a blurb on using netsh ( http://drc.ideablade.com/xwiki/bin/view/Documentation/push-notification#HWinClientapplications - http://drc.ideablade.com/xwiki/bin/view/Documentation/push-notification#HWinClientapplications ), but the Push documentation still needs work.  If you run across anything else, let us know.



Print Page | Close Window