Creating a WCF ServiceHost object takes three to four minutes on some PCs -


I have created a WCF service that does not use app.config to configure itself. However, it takes three to four minutes to build a servicehost object on some PCs. I was thinking that there was something wrong with my service, I created a simple hello, world service and tried to do this with me I have only one problem.

According to the profiler, currently reading in the configuration for this service is spent reading.

So I have two questions really

  1. Is it possible to disable config for configuring XML?

  2. More importantly, does anyone know why this might be taking an extraordinary amount like this?

Here is the sample service: Contact IIMI service {[Operation Contract] string GetString (); } [Service Provider (InstanceContactMode = InstantContextMode. Single)] Public Class MySave: IMISWair {Public String Getstring () {Returns "Hello, World!"; }} Class Program {Static Wide Men (String [] AGRs) {URI APADRES = NEW URI ("http: // LOCAL HOST: 8731 / TEST"); Uri [] Yuris = New Uri [] (APADress); MyService srv = New MyService (); Service host host = new service host (srv, URI); // This line takes 3-4 minutes host. AddServiceEndpoint (typef (IMISwari), new WSHTP binding (), "test"); ServiceMetadataBehavior smb = new service dataDirma (); Smb.HttpGetEnabled = True; Host.Description.Behaviors.Add (SMB); Host.Open (); Return; }}

I need the reasons for the design to make the service and pass it as an object instead of passing it as an object.

If there is any other information that can be used, please tell me.

Many thanks.

Is the server connected to the Internet?

If not, try the following:

  1. Open Internet Explorer
  2. Tools -> Internet Options -> Advanced Tab
  3. Scroll down for security and disable checks for 'Check for publisher's certificate revocation' and 'Signature of downloaded signature programs'

In some cases this speed is very high It appears on your computer of unrelated processes, in which various MS functions Ramon (especially communication and startup speed of Visual Studio).


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -