Link to home
Start Free TrialLog in
Avatar of JuusoConnecta
JuusoConnectaFlag for Sweden

asked on

Exchange 2010 EWS Virtual Directory

Problem regarding EWS Vdir in IIS of Exchange 2010.

Working as an IT-Consultant and at the current customer we are setting up exchange 2010 in a new domain.
Everything has been set up correctly and Exchange 2010 was up and running in our test environment until recently.
Due to a small test of EWS virtual directory in IIS we screwed this up pretty badly... As an action we would need to recreate the EWS Vdir, but heres the problem:

Using the EMS and trying to Remove the EWS Vdir, the EMS tells us:

[PS] C:\Windows\system32>Remove-WebServicesVirtualDirectory -Identity "ExchangeServerName\ews (Default Web Site)"
The operation couldn't be performed because object 'ExchangeServerNamee\ews (Default Web Site)' couldn't be found on 'DomainController.domainname.com'.
    + CategoryInfo          : NotSpecified: (0:Int32) [Remove-WebServicesVirtualDirectory], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : E6F4FE0F,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveWebServicesVirtualDirectory




But when we try to create Vdir in EWS we get the following message:

[PS] C:\Windows\system32>New-WebServicesVirtualDirectory -path "C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\EWS" -InternalUrl "https://webmail.domainname.com/ews/exchange.asmx" -ExternalUrl "https://webmail.domainname.com/ews/exchange.asmx" -WindowsAuthentication $true -WSSecurityAuthentication $true
The virtual directory 'EWS' already exists under 'ExchangeServerFQDN/Default Web Site'.
Parameter name: VirtualDirectoryName
    + CategoryInfo          : InvalidArgument: (ExchangeServerName\EWS (Default Web Site):ADObjectId) [New-WebServicesVirtualDirectory], ArgumentException
    + FullyQualifiedErrorId : 7824EE63,Microsoft.Exchange.Management.SystemConfigurationTasks.NewWebServicesVirtualDirectory

Basically the domaincontrollers are able to find the EWS Vdir if we try to create it, but if we try to remove it they cannot find it...

I remember this happened last yesterday when i tried to recreate the EWS Vdir. Yesterday i remove the EWS Vdir and created it again (New-WebServicesVirtualDirectory), and it gave me an error saying that it already exists.

When trying to obtain information of the EWS Vdir in EMS it shows the following:
[PS] C:\Windows\system32>Get-WebServicesVirtualDirectory
[PS] C:\Windows\system32>


Additional Information: EWS is up and running on the IIS 7 and "seems" to be working (no error messages in the application or Event Viewer when administrating ews in IIS), all the other objects (ecp, autodiscover etc, etc.) under IIS are working fine, as they should.

The DNS, DC:s, Web Configs, replication, everything is working FINE, only thing I need help with is how I can recreate EWS Vdir...


-I have tried reinstalling the Cas Role on our Exchange 2010 = Same Result
-Have tried using appcmd (in inetsrv folder) using cmd to recreate the ews vdir = Same Result
-Have tried using ADSIEDIT (with no success, if someone knows specificly what to delete/edit here regarding ews vdir please do tell :) )
-Have tried importing modules to the server 2k8 powershell for commands Import-Module servermanager, $module = Get-Module servermanager, $module.ExportCmdlets (the exchange 2010 is on a windows 2008 server with sp2)

Reinstalling the IIS or reinstalling the whole exchange 2010 is NOT an option...

Further Information: We are using Outlook 2007 and the client (and OWA) are working fine, though when using connection status of an Outlook 2007 client it cannot lcoate any directorys...

A solution or any small piece of information leading towards the solution is extremly much appreciated...

Best Regards,

/Juuso
Avatar of tcpport25
tcpport25
Flag of United States of America image

This KB refers to Exchange 2007, but it looks like it may apply to your situation.
http://support.microsoft.com/kb/978775

If the above fix does not work, you could look at uninstalling just IIS and CAS. This has worked for me in the past on 2007. I  know its not a path you want to pursue, but the article may provide some insight if you get stuck...

http://support.microsoft.com/kb/320202
Avatar of JuusoConnecta

ASKER

Thanks for the response Tcpport, I tried the kb article: http://support.microsoft.com/kb/978775 without no success, same issue persists...

As this is extremly critical for us, since it disables outlook clients connectivity to retrieve directory information through the CAS (when outlook clients connects to cas and cas connects to the DC:s to retrieve certain information that has been written to active directory).

Recreation of IIS would not work, since the EWS Vdir has been written to the active directory as an data object. When removing the CAS role from an exchange server it removes/recreates all of the Vdirs (oabvdir, ewsvdir etc, etc.). Reinstalling IIS would not delete the data object (i assume) but if none of our workarounds will work i take it that we will atleast have to try with that option... Any other suggestions regarding this would be much appreciated.

Regards,

/Juuso
More information:

Tried reconfiguring the ex-web-vritual-services file from adsiedit (scheme) from the scheme master but without success... My next question would be if anyone knows how/where IIS objects are written to active directory or ADSIEDIT ?
ASKER CERTIFIED SOLUTION
Avatar of JuusoConnecta
JuusoConnecta
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad you were able to resolve the problem.
Thanks for posting the resolution.