Ask a questionAsk a question
 

QuestionOWA Customisation

  • Tuesday, November 03, 2009 2:05 AMRyanLeap Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hey Guys,

    I have been digging for documentation on customising OWA.

    Ok so far I have created a folder within /owa/forms/test

    Within test I have test.aspx  and registry.xml

    Registry XML contains:
    <Registry xmlns="http://schemas.microsoft.com/exchange/2004/02/formsregistry.xsd" Name="PremiumExtensions" InheritsFrom="Premium" IsRichClient="true">
      <Experience Name="Premium">
    
        <Client Application="MSIE" MinimumVersion="6" Platform="Windows NT" />
        <Client Application="MSIE" MinimumVersion="6" Platform="Windows 2000" />
        <Client Application="MSIE" MinimumVersion="6" Platform="Windows 98; Win 9x 4.90" />
    
        <ApplicationElement Name="Item">
     <ElementClass Value="IPM.Test">
      <Mapping Action="New" Form="test.aspx"/>
      <Mapping Action="Open" Form="test.aspx"/>
      <Mapping Action="Reply" Form="test.aspx"/>
      <Mapping Action="ReplyAll" Form="test.aspx"/>
      <Mapping Action="Forward" Form="test.aspx"/>
     </ElementClass>
    </ApplicationElement>
    
    <ApplicationElement Name="PreFormAction">
          <ElementClass Value="IPM.Test">
      <Mapping Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/> 
         </ElementClass>
    </ApplicationElement>
    
      </Experience>
    </Registry>
    
    
    test.aspx contains:

    <html>
    	<head>
    	</head>
    	<body>
    		Test
    	</body>
    </html>
    
    Nothing appears to happen, eventually I want to hijack the view and edit email commands and use my own form that has a few customisation to the originals.

    As I said information on this is fairly difficult to find, and in my many years of developing for the web this is infact the first question that I have been forced to ask -- I am sure that it is something very simple that I am missing out on.

    Anyway any help will be much appreciated.

    Thanks

    - Ryan

    PS what does IPM mean?

All Replies

  • Tuesday, November 03, 2009 6:49 AMBin, Du Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I'm not sure that I understand your question fully. Here is a link

    http://msdn.microsoft.com/en-us/library/bb891801.aspx

    And more, make sure that you are accessing a message with itemclass IPM.Test, the itemclass of normal message is IPM.Note by default. There should be nothing happen if you are viewing a normal message.

  • Tuesday, November 03, 2009 7:08 AMHenning KrauseMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    creating custom forms is not exactly easy  - there are a lot of caveats... I've written an article about that topic on my website: http://www.infinitec.de/post/2009/06/12/Custom-Forms-with-Outlook-Web-Access-2007.aspx

    IPM is a prefix for most Outlook message types, like mails, tasks, appointments. If you also want to support Outlook with your customization and are using the standard forms editor for this, you need to derive your message class from an existing one - i.e. IPM.Note.Test if you are extending a mail message.

    Kind regards,
    Henning
  • Friday, November 06, 2009 3:13 AMRyanLeap Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Thanks Henning,

    I had looked at your article (which was very helpful) and used it when I was looking at doing this. I recreated my footsteps but this time I have followed your instructions to the letter -- however I am getting a "Could not load file or assembly" and "The system cannot find the file specified.". I have moved the .dll that is created from a build into the /Owa/forms/CustomForm directory and have the correct PublicKeyToken. Am I missing a step of the process?

    I am using Visual Web Developer Express, the IIS configuration manager is different on Server 2008 than in your example so it is possible that configuration is missing at that point.

    Anyway I have created the folder: ./Owa/forms/CustomForm and created my project there.
    I have signed the project and used the SN tool to get the PublicKey from the compiled Library.
    Because I expect OWA to look for the library within the /forms/CustomForm folder I have copied it from CustomForm/bin/ to CustomForm/.

    Within Web.Config I have added:
    <compilation>
       <assemblies>
          ...
          <clear />
          <add assembly="CustomForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=302c2fff07795fbe" />
           ...
         </assemblies>
    </compilation>
    
    
    and:
    <httpModules>
       ...
          <remove name="OwaModule" />
       ...
    </httpModules>
    
    and:
    <httpHandlers>
       ...
       <remove verb="POST,GET" path="ev.owa" />
       <remove verb="GET,HEAD" path="attachment.ashx" />
       ...
    </httpHandlers>
    
    But the problem definitely lies in that Assembly File, within IIS I converted the /owa/forms/CustomForm directory to an application and changed the Application Pool to MSExchangeOWAAppPool, I have also tried a few different permission configurations:

    Here is my full event log:
    Event code: 3008 
    Event message: A configuration error has occurred. 
    Event time: 6/11/2009 4:07:11 p.m. 
    Event time (UTC): 6/11/2009 3:07:11 a.m. 
    Event ID: d1934df6684847a885009a49decac2bd 
    Event sequence: 1 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT/owa-3-129019504292699368 
        Trust level: Full 
        Application Virtual Path: /owa 
        Application Path: C:\Program Files\Microsoft\Exchange Server\ClientAccess\owa\ 
        Machine name: (removed for security) 
     
    Process information: 
        Process ID: 3240 
        Process name: w3wp.exe 
        Account name: NT AUTHORITY\SYSTEM 
     
    Exception information: 
        Exception type: HttpException 
        Exception message: Could not load file or assembly 'CustomForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=302c2fff07795fbe' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\ClientAccess\owa\web.config line 49) 
     
    Request information: 
        Request URL: https://(removed for security):443/owa/auth/logon.aspx?url=https://(removed for security)/owa/&reason=3 
        Request path: /owa/auth/logon.aspx 
        User host address: (removed for security) 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: NT AUTHORITY\SYSTEM 
     
    Thread information: 
        Thread ID: 3 
        Thread account name: NT AUTHORITY\SYSTEM 
        Is impersonating: False 
        Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
     
     
    Custom event details: 
    
    Any hints would be greatly appreciated.

    Thanks

    - Ryan