Things I Learnt Today

November 25, 2009

Buttons work, but opening items doesn’t

Filed under: Enterprise Vault, Web App — Ding @ 9:26 am

An issue I wandered past the other day, that I thought I’d share amongst everyone.

The issue is that the EV Outlook Web Access extensions were installed on a freshly installed Exchange 2007 CAS server.  The installation succeeded, but when opening Outlook Web Access with a test user archived items don’t retrieve the full item, they only show the shortcut.  So all the buttons work correctly, the icons are all in place ..  Just like this screenshot :

OWA-icons

When you open an archived item you get :

OWA-archived-item

As with most Outlook Web Access issues your first port of call should be the OWA Diagnostic Logs.  From there I saw this interesting bit :

Firstly we try to open the item from the Deleted Items folder (as it might have been previously retrieved :

16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Request url: https://localhost/exchange/ex2k7testuser1@EV.Local/Deleted Items/139895ECDF7FDAF43B0380DA85D0058CD1110000evsite!200911110000000.200910201304090000.Z.A0072597C636735800C763D5081098E1.EML
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Request method: PROPFIND
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Request timeout (milliseconds): 30000
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Adding FBA cookies
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Adding Depth header: 0
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Request body: <?xml version=”1.0″?><d:propfind xmlns:d=”DAV:” ><d:prop><mapi:x0FFF0102 xmlns:mapi=”http://schemas.microsoft.com/mapi/proptag/” /><exch:outlookmessageclass xmlns:exch=”http://schemas.microsoft.com/exchange/” /></d:prop></d:propfind>
16/11/2009 06:07:12 [2332,19] [WebDAVRequest::Send] Exception sending WebDAV request: System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
at Symantec.EnterpriseVault.Owa.ExchangeStoreAccess.WebDAVRequest.Send()

The failure with a 404 is expected in this case.  404 = not found.

So the extensions then make a call to restoreo2k.asp, as we can see this fails :

16/11/2009 06:07:12 [2332,19] [EVServerRequest::CreateRequest] Sending request to: http://evserver/EVAnon/restoreo2k.asp?vaultid=139895ECDF7FDAF43B0380DA85D0058CD1110000evsite&savesetid=200911110000000~200910201304090000~Z~A0072597C636735800C763D5081098E1&mbx=ex2k7testuser1@EV.Local&server=SERVER1&restorelocation=3&foldername=Deleted Items
16/11/2009 06:07:12 [2332,19] [EVServerRequest::CreateRequest] Request timeout (milliseconds): 30000
16/11/2009 06:07:12 [2332,19] [EVServerRequest::AddHeader] Set header: EV-OWA-2007-Extensions-Version=7.5.6.2846
16/11/2009 06:07:12 [2332,19] [EVServerRequest::CreateRequest] Making request for user: EV\ex2k7testuser1
16/11/2009 06:07:12 [2332,19] [EVServerRequest::AddHeader] Set header: X-EVOWA-User-Encoded=450056005C006500780032006B003700740065007300740075007300650072003100
16/11/2009 06:07:12 [2332,19] [RestoreRequest::Send] Exception sending request to restore item: System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Symantec.EnterpriseVault.Owa.EVServerRequests.RestoreRequest.Send()
16/11/2009 06:07:12 [2332,19] [RequestProcessor::RestoreAndActOnItem] Item not restored
16/11/2009 06:07:12 [2332,19] [Id::OwaId] Returning cached OwaId: RgAAAADQcEs8JgaATaDqMjcgySFIBwBOwfHRfFz6RqWSzrPMQVMfAK2ZF7KOAABOwfHRfFz6RqWSzrPMQVMfAxjqITf8AAAJ
16/11/2009 06:07:12 [2332,19] [RequestProcessor::RestoreAndActOnMailboxItem] Redirecting client to: /owa/?ae=Item&a=Open&t=ipm.note.enterprisevault.shortcut&id=RgAAAADQcEs8JgaATaDqMjcgySFIBwBOwfHRfFz6RqWSzrPMQVMfAK2ZF7KOAABOwfHRfFz6RqWSzrPMQVMfAxjqITf8AAAJ&EVItemUnavailable=1
16/11/2009 06:07:12 [2332,19] [RequestProcessor:StopImpersonation] Stopped impersonation
16/11/2009 06:07:12 [2332,19] Request processing finished

The key here is the status code that is returned… 403.

What we then need to do is look at the IIS log files on the Enterprise Vault Server.  From there we can see :

2009-11-16 12:07:14 192.168.1.2 GET /EVAnon/restoreo2k.asp vaultid=139895ECDF7FDAF43B0380DA85D0058CD1110000evsite&savesetid=200911110000000~200910201304090000~Z~A0072597C636735800C763D5081098E1&mbx=ex2k7testuser1@EV.Local&server=SERVER1&restorelocation=3&foldername=Deleted%20Items 80 – 192.168.1.35 – 403 6 0

403.6 = IP address refused.

This should set your mind in the right direction.  When we are going to the EVAnon virtual directory, there are IP address restrictions, and the IP we are coming from (192.168.1.35) isn’t in that list.  The settings on the virtual directory are obtained from the ExchangeServers.txt file, which is used by the OWAUser.wsf script.

So the solution in this case is either to manually edit the restriction list in IIS, or edit ExchangeServers.txt on the Enterprise Vault server, and re-run OWAUser.wsf.  After that the archived item will display properly.

July 7, 2009

Reading web.config setting

Filed under: Web App, Windows — Ding @ 11:20 am

The other day I had cause to figure out how to read a value from a web.config file, and display it on the screen.

After searching for a bit, and using the help provided in this article (http://codersource.net/asp_net_web_configuration_file.html), I came up with the following :

In Windows Explorer, go to c:\inetpub\wwwroot
Create a folder there called TestFldr
Open IIS Manager, and right click on the Default Web Site, and create a new virtual directory as follows :

Alias : TestFldr
Browse to the path that you created before
Permissions: Read + Run Scripts

Create a simple web.config file in the EVTest folder :

<configuration>

 <appSettings>
 <add key="MyTestSetting" value="1234"/>
 </appSettings>

</configuration>

Create a file in that folder called test.aspx, and put in it :

<script runat="server">

sub Page_load
 dim aconfig as system.configuration.configurationsettings
 dim extver as string = aconfig.appsettings("MyTestSetting")

 div1.innerhtml = "<b>" & extver & "</b>"

end sub

</script>

<html>
<body>
<form runat="server">
MyTestSetting is: <div id="div1" runat="server"></div>

</form>
</body>
</html>

Now open Internet Explorer, and go to http://servername/TestFldr/Test.aspx

September 23, 2007

Web App Search

Filed under: Web App — Ding @ 7:31 pm

When you perform a search from the browser in Enterprise Vault, a common thing that gets asked is what are the limits to how many of these I can select for exporting, or restoring back to a mailbox.  Well according to Development about 15,000 to 20,000 has been tested, but you will get in to an interesting situation well before that.

Many people that they have to return all the results on one page, that’s not true, but of course if you have 8000 results, at 10 per page, it will take a LONG time to select them all for export!  So a common thing which people do is to perform the query/search using Advanced search, to get to this you enter a URL like this :-

http://evserver/enterprisevault/search.asp?advanced=3

At the bottom of that page is the option of how many results should be returned per page.  A common mistake now is to think that you want to be able to export say 5000 items, so you select the option 10,000. 

image

You then perform your search, and attempt to do a "Select All", and "Add to Basket".  This will fail.

The reason for the failure is around how this works…  Firstly we send all the highlighted items back to the server (for some reason), but in that transaction we send a HTTP header called CONTENT-LENGTH. 

image

In Windows 2003, a restriction on the default maximum for this metabase setting was introduced.  That limit 204,800 byte.  So if you send data, where the content-length header is bigger than that, you will get a failure back.

This is described in this article :

http://support.microsoft.com/kb/327659/en-us

A workaround is also described whereby you modify the metabase setting, and restart IIS.  A second workaround which is much better is to change your way of think about the result set.  If you know the results are going to be about say 1400 items, you don’t HAVE to add them all at once to the basket, you can add them (say) 500 at a time.  If you do it that way (set the Results: Items = 500), do your query, and move through each page doing a "Select All", and "Add to Basket", then a) you won’t get the error message, and b) it will add them all to the basket.

image

In other words, the error isn’t really that you’re adding too many items to the basket, it’s that you’re adding too many items in one go to the basket.

Once you know all of the above then you understand that the message you receive :

You have selected too many items. Select fewer items and try again.

Is just what it says..  too many items at once.

Blog at WordPress.com.