0
Not a bug

System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'

Gurdip Sira 7 months ago • updated by Adam van Vliet (Product Manager) 7 months ago 13

Hi,

I am installing MIM Event Broker on Server 2012 R2 with IIS 8.5


I have most of the configuration done, but when going to the site, I get this error:


System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM,Negotiate'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---


In terms of windows authentication, I have configured the authentication correctly on IIS and the site itself.



Please advise.

Answer

Answer
Not a bug

Hey Gurdip,

Event Broker has an inbuilt web server which is enabled by default. You won't need this if you've configured it to use IIS.

Check out the documentation on https://voice.unifysolutions.net/knowledge-bases/8/articles/2721-configuring-mim-event-broker-for-use-with-embedded-web-server , following the steps to change the enabled="true" to enabled="false" in the Unify.Framework.Web.WebEnginePlugInKey.extensibility.config.xml file. The service should then start.

Under review

Hi Gurdip,

What operation are you trying to perform and what page are you attempting to open? Could you please also attach the rest of the stack trace?

Thanks.

Hi Adam,

I am trying to deploy MIM EB, on IIS.


Now I get this:


Service Unavailable

The service is currently configured to http://glomimeb:8080/EventBroker/EventBrokerManagementStudio.svc , but no service could be located. Please ensure the service is running and click here to return to the home page.


When I click the link I get a 404.


I have specified the endPoint address to be on the same server.


What am I missing?

Is the service running? See Starting the Service on https://voice.unifysolutions.net/knowledge-bases/8/articles/2726-installing-the-mim-event-broker-service If it's not starting, please check the Windows Event viewer.

Could you please also attach the rest of the MessageSecurityException?

Ah that was it, forgot all about the service!

But now I get a new error as the service wont start. The default site is running on Port 80 but is stopped:


Error - The following occurred in module: General server error: Port 8080 is in use.

The following general server error occured:
Unify.Framework.UnifyServiceStartException: Port 8080 is in use. ---> System.Exception: Port 8080 is in use.
   at CassiniDev.CassiniDevServer.StartServer(String applicationPath, IPAddress ipAddress, Int32 port, String virtualPath, String hostname)
   at CassiniDev.CassiniDevServer.StartServer(String applicationPath, Int32 port, String virtualPath, String hostName)
   at Unify.Framework.Web.WebEngine.StartServer()
   at Unify.Framework.UnifyEngine`1.Start()
   --- End of inner exception stack trace ---
   at Unify.Framework.UnifyEngine`1.Start()
   at Unify.Product.EventBroker.EventBrokerService.OnStart(String[] args)


Answer
Not a bug

Hey Gurdip,

Event Broker has an inbuilt web server which is enabled by default. You won't need this if you've configured it to use IIS.

Check out the documentation on https://voice.unifysolutions.net/knowledge-bases/8/articles/2721-configuring-mim-event-broker-for-use-with-embedded-web-server , following the steps to change the enabled="true" to enabled="false" in the Unify.Framework.Web.WebEnginePlugInKey.extensibility.config.xml file. The service should then start.

Hi,

Just done this now but get this error:


Service Unavailable

The service is currently configured to http://glomimeb:8080/EventBroker/EventBrokerManagementStudio.svc , but no service could be located. Please ensure the service is running and click here to return to the home page.

Hi Gurdip,

Did you change the endpointAddress setting (in the web.config file)? This should only be updated for either of these conditions:

  • You have the MIM Event Broker website running on a different machine than the MIM Event Broker service; OR
  • You have updated the service config (exe.config) to host the service endpoint on a different address.

Note that this isn't referring to the web address. By default the endpointAddress setting is: http://localhost:59990/EventBroker/EventBrokerManagementStudio.svc

Thanks.

Hi,

Web.cofig has service at same address and I have that in IIS but still get the error?

That's the problem then. The service hosts an endpoint separately. Change it back to the 59990 one (the default) and it should work.

Thanks.

Hi adam yes i am using localhost:59990 in web.config and iis but no luck?

59990 in IIS? It should only be 59990 in web.config and the service .exe.config. This 59990 setting refers to the communication between the web and the service. The communication between the browser is on 8080 and is only defined in IIS. You might have better luck uninstalling, deleting the files that hang around, as the defaults are close to what you're trying to do, just make sure to disable the inbuilt web server (https://voice.unifysolutions.net/knowledge-bases/8/articles/2721-configuring-mim-event-broker-for-use-with-embedded-web-server).

Hi Adam,

Just uninstalled and installed the web component, followed the steps, but same issue?

Did you delete the files that hang around? There should be no reference to the old port, so I don't know how it could have the same error.

As mentioned via email, I'm happy to screenshare to work through this, would that be of interest?