473,811 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to solve 'A registration already exists for URI http://localhost:42444/Harp'

9 New Member
Hey all,

I have one of those strange issues where I swear I haven't run this code in two weeks and it was working perfectly when I ran it last but now I get an exception that I have not only never seen before, but can't figure out how to fix either.
I have built a WCF server application to handle passing data that is processed in native code to an ASP page (which is something that WCF is very good at), but when I try to open the ServiceHost object now, I get an exception that reads:

"The ChannelDispatch er at 'http://localhost:42444/Harp/' with contract(s) '"IHarpWCF"' is unable to open its IChannelListene r."

Then after two more InnerExceptions (identical but pertaining to contract(s) '"IssueAndRenew Session"' and '"SecurityNegot iationContract" ' there was one that read:

"A registration already exists for URI 'http://localhost:42444/Harp/'."

The code that is throwing looks like:

Expand|Select|Wrap|Line Numbers
  1. Private Sub StartBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartBtn.Click
  2.         'My.Settings.TargetDB = TargetDBEdit.Text
  3.         'My.Settings.TargetHTML = TargetHTMLEdit.Text
  4.         'My.Settings.OutputDir = OutputDirEdit.Text
  5.         service = New ServiceHost(GetType(Harp_WCF.HARP_WCF))
  6.         HarpWCF = Harp_WCF.HARP_WCF.Instance()
  7.  
  8.         service.Open()
  9.     End Sub
  10.  
So the question is: what does this exception mean? Why have I never seen it before? And what do I do to make it go away?

It implies that the URI is already registered... well yes, but this program. There isn't another instance already running anywhere...

Just for the sake of completeness, here is the serviceModel section of the app.config file...
Expand|Select|Wrap|Line Numbers
  1. <system.serviceModel>
  2.     <services>
  3.       <service name="Harp_WCF.HARP_WCF" behaviorConfiguration="Harp_WCF.Service1Behavior">
  4.         <host>
  5.           <baseAddresses>
  6.             <add baseAddress="http://localhost:42444/Harp/"   />
  7.           </baseAddresses>
  8.         </host>
  9.         <!-- Service Endpoints -->
  10.         <!-- Unless fully qualified, address is relative to base address supplied above -->
  11.         <endpoint address=""  binding="wsHttpBinding" contract="Harp_WCF.IHarpWCF" name="HTTPEndpoint">
  12.           <!-- 
  13.               Upon deployment, the following identity element should be removed or replaced to reflect the 
  14.               identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
  15.               automatically.
  16.           -->
  17.           <identity>
  18.             <dns value="localhost"/>
  19.           </identity>
  20.         </endpoint>
  21.         <!-- Metadata Endpoints -->
  22.         <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
  23.         <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
  24.         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  25.       </service>
  26.     </services>
  27.     <behaviors>
  28.       <serviceBehaviors>
  29.         <behavior name="Harp_WCF.Service1Behavior">
  30.           <!-- To avoid disclosing metadata information, 
  31.           set the value below to false and remove the metadata endpoint above before deployment -->
  32.           <serviceMetadata httpGetEnabled="True"/>
  33.           <!-- To receive exception details in faults for debugging purposes, 
  34.           set the value below to true.  Set to false before deployment 
  35.           to avoid disclosing exception information -->
  36.           <serviceDebug includeExceptionDetailInFaults="False" />
  37.         </behavior>
  38.       </serviceBehaviors>
  39.     </behaviors>
  40.   </system.serviceModel>
  41.  
Feb 22 '11 #1
0 2680

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2242
by: harp | last post by:
If one installs mdac2.8(sdk), must one also install mdac2.8 or does the sdk imply the type? I just want to write a programm with c++builder (in c++) where I just have to send (and receive results) sql-statements to different dbms (like oracle, mysql, db2, etc.). So I needed an odbc-driver (free), which of the two do I need to install, the type or sdk? I do work with windows2000 and xp. Thanks in anticipation!
11
4094
by: kimberly.shaffer | last post by:
I think I am so lost!! Please someone write out DCONCAT explanation. Is it DConcat("FieldYouWantToConcatenate","TableFieldIsLocatedIn","WHATIDGOESHERE", "@SignOrOtherDelimiter", NoIdeaWhatGoesHere) I think I would be okay if I could figure out what the "WHATIDGOESHERE"
13
2131
by: Thomas Zhu | last post by:
Hello, I know the difference between the two definations. But I do not know where are they in the memory. would someone tell me ? char s={"good", "morning"}; // at stack? char *t = {"good", "morning"}; // at heap? thanks in advance.
33
3361
by: Chris Capel | last post by:
What is the rationale behind the decision not to allow abstract static class members? It doesn't seem like it's a logically contradictory concept, or that the implementation would be difficult or near-impossible. It seems like it would be useful. In fact, there's a place in my code that I could make good use of it. So why not? Chris
6
3112
by: ATS | last post by:
INF: Has anyone made a CString, sprintf, and sscanf for .NET? Please help, I want to code with PURE .NET (i.e. pure CLR). No MFC, No ATL, no C-Run Time Library. But I want CString, sprintf, and sscanf. The "String" class in .NET is completely worthless to me, especially its so called "Format" method. In fact to just, harp on how "lacking" it is to me, in C++.NET, one can NOT do this:
4
2544
by: RM | last post by:
Had VS .Net 2002 installed on W2k Server SP3 and supported a number of web sites. Installed VS .Net 2003 on Friday and now all web sites using .Net & MS ACCESS get this strange error upon open. ASP=/TestDotNet/AdoNet.aspx System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open()...
0
293
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 396 open ( -5) / 3354 closed (+12) / 3750 total ( +7) Bugs : 864 open (-32) / 6087 closed (+52) / 6951 total (+20) RFE : 226 open ( +2) / 234 closed ( +1) / 460 total ( +3) New / Reopened Patches ______________________
10
1932
by: David C. Ullrich | last post by:
Running OS X 10.4 "Tiger". Various references by Apple and others say that there exists a module that gives Quartz bindings, allowing all sort of graphics things in Python. Sure enough, after installing Xcode I have some sample scripts. They all start with from CoreGraphics import *
6
1484
vavc1980
by: vavc1980 | last post by:
Hi! I have a problem with a query, I need to put together into one table the contents of 2 tables, but in the correspondent row for each match, and include the no-matches too. Table A: User | IncomingCalls| ---------|-----------------------| smith | ___10_______ | jones | ____5_______ | lee __| ____8 _______ | harp _| ____2 _______ |
2
1804
klarae99
by: klarae99 | last post by:
Hello, I am working in Access 2003 to create a database to record information about an annual fundraiser. I was hoping someone could review my table structure and make sure that it is normalized correctly and that it is set up to do what I would like it to do. I have some doubts on my current table structure and I would really appreciate any suggestions for improvement before I move on to creating my data entery forms. The purpose of...
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.