Mod-mono и Apache

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

RequiroVerus
Сообщения: 64
ОС: Debian

Mod-mono и Apache

Сообщение RequiroVerus »

Добрый Вечер.
Проблема в следующем. Пытался запустить страницы aspx на apache. С Демо-сайтом который был у меня в репах проблем нет, запустил все работает.
Есть еще один сайт, с ним проблемы. При попытке открытии страницы, появляется следующая ошибка
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

mod-mono устанавливал так:
1)Сначала поставил пакет libapache2-mod-mono
2)Поставил пакет mono-apache-server2
3)В файле /etc/apache2/mods-enabled/mod_mono.conf. Поменял строку

Код: Выделить всё

Include /etc/mono-server/mono-server-hosts.conf
на

Код: Выделить всё

#Include /etc/mono-server/mono-server2-hosts.conf

Дальше попытался запустить тестовый сайт все получилось. Попытался запустить сторонний сайт, получил ошибку.
Вот error-log:

Код: Выделить всё

[Sun Jan 20 22:14:39 2008] [notice] Apache/2.2.3 (Ubuntu) mod_mono/1.2.1 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
System.TypeInitializationException: An exception was thrown by the type initializer for Mono.WebServer.ModMonoWorkerRequest

Server stack trace:
  at <0x00000> <unknown method>
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.String queryString, System.String path, System.String protocol, System.String localAddress, Int32 serverPort, System.String remoteAddress, Int32 remotePort, System.String remoteName, System.String[] headers, System.String[] headerValues) [0x00000]
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[])
  at (wrapper xdomain-dispatch) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (object,byte[]&,byte[]&,int,string,string,string,string,string,int,string,int,string,string[],string[])

Exception rethrown at [0]:
 ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section <system.webServer> () (/var/www/publish/web.config line 163)
  at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlTextReader reader) [0x00000]
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlTextReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) [0x00000]
  at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlTextReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) [0x00000]
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlTextReader reader, System.String fileName) [0x00000]
  at System.Configuration.Configuration.Load () [0x00000]
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000]
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000]
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000]
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000]
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IIn
ternalConfigSystem.GetSection (System.String configKey) [0x00000]
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000]
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000]
  at Mono.WebServer.ModMonoWorkerRequest..cctor () [0x00000] --- End of inner exception stack trace ---

  at (wrapper xdomain-invoke) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[])
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[])
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000]
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000]
System.TypeInitializationException: An exception was thrown by the type initializer for Mono.WebServer.ModMonoWorkerRequest


PS: Судя по логу, чего-то не хватает. Может кто сталкивался с таким?
Veni, Vidi, Vici
Спасибо сказали:
Аватара пользователя
diesel
Бывший модератор
Сообщения: 5989
ОС: OS X, openSuSE, ROSA, Debian

Re: Mod-mono и Apache

Сообщение diesel »

Код: Выделить всё

---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section <system.webServer> () (/var/www/publish/web.config line 163)


попробуйте закоментить то на что оно ругается. и этот web.config вам точно-точно нужен? ну можно конечно и сюда строчки кинуть, может яснее станет.
Спасибо сказали:
RequiroVerus
Сообщения: 64
ОС: Debian

Re: Mod-mono и Apache

Сообщение RequiroVerus »

web.config нужен обязательно.

Не понравилась в web.config в секции <system.webServer> вот эта строчка(их две)

Код: Выделить всё

scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"
Veni, Vidi, Vici
Спасибо сказали:
Аватара пользователя
diesel
Бывший модератор
Сообщения: 5989
ОС: OS X, openSuSE, ROSA, Debian

Re: Mod-mono и Apache

Сообщение diesel »

Код: Выделить всё

scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"

я так подозреваю что в случае linux-машины там что-то другое должно быть.


не.. не то :) https://bugzilla.novell.com/show_bug.cgi?id=MONO80457 вот сюда смотрите.
Спасибо сказали:
RequiroVerus
Сообщения: 64
ОС: Debian

Re: Mod-mono и Apache

Сообщение RequiroVerus »

Я так понял, что это директива, создана IIS'ом.
Я ее удалил, толку 0

PS: Может я что не правильно понял в bugzille?
Veni, Vidi, Vici
Спасибо сказали:
RequiroVerus
Сообщения: 64
ОС: Debian

Re: Mod-mono и Apache

Сообщение RequiroVerus »

Доброго времени суток.
3 дня мучаюсь не могу понять в чем проблема.

Код: Выделить всё

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationException: Unknown attribute ()
  at System.Configuration.ConfigHelper.GoGetThem (System.Configuration.CollectionWrapper result, System.Xml.XmlNode region, System.String nameAtt, System.String valueAtt) [0x00000]
  at System.Configuration.ConfigHelper.GetNameValueCollection (System.Collections.Specialized.NameValueCollection prev, System.Xml.XmlNode region, System.String nameAtt, System.String valueAtt) [0x00000]
  at System.Configuration.NameValueFileSectionHandler.Create (System.Object parent, System.Object configContext, System.Xml.XmlNode section) [0x00000]
  at System.Configuration.ConfigurationSection.GetRuntimeObject () [0x00000]
  at <0x00000> <unknown method>
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace ---

  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000]
  at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000]
  at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x00000]
  at System.Web.Configuration.Web20DefaultConfig.GetConfig (System.String sectionName) [0x00000]
  at System.Configuration.ConfigurationSettings.GetConfig (System.String sectionName) [0x00000]
  at SLife.Commerce.Web.CSK.CommunityGlobals.get_enableCaching () [0x00000]
  at SLife.Commerce.Business.CSK.CommunityUtility.GetAllCommunities () [0x00000]
  at SLife.Commerce.Business.CSK.CommunityUtility.GetCommunityInfo () [0x00000]
  at ITD.Module.Forex.Web.Service.ImporterModule.application_BeginRequest (System.Object sender, System.EventArgs e) [0x00000]
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
  at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext () [0x00000]


PS: директиву <web.Server> из web.config удалил
Veni, Vidi, Vici
Спасибо сказали: