Link to home
Create AccountLog in
Avatar of jonassheiakh
jonassheiakh

asked on

Cant access OMA directory from IE or Mobile Phones

Hello,
Im having problems getting the OMA function to work here. Im running Windows 2003 Server, not sbs.
And Exchange 2003 Standard Edition, both W2k3 and Exchange2003 have all SP´s installed and all updates from Microsoft Update except IE7.

This is my problem. I get this when browsing the https://myserver/OMA , i get prompted for username and password and then the error occurs. I have NET v1.0 running with the OMA virtual directory as i read somewhere that OMA does not support NET v2.0 , though it dosnt work with 2.0 either. I am really stuck at the moment and would be need some help.

Server Error in '/OMA' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'processRequestInApplicationTrust'.
Source Error:
Line 70:       </namespaces>
Line 71:     </pages>
Line 72:     <trust level="WSS_Minimal" originUrl="" processRequestInApplicationTrust="false" />
Line 73:     <machineKey validationKey="974086FF053596E62A55BD949BA4538936B11F639D4AE353" decryptionKey="4EF1EB62B6E24927ECC5ACFC27BF5BEAF5EA2FA7F1B17EA7" validation="SHA1" />
Line 74:   </system.web>
 Source File: C:\Inetpub\wwwroot\web.config    Line: 72
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407

Kind regards, Jonas
Avatar of LeeDerbyshire
LeeDerbyshire
Flag of United Kingdom of Great Britain and Northern Ireland image

It looks like another application (that uses .Net 2) has added the processRequestInApplicationTrust to your server's root web.config file.  It appears that this upsets .Net 1 .  Have you tried looking at the properties of the OMA VDir in IIS Manager, and making sure that .Net v2 is selected on its ASP.Net tab?  If so, what error do you get when you try that?

What else (i.e. other web applications) is installed on the server?
Avatar of jonassheiakh
jonassheiakh

ASKER

I am running the OMA virtual directory with .NET v1 as i have read somewhere that OMA only supports v1, this might not be true though. The server is hosting our AD features, Exchange2003 with an OWA site running good, Sharepoint for our intranet site, other than that nothing. This is what i get if i change to .NET v2

Server Error in '/OMA' Application.
--------------------------------------------------------------------------------
Collection was modified; enumeration operation may not execute.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
  <%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.  

Stack Trace:
[InvalidOperationException: Collection was modified; enumeration operation may not execute.]
   System.Collections.ArrayListEnumeratorSimple.MoveNext() +2833870
   Microsoft.Exchange.OMA.Tracing.OmaTrace.set_DebugOutputTracing(Boolean value) +167
   Microsoft.Exchange.OMA.UserInterface.Global..ctor() +262
   ASP.global_asax..ctor() +5
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +200
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Kind regards, Jonas
Hm.  I would have hoped that .Net v2 would completely support applications created for .Net v1.  But hoping something doesn't make it true, of course.  If it does not support v2, then it is likely that v1 doesn't understand the processRequestInApplicationTrust attribute mentioned in your original error.  I suspect that all you need to do is to remove it in Notepad.  But that might break something else that has been installed on the server.  Are there any .Net 2 web apps on there?
Actually i just updated to .NET v2 yesterday on the server, so Sharepoint shouldnt use it at all. I could remove v1 completley from the system, but i had theese errors before i updated to v2 yesterday also.

But lets start with removing v2 and go from there. I will reply asap ;)

Thanks
I don't think you need to remove v2.  Just select v2 for the OMA VDir, and remove the processRequestInApplicationTrust  attribute from the web.config file.
Sorry - mistake in last post - I meant select v1 for the OMA VDir.
I now have OWA running with v1 and i have commented out the line in web.config
So instead of the previous error i get the one below, and if i comment that block out i cant even display the page

Server Error in '/OMA' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'enableEventValidation'.
Source Error:
Line 66:     <compilation batch="false" debug="false" />
Line 67:
Line 68:     <pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" enableEventValidation="false">
Line 69:       <namespaces>
Line 70:         <remove namespace="System.Web.UI.WebControls.WebParts" />
Source File: C:\Inetpub\wwwroot\web.config    Line: 68
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
Try removing the  enableEventValidation="false" attribute completely.  If it looks like there are going to be a lot of these, it would be a good idea to make a backup copy of the file, in case the removal of these attributes breaks something else.  Come to think of it, if something else on the server /does/ need these attributes, then you can probably add them into a lower level web.config file.

How did you convert your block to a comment?  With
  <!--
and
  -->
?
If so, you will need to be careful that all remaining tags continue to match.
The lower code is an exact printout of the web.config after i commented the pages block.
And i take it i need to comment the whole block cause of the enablesessions resieds in the "start" tag

So if i comment like i have below i get the folliwing error.

"  A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator."

<!--
<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" enableEventValidation="false">
       <namespaces>
        <remove namespace="System.Web.UI.WebControls.WebParts" />
      </namespaces>
    </pages>
    <trust level="WSS_Minimal" originUrl="" processRequestInApplicationTrust="false" />
-->

Regards, Jonas
If you want to comment the entire <pages/> section, then your --> needs to come directly after the closing </pages> tag.  In your example above, it comes after the <trust/> section.  However, removing the entire <pages/> section may be a bit drastic.  If it complains, you will need to resort to just removing individual attributes within the opening <pages> tag.
I have now edite the line from
<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" enableEventValidation="false">

to

<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false">

And i get the following error

Parser Error Message: Child nodes are not allowed.
Source Error:
Line 67:
Line 68:     <pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false">
Line 69:       <namespaces>
Line 70:         <remove namespace="System.Web.UI.WebControls.WebParts" />
Line 71:       </namespaces>

With <namespaces> in red.


I think that means you will need to remove (or comment) the three lines:

<namespaces>
<remove namespace="System.Web.UI.WebControls.WebParts" />
</namespaces>

You did make a copy of this I hope :-)  Sharepoint may start to get upset if you make too many changes.
hehe yeah, i have a backup ;)
Though i actually tried to comment that whole block and i got the same error as before.

"  A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator."

This leads me to believe that the underlying problem is not located to the web.config rather to something else, though i cant say what.
Well, I think the web.config has been changed by something that made it incompatible with .Net v1, but I guess that whatever is going wrong is also what prevented it from working when it was configured to use .Net v2.  Do you now get the same error (the one about the 'Collection was modified') that you had when v2 was enabled?
I have now restored the backupped web.config and im now running OMA with v.1 and im back to the
"Parser Error Message: Unrecognized attribute 'processRequestInApplicationTrust'." error.

I will soon go home for the day as its evening hear in Sweden already, i will start working on this tomorrow again and i would appreciate any help i can get. If you have any thoughts just post them here and i will reply to it when i get back tomorrow and try any solution.

Kind regards, Jonas
BTW, using the aspnet_regiis.exe utility helps with many OMA problems:
http://support.microsoft.com/kb/818486
Yeah i did try that option after installing the .NET v2 , but no luck
Did you ever do this:
http://support.microsoft.com/kb/894903
by any chance?
The situation is that i was not the administrator that installed this system. I i was just hired for this job, so i cant say for sure that the previous admin did the above procedure. Though there seems to be a way to backtrack the changes that procedure did, and if i understand this correctly it only modifies the web.config ? so it should be safe to try ?
It looks like that is what you need to do to get Sharepoint working with .Net 2; unfortunately, it looks like it breaks those applications that need .Net 1.  It looks like it only affects web.config , so I think the described undo procedure will be safe.  If you SharePoint is configured to use .Net 1 , then it might even help to remove .Net 2 altogether.  Then try the aspnet_iisreg thing again.
I have now changed the .NET version for default website and Sharepoint central administration to v.1
The intranet didnt work after that change so i followed the procedure on MS technet to rebuild web.config and now it seems to be up and running fine.

Now when im trying to access https://myserver/oma i just get this error

"  A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator. "

/jonas
Is there nothing after that?  There is usually at least a message saying you need to add an entry to web.config to get it to display more information.

Or is there anything in the Event Log?

Also, check the IIS log, to see if something is going wrong when it tries to make the internal request to the Exchange VDir.
Hello, this is what i found in the event viewer

An unknown error occurred while processing the current request:
Message: The remote server returned an error: (400) Bad Request.
Source: Microsoft.Exchange.OMA.ExchangeDataProvider
Stack trace:
   at Microsoft.Exchange.OMA.ExchangeDataProvider.OmaWebRequest.GetRequestStream()
   at Microsoft.Exchange.OMA.ExchangeDataProvider.ExchangeServices.GetSpecialFolders()
   at Microsoft.Exchange.OMA.ExchangeDataProvider.ExchangeServices..ctor(UserInfo user)

Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack trace:
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Microsoft.Exchange.OMA.UserInterface.Global.Session_Start(Object sender, EventArgs e)

Message: Exception of type Microsoft.Exchange.OMA.DataProviderInterface.ProviderException was thrown.
EventMessage:
UserMessage: A System error has occurred while processing your request. Please try again. If the problem persists, contact your administrator.
Source: Microsoft.Exchange.OMA.UserInterface
Stack trace:
   at Microsoft.Exchange.OMA.UserInterface.Global.Session_Start(Object sender, EventArgs e)
   at System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)
   at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
   at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
   at System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Is your Default Web Site configured with a Host Header name?
Yes there is a host added "intranet" for the default website on port 80,
though on port 433 theres no header, and im trying to get OMA running with SSL atm.
SSL doesn't work with Host Headers anyway (the incoming requests needs to be decrypted using a site certificate before the host header name is even seen by the server).  Host headers are known to cause this 400 - Bad Request error OMA.  Is there any chance you can remove it?  Even if it's only for a temporary test?
I now removed the host header and i can now browse /OMA ;)) .. im gonna try to get it running with the mobile phone and se what happens. il report back asap
Seems that my OMA site is working find from IE, im still having problems actually getting it to work from my SE P1i though, but i think ive traced this issue to the symbian OS and that it cant handle my certificate that i have installed on the IIS. When i compare my certificate from a regular sbs machine where OMA works and with this setup i have an optional field called "Enhanced key usage" in the certificate from this setup that i can imagine breaks it. Though i havent figured out why yet.

Anyways i guess this thread should be closed so you get awarded points for helping me with the /OMA problem atleast.

I appreciate the help alot, and im now many steps closer to a solution.

Kind regards, Jonas

ASKER CERTIFIED SOLUTION
Avatar of LeeDerbyshire
LeeDerbyshire
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Mm might be so, but i can without problem connect my P1i to my sbs server that runs a selfsigned certificate, it seems that the standard win2k3 server generates the certificate with a few more fields.

I will research this further and open up another ticket here if i cant come to a solution

Thank you very much
i get " This question already has been closed and points assigned. Post additional comments only if you want to clarify or comment on the solution. " dunno why.. first time using experts exchange
SBS seems to autogenerate an SSL cert for Exchange, because FBA is enabled by default, and FBA needs SSL.  Of course, SBS does a lot of clever things that a standard server doesn't.  The fact that the device accepts it is a good sign - maybe you were able to import it?  Unfortunately, SSL isn't something I know that much about.