.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

ServiceModel.AddressAlreadyInUseException stopping wcf service from starting

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :.NET Framework

I have a windows service that hosts two WCF services - one using HTTP on port 8731 and the other using HTTPS on port 8732.

When I start the service, it stops after about 30 seconds with the following error

Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL https://+:8732/Design_Time_Addresses/WcfServiceHost/Session/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'https://+:8732/Design_Time_Addresses/WcfServiceHost/Session/' because it conflicts with an existing registration on the machine.

using "netstat -a" before and after trying to start the service indicates that there is nothing listening on port 8732.

If I change the port from 8732 to 8733 in app.config, the service starts successfully. Running netstat -a indicates that nothing is listening on port 8732.

If I change the port back to 8732, it stops working again. I would really like to understand why this happening, but am not sure where to go from here. Any help would be appreciated.


View Complete Post

More Related Resource Links

WCF Windows service hosting - not starting

Hi every experts i have WCF Service and a Windows service project for hosting that service when i install the win service with installutil and click start in services it show this message : "Windows could not start the Virtual WCF Service service on Local Computer. Error 5: Access is denied." i have this problem with this sample too : http://rapidshare.com/files/415123228/WCFSample.rar how can i fix this? THX

System.ServiceModel.Security.SecurityNegotiationException in WCF RIA Service

Good day, I created a WCF RIA service application in Visual Studio 2008. However, when I run the application it posts this exception. I set the includeExceptionDetailInFaults to true: <behaviors> <serviceBehaviors> <behavior name="serviceBehavior"> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> </behaviors> However, I still get the this error in my client app..... Any idea to diagnose the issue? or any suggestion on exception handling in WCF?? Thanks in advance!!

x86 service with CLR not starting on Windows 7 x64

Hello, I’m been working on a problem that is happening in the field for over a month and I’ve tried everything I can think of.  My x86 service sometimes doesn’t start on Windows 7/2008 x64.   I’ve build a simple service and tracked down the problem to what I think is JIT compiling.  Here’s my environment: Service is x86 written in MFC C++ using CLR libraries.  (new code is all c#) The OS is Windows 7 x64 The library I’m using is compiled to ‘Any CPU’ The test.  Here is me attempting to start the service 3 times.    C:\temp\#3>net start MyService   The service is not responding to the control function.   More help is available by typing NET HELPMSG 2186.   C:\temp\#3>net start MyService   The service is not responding to the control function.   More help is available by typing NET HELPMSG 2186.   C:\temp\#3>net start soxaudit   The MyService service is starting..   The MyService service was started successfully. As far as I can tell is IF the service actually loads, everything works correctly.  I believe this since I OutputDebugString and write to a log in the servicemain. If I compile the library to x86 instead of Any CPU, the service starts up the first time.  Sooo…my questions is this:  Is there a MSIL tr

On starting SSRS Service SQLDUMper starts system freezes


HI All,

          I have SSRS 2008 64-bit for MS CRM 4. Recenlty I am facing very strange problem. If I delete ReportServer Database and then I try to access http://servername/reportserver, I get 'Cannot open database "ReportServer" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Which is obvious but if I recreate the ReportServer Database using Reporting Services Configuration Manager then instantly SQLDumper starts and URL do not show anything in browser except keep waiting. The Following Things in Dumps- (filename is SQLDmpr....log):

rpcserver!DefaultDomain!1394!09/23/2010-08:57:38:: i INFO: RPC Server started.
servicecontroller!DefaultDomain!1394!09/23/2010-08:57:38:: i INFO: RPC Server started. Endpoint name ='ReportingServices$MSRS10.MSSQLSERVER'
appdomainmanager!WindowsService_0!1394!09/23/2010-08:57:38:: i INFO: Appdomain:2 WindowsService_0 initialized.
library!WindowsService_0!120c!09/23/2010-08:57:38:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., Interval in DBPolling is too large and will make polling verification logic fail.;

Automatic Stopping and Starting of SQL Server?



I know how to manually go into the Control Panel Administrative Tools Services applet to stop and re-start SQL Server services.  But, is it possible to somehow program this service to automatically stop and re-start, say, at midnight each night so that temporary tables and other items get cleaned out and so that apps that depend on SQL will perform better during the business day?


Problems with UserProfile Application Service not starting.



I'm using the Rational Guide from Harbar.net, and have the following problem:

UserProfileApplication.SynchronizeMIIS: Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object 'MyAD_Domain\spfarm.GetObjectCurrent'.     

I found references to simalr errors with Kerberos auth problems, but not one like this.

What did I do wrong, and how do I correct it?



UPS Sync Service Stuck on Starting


Alright, it's under my skin.  I have a two server farm (1 WFE/INDEX and 1 SQL).  I originally followed Spence Harbar's steps at http://www.harbar.net/articles/sp2010ups.aspx and had UPS running after several attempts at it and having the Sync service stuck at Starting.  I setup the AD connection, and imported users.  All seemed fine.  I also had some 5555 errors, and 22 errors in the Event Log, and when I was trying to diagnose those, it led me to going into the Sync Connection to look at it.  The CA said there was no connections (I later found an article that said this may occur if one of the FIM services wasn't started, but I didn't even look).

I decided to blow away the UPS Application and re-do it.  Now, I can't get past starting no matter what I try.  I went over and over the permissions and steps on Spence's page, and I keep getting to the same point:

09/30/2010 16:33:16.10 OWSTIMER.EXE (0x1620) 0x1770 SharePoint Portal Server User Profiles erx1 Medium Provisioning service instance User Profile Synchronization Service. c24b8054-2039-4917-8e2f-2881ca544323
09/30/2010 16:33:16.21 OWSTIMER.EXE (0x1620) 0x1770 SharePoint Portal Server User Profiles erx2 Medium The servi

SharePoint Search Service is not getting started. Its showing Starting status in Central Administart



I am using SharePoint 2007 and I am trying to start SharePoint Search Service on my server throgh central Administrator.But its not getting started and its showing starting status there.

I think this service got stucked. Please let me know If you have any solution for this.



Rajavi B


Starting User Profile Synchronization Service Fails


Hi All,

While performing a database attach upgrade from SharePoint Server 2007 to 2010 with this article http://technet.microsoft.com/nl-nl/library/cc263299(en-us).aspx as my guide, I'm stuck at the 'Start the User Profile Synchronisation Service' section. When I use Central Administration to start the service, after a few minutes being on the status 'Starting' it reverts back to 'Stopped'.

When reviewing the logs I find the following error message:

UserProfileApplication.SynchronizeMIIS: Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object '<DOMAIN>\<FARM ACCOUNT>.GetObjectCurrent'. 

The account used is already added to the local administrators group.

One solution I did find is in the following thread: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/58a404c0-af55-476c-84ad-8720de0a3292. The problem I have with this solution is that I should manually modify the user profile database, setting the correct default schem

Search Service not starting MOSS 2007 after SP2



I installed SP2 on my MOSS 2007 Farm last weekend and search is not starting now. When i try to start using


stsadm -o osearch -action start -role IndexQuery -farmcontactemail sharepoint@dynegy.com -farmperformancelevel Maximum -farmserviceaccount <userAccount> -farmservicepassword <Password> -defaultindexlocation D:\Sharepoint_Idx -ssp SharedServicesDynegy


I get the following error.


 'start' action failed. Additional information: Time out has expired and the operation has not been completed.


Starting the office search service takes me to the error page with the following message.


An unhandled exception occurred in the user interface.Exception Information: Time out has expired and the operation has not been completed. 

Troubleshoot issues with Windows SharePoint Services. 


Search was working properly before the Service Pack 2 install.


WCF service hosted in a Windows Service Automatically Starting


I stop the Windows service that hosts the WCF application, it stops, then it starts back up. Service recovery options are disabled.


It is somehow starting itself back up…   Any ideas as to why?

Kevin Burton

"Windows SharePoint Services Web Application" service is showing 'Error starting'.


I just installed MOSS SP2 and ran the config wizard on the server.
I am facing issue with our farm. Found that "Windows SharePoint Services Web Application" is in a problem.

I tried below commands:-
stsadm -o provisionservice -action stop -servicetype spwebservice -servicename ""
stsadm -o provisionservice -action start -servicetype spwebservice -servicename ""
But getting error:- Provision of service failed. Additional information: 1387.

Checked eventvwr and found below error log:-
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Topology
Event ID: 7034
Date:  10/21/2010
Time:  5:16:10 AM
User:  N/A
Computer: <Servername>
An attempt to start/stop instance  of service Windows SharePoint Services Web Application on server <servername> did not succeed. Re-run the action via UI or command line on the specified server.

None of the sites are working and I cannot see anything in the IIS folder nor in the IIS manager. All application folders are missing. But, I can see all the sites & Content databasesin the Central Admin.

Can someone please help?


User Profile Synchronization Service stuck on starting

I found Ali Mazaheri's blog post on configuring User Profile Service Application and am stuck on step 4 because the Forefront Identity Management Synchronisation and Forefront Identity Manager Service are not started. The later is set to disabled. When I try and set them both to automatic and start them I get these errors in the event log.
Haven't got a clue...this is a SharePoint 2010 Enterprise Server Beta 2 build with SQL 2008 SP1 + CU3 and AD Domain Controller on a single virtual machine.
I've also checked out the MSDN article but no mention of issues here.

Log Name:      Application

Source:        Microsoft Resource Management Service

Date:          18/11/2009 6:54:10 PM

Event ID:      0

Task Category: None

Level:         Error

Keywords:      Classic

User:          N/A

Computer:      SPS2010.sps.spdevwiki.com


Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.ResourceManagement.WebServices.ResourceManagementServiceHostFactory' threw an exception. ---> System.Reflection.TargetInvocationException: Exception ha

User Profile Service Synchronization Service Stuck in "Stopping" State


Have a customer who's UPS Synchronization service is stuck in a "Stopping State"

The UPS service Application has been deleted.  A Stop-SPServiceInstance command has been run and the Get_SPServiceInstance command shows the service is "unprovisioning"

Any ideas on what can be done next to get the service in a stopped state?

The SqlAgent$wincc service is not starting


Event Type: Error
Event Source: MSSQL$WINCC
Event Category: (2)
Event ID: 17055
Date:  28/10/2010
Time:  08:59:36
User:  N/A
Computer: QC
18052 :
Error: 2775, Severity: 16, State: 1.
0000: 00004684 00000010 00000009 00430051
0010: 0057005c 004e0049 00430043 00070000
0020: 006d0000 00730061 00650074 00000072

Never-stopping WCF service



I want to ask if anyone had faced with the problem of creation of the never-stopping WCF service?

I'm going to develop a Web-application that will be checking some web-resources and collect some data in the background. The customers will be able to log-in and see the  data, collected by WCF service.

The problem is the service stops every 10 minutes. I need to make it run "forever".

Why not standard Windows Service - the service has to be hosted at the shared hosting, where there is no access to administrative functions.

I've read some information in the Internet, for example  http://solatys.com/files/technotes/WCF%20Alive%20session.pdf , but, actually, having the console application that makes continuous calls to the WCF service is a bit strange.

 If someone had faced with such problem before I would be grateful for any ideas.

Thank you

Forefront Identity Manager errors when starting the User Profile Synchronization Service Application

I have seen several people who are having trouble getting the User Profile Synchronization Service to start.  None of those threads have the set of errors that I am seeing.  I have all the prerequisites installed and I am using the farm administrator account which has admin rights both on the SP server and the SQL box.  This is a split back-to-back extranet topology and there is a one way trust between the extranet domain and the internal domain.  The administrator account is an internal domain account.  I receive the following two Forefront errors every five seconds in the event log after starting the User Profile Synchronization Service Application:

.Net SqlClient Data Provider: System.Data.SqlClient.SqlException: HostId is not registered
   at Microsoft.ResourceManagement.Data.Exception.DataAccessExceptionManager.ThrowException(SqlException innerException)
   at Microsoft.ResourceManagement.Data.DataAccess.RetrieveWorkflowDataForHostActivator(Int16 hostId, Int16 pingIntervalSecs, Int32 activeHostedWorkflowDefinitionsSequenceNumber, Int16 workflowControlMessagesMaxPerMinute, Int16 requestRecoveryMaxPerMinute, Int16 requestCleanupMaxPerMinute, Boolean runRequestRecoveryScan, Boolean& doPolicyApplicationDispatch, ReadOnlyCollection`1& activ
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend