none
The service '/EWS/Exchange.asmx' cannot be activated due to an exception during compilation RRS feed

  • Question

  • The service '/EWS/Exchange.asmx' cannot be activated due to an exception during compilation

    Tuesday, November 22, 2011 7:49 PM

Answers

  • That looks good, but still I'm pretty sure the problem you have has to do with the Webservicevirtualdirectory.

    If you only have problem with HUB2, it might be worth a try to copy the web.config from HUB1 to HUB2 and see if that helps. You find the file in C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews

    Run IISReset and recycle the application pool MSExchangeServicesAppPool in IIS.


    Martina Miskovic - http://www.nic2012.com/
    • Marked as answer by Sony M Issac Saturday, November 26, 2011 11:28 AM
    Tuesday, November 22, 2011 10:57 PM

All replies

  • Hi Sony,
    Please run the following command and post the output
    Get-WebServicesVirtualDirectory | fl Identity,*auth*


    Martina Miskovic - http://www.nic2012.com/
    Tuesday, November 22, 2011 8:24 PM
  • dentity                      : HUB2\EWS (Default Web Site)
    CertificateAuthentication     :
    InternalAuthenticationMethods : {Basic, Ntlm, WindowsIntegrated, WSSecurity}
    ExternalAuthenticationMethods : {Basic, Ntlm, WindowsIntegrated, WSSecurity}
    LiveIdSpNegoAuthentication    : False
    WSSecurityAuthentication      : True
    LiveIdBasicAuthentication     : False
    BasicAuthentication           : True
    DigestAuthentication          : False
    WindowsAuthentication         : True

    Identity                      : HUB3\EWS (Default Web Site)
    CertificateAuthentication     :
    InternalAuthenticationMethods : {Basic, Ntlm, WindowsIntegrated, WSSecurity}
    ExternalAuthenticationMethods : {Basic, Ntlm, WindowsIntegrated, WSSecurity}
    LiveIdSpNegoAuthentication    : False
    WSSecurityAuthentication      : True
    LiveIdBasicAuthentication     : False
    BasicAuthentication           : True
    DigestAuthentication          : False
    WindowsAuthentication         : True

    Tuesday, November 22, 2011 8:33 PM
  • This is the history

    We have 2 hub and client access servers

    Yesterday we have issue with ECP login and with your great help ECP is working fine

    Suddenly all our Blackberry internet clients lost the email connectivity. Also when I checked owa to delete or move any message then we are getting this error

    Unexpected error is getting and your request can't handle

    We are using F5 load balancer with thse 2 hub1 and hub2 servers.

    So I directly login to these servers with http://hub1/owa and http://hub2/owa

    Found that HUB1 has issues.. when I login to hub2/owa i can delete or move messages. No eventwiewer message also

    So who ever connted to hub1 through F5 has these problem and getting eventviewer messages

     

    Thanks

     

    Tuesday, November 22, 2011 8:39 PM
  • Deleted .
    Tuesday, November 22, 2011 8:42 PM
  • Hi,
    I remember the issue you had yesterday with /ecp and now you have another problem with the virtualdirectories. I wounder is somebody has made a changes with authentication in IIS instead of doing it in EMS.

    This time, I would suggest that you run:
    Get-WebServicesVirtualDirectory -id "HUB2\EWS (Default Web Site)" -WSSecurityAuthentication $False
    Get-WebServicesVirtualDirectory -id "HUB1\EWS (Default Web Site)" -WSSecurityAuthentication $False

    ..and run IISReset and afterwards change the authentication method back to $True --> IISReset


    Martina Miskovic - http://www.nic2012.com/
    Tuesday, November 22, 2011 8:47 PM
  • Getting this error

    [PS] C:\Windows\system32> Get-WebServicesVirtualDirectory -id "GIIINYHUB2\EWS (Default Web Site)" -WSSecurityAuthenticat
    ion $False
    A positional parameter cannot be found that accepts argument '-WSSecurityAuthentication'.
        + CategoryInfo          : InvalidArgument: (:) [Get-WebServicesVirtualDirectory], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Get-WebServicesVirtualDirectory

    Tuesday, November 22, 2011 9:11 PM
  • Getting this error

    [PS] C:\Windows\system32> Get-WebServicesVirtualDirectory -id "GIIINYHUB2\EWS (Default Web Site)" -WSSecurityAuthenticat
    ion $False
    A positional parameter cannot be found that accepts argument '-WSSecurityAuthentication'.
        + CategoryInfo          : InvalidArgument: (:) [Get-WebServicesVirtualDirectory], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Get-WebServicesVirtualDirectory


    Whoops, I wrote Get when it should have been Set :)

    Try again;
    Set-WebServicesVirtualDirectory -id "HUB2\EWS (Default Web Site)" -WSSecurityAuthentication $False
    Set-WebServicesVirtualDirectory -id "HUB1\EWS (Default Web Site)" -WSSecurityAuthentication $False


    Martina Miskovic - http://www.nic2012.com/
    Tuesday, November 22, 2011 9:13 PM
  • Ran those but no luck.. still issue with deleting messages form owa and getting this in evenviewer

    WebHost failed to process a request.

    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/64651675

    Exception: System.ServiceModel.ServiceActivationException: The service '/EWS/Exchange.asmx' cannot be activated due to an exception during compilation. The exception message is: A binding instance has already been associated to listen URI 'https://giiinyhub2.giii.local/EWS/Exchange.asmx'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config. . ---> System.InvalidOperationException: A binding instance has already been associated to listen URI 'https://giiinyhub2.giii.local/EWS/Exchange.asmx'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls,

    SONY

    Tuesday, November 22, 2011 9:21 PM
  • Hi,
    It looks likes you have some Bindings with hostheader configured in IIS. They has to be removed.
    Martina Miskovic - http://www.nic2012.com/
    Tuesday, November 22, 2011 9:23 PM
  •  

    This is the binding informations

    *:80(http),808:*(net.tcp)*(net.pipe),localhost(net.msmq),localhost(msmq.formatname),:443(https),127.0.0.1:80(http),127.0.0.1:443(https)

    Tuesday, November 22, 2011 9:37 PM
  • That looks good, but still I'm pretty sure the problem you have has to do with the Webservicevirtualdirectory.

    If you only have problem with HUB2, it might be worth a try to copy the web.config from HUB1 to HUB2 and see if that helps. You find the file in C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews

    Run IISReset and recycle the application pool MSExchangeServicesAppPool in IIS.


    Martina Miskovic - http://www.nic2012.com/
    • Marked as answer by Sony M Issac Saturday, November 26, 2011 11:28 AM
    Tuesday, November 22, 2011 10:57 PM
  • The service '/EWS/Exchange.asmx' cannot be activated due to an exception during compilation


    Look at this:

    http://blogs.msdn.com/b/dvespa/archive/2009/12/22/how-to-configure-a-http-endpoint-for-exchange-web-services-in-exchange-2010.aspx


    Best Regards Fiona Liao E: v-fiolia@microsoft.com
    Wednesday, November 23, 2011 2:04 AM
    Moderator
  • Any update?
    Best Regards Fiona Liao E: v-fiolia@microsoft.com
    Friday, November 25, 2011 5:29 AM
    Moderator
  • Thanks a lot. That worked.

    Looks like webconfig file corrupted on one of the client access server. Copy from the working one and did IISRESET and working fine.

    Sony

    Saturday, November 26, 2011 11:28 AM
  • That looks good, but still I'm pretty sure the problem you have has to do with the Webservicevirtualdirectory.

    If you only have problem with HUB2, it might be worth a try to copy the web.config from HUB1 to HUB2 and see if that helps. You find the file in C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews

    Run IISReset and recycle the application pool MSExchangeServicesAppPool in IIS.


    Martina Miskovic - http://www.nic2012.com/

    thank you sooooo much, it works after a lot of hours of searching the net.

    God Bless You 

    Tuesday, September 18, 2012 10:48 AM