Thanks everybody! m.
2013/5/20 Daniel Lo Nigro <[email protected]> > There's not many differences between MVC 3 and MVC 4 and the installation > steps are basically the same, so I'd personally go with MVC 4. > > My blog is running on MVC 4 and Mono 3.0.7, maybe its code would help you? > The code is available at https://github.com/Daniel15/Website (the > Daniel15.Web project is the website) and the Nginx config I'm using is at > https://github.com/Daniel15/Website/blob/master/Daniel15.Web/nginx.conf. > Maybe I'll write a guide at some stage. > > > On Sat, May 18, 2013 at 6:32 PM, Marco Ridoni <[email protected]> wrote: > >> I solved this but now I get different errors. Before wasting everybody's >> time: is there an updated guide/blog post/random note/whatever to help me >> setup a working MVC3* "hello world" site? I'd like to have a somewhat solid >> base and buld from there. Unfortunately the template in the latest (git) >> version of MonoDeelop doesn't work... >> >> Thanks >> >> >> m. >> >> * yes, I know my original question was about MVC4, but if MVC3 is >> currently easier to setup and run, I can switch >> >> >> 2013/5/17 Daniel Lo Nigro <[email protected]> >> >>> Mono doesn't support Entity Framework 4 so first try removing all >>> references to System.Entity and EntityFramework from your Web.config file. >>> See if you still get the same error after that. >>> >>> >>> On Thu, May 16, 2013 at 7:31 AM, mridoni <[email protected]> wrote: >>> >>>> Hello, >>>> I built a very simple MVC 4 app in VS, now I'm trying to run it under >>>> Mono+nginx/fastcgi, but I get an initialization error. I published the >>>> app >>>> from VS to my Linux server (Mono 3.0.7). I'm pasting the error log and >>>> my >>>> Web.config. Any idea? >>>> >>>> Thanks >>>> >>>> [2013-05-15 17:25:04Z] Debug Accepting an incoming connection. >>>> [2013-05-15 17:25:04Z] Notice Beginning to receive records on >>>> connection. >>>> [2013-05-15 17:25:04Z] Debug Record received. (Type: BeginRequest, >>>> ID: 1, >>>> Length: 8) >>>> [2013-05-15 17:25:04Z] Debug Record received. (Type: Params, ID: 1, >>>> Length: 822) >>>> [2013-05-15 17:25:04Z] Debug Record received. (Type: Params, ID: 1, >>>> Length: 0) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (QUERY_STRING = ) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (REQUEST_METHOD = GET) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (CONTENT_TYPE = ) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (CONTENT_LENGTH = ) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SCRIPT_NAME = >>>> /favicon.ico) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (REQUEST_URI = >>>> /favicon.ico) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (DOCUMENT_URI = >>>> /favicon.ico) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (DOCUMENT_ROOT = >>>> /var/www/epmvc) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SERVER_PROTOCOL = >>>> HTTP/1.1) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (GATEWAY_INTERFACE = >>>> CGI/1.1) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SERVER_SOFTWARE = >>>> nginx/0.7.67) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (REMOTE_ADDR = >>>> 192.168.1.100) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (REMOTE_PORT = 21461) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SERVER_ADDR = >>>> 192.168.1.109) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SERVER_PORT = 80) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SERVER_NAME = >>>> eplacement.rm.lunaria.org) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_HOST = >>>> eplacement.rm.lunaria.org) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (REDIRECT_STATUS = 200) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (PATH_INFO = ) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (SCRIPT_FILENAME = >>>> /var/www/epmvc/favicon.ico) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTPS = on) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_HOST = >>>> 192.168.1.109) >>>> [2013-05-15 17:25:04Z] Warning Duplicate name, HTTP_HOST, encountered. >>>> Overwriting existing value. >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_CONNECTION = >>>> keep-alive) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_ACCEPT = */*) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_USER_AGENT = >>>> Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.31 (KHTML, like Gecko) >>>> Chrome/26.0.1410.64 Safari/537.31) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_ACCEPT_ENCODING = >>>> gzip,deflate,sdch) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_ACCEPT_LANGUAGE = >>>> it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4) >>>> [2013-05-15 17:25:04Z] Debug Read parameter. (HTTP_ACCEPT_CHARSET = >>>> ISO-8859-1,utf-8;q=0.7,*;q=0.3) >>>> [2013-05-15 17:25:04Z] Debug Record received. (Type: StandardInput, >>>> ID: 1, >>>> Length: 0) >>>> [2013-05-15 17:25:04Z] Error ERROR PROCESSING REQUEST: >>>> System.TypeInitializationException: An exception was thrown by the type >>>> initializer for Mono.WebServer.FastCgi.WorkerRequest >>>> >>>> Server stack trace: >>>> at Mono.WebServer.FastCgi.ApplicationHost.ProcessRequest >>>> (Mono.WebServer.FastCgi.Responder responder) [0x00000] in <filename >>>> unknown>:0 >>>> at (wrapper remoting-invoke-with-check) >>>> Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest >>>> (Mono.WebServer.FastCgi.Responder) >>>> at (wrapper xdomain-dispatch) >>>> Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest >>>> (object,byte[]&,byte[]&) >>>> >>>> Exception rethrown at [0]: >>>> ---> System.InvalidCastException: Cannot cast from source type to >>>> destination type. >>>> at System.Configuration.ConfigurationManager.get_AppSettings () >>>> [0x00000] >>>> in <filename unknown>:0 >>>> at Mono.WebServer.FastCgi.WorkerRequest..cctor () [0x00000] in >>>> <filename >>>> unknown>:0 >>>> --- End of inner exception stack trace --- >>>> at (wrapper xdomain-invoke) >>>> Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest >>>> (Mono.WebServer.FastCgi.Responder) >>>> at (wrapper remoting-invoke-with-check) >>>> Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest >>>> (Mono.WebServer.FastCgi.Responder) >>>> at Mono.WebServer.FastCgi.Responder.Process () [0x00000] in <filename >>>> unknown>:0 >>>> [2013-05-15 17:25:04Z] Debug Record sent. (Type: EndRequest, ID: 1, >>>> Length: 8) >>>> [2013-05-15 17:25:04Z] Notice Finished receiving records on connection. >>>> >>>> <?xml version="1.0" encoding="utf-8"?> >>>> >>>> <configuration> >>>> <configSections> >>>> >>>> <section name="entityFramework" >>>> type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, >>>> EntityFramework, Version=4.4.0.0, Culture=neutral, >>>> PublicKeyToken=b77a5c561934e089" requirePermission="false" /> >>>> </configSections> >>>> <connectionStrings> >>>> <add name="DefaultConnection" providerName="System.Data.SqlClient" >>>> connectionString="Data Source=.\SQLEXPRESS;Initial >>>> Catalog=aspnet-MvcApplication1-20130508122630;Integrated Security=SSPI" >>>> /> >>>> </connectionStrings> >>>> <appSettings> >>>> <add key="webpages:Version" value="2.0.0.0" /> >>>> <add key="webpages:Enabled" value="false" /> >>>> <add key="PreserveLoginUrl" value="true" /> >>>> <add key="ClientValidationEnabled" value="true" /> >>>> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> >>>> >>>> <add key="runtime_dsn" >>>> value="Server=localhost;Port=5432;Database=XXX;SearchPath=YYY"/> >>>> <add key="runtime_usr" value="ZZZ"/> >>>> <add key="runtime_pwd" value="ZZZ"/> >>>> </appSettings> >>>> <system.web> >>>> <compilation debug="true" targetFramework="4.0" /> >>>> <authentication mode="Forms"> >>>> <forms loginUrl="~/Account/Login" timeout="2880" /> >>>> </authentication> >>>> <pages> >>>> <namespaces> >>>> <add namespace="System.Web.Helpers" /> >>>> <add namespace="System.Web.Mvc" /> >>>> <add namespace="System.Web.Mvc.Ajax" /> >>>> <add namespace="System.Web.Mvc.Html" /> >>>> <add namespace="System.Web.Optimization" /> >>>> <add namespace="System.Web.Routing" /> >>>> <add namespace="System.Web.WebPages" /> >>>> </namespaces> >>>> </pages> >>>> <profile defaultProvider="DefaultProfileProvider"> >>>> <providers> >>>> <add name="DefaultProfileProvider" >>>> type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, >>>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" >>>> connectionStringName="DefaultConnection" applicationName="/" /> >>>> </providers> >>>> </profile> >>>> <membership defaultProvider="DefaultMembershipProvider"> >>>> <providers> >>>> <add name="DefaultMembershipProvider" >>>> type="System.Web.Providers.DefaultMembershipProvider, >>>> System.Web.Providers, >>>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" >>>> connectionStringName="DefaultConnection" enablePasswordRetrieval="false" >>>> enablePasswordReset="true" requiresQuestionAndAnswer="false" >>>> requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" >>>> minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" >>>> passwordAttemptWindow="10" applicationName="/" /> >>>> </providers> >>>> </membership> >>>> <roleManager defaultProvider="DefaultRoleProvider"> >>>> <providers> >>>> <add name="DefaultRoleProvider" >>>> type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, >>>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" >>>> connectionStringName="DefaultConnection" applicationName="/" /> >>>> </providers> >>>> </roleManager> >>>> <sessionState mode="InProc" customProvider="DefaultSessionProvider"> >>>> <providers> >>>> <add name="DefaultSessionProvider" >>>> type="System.Web.Providers.DefaultSessionStateProvider, >>>> System.Web.Providers, Version=1.0.0.0, Culture=neutral, >>>> PublicKeyToken=31bf3856ad364e35" >>>> connectionStringName="DefaultConnection" /> >>>> </providers> >>>> </sessionState> >>>> </system.web> >>>> <system.webServer> >>>> <validation validateIntegratedModeConfiguration="false" /> >>>> <modules runAllManagedModulesForAllRequests="true" /> >>>> <handlers> >>>> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> >>>> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> >>>> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> >>>> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." >>>> verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" >>>> modules="IsapiModule" >>>> >>>> scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" >>>> preCondition="classicMode,runtimeVersionv4.0,bitness32" >>>> responseBufferLimit="0" /> >>>> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." >>>> verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" >>>> modules="IsapiModule" >>>> >>>> scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" >>>> preCondition="classicMode,runtimeVersionv4.0,bitness64" >>>> responseBufferLimit="0" /> >>>> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." >>>> verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" >>>> type="System.Web.Handlers.TransferRequestHandler" >>>> preCondition="integratedMode,runtimeVersionv4.0" /> >>>> </handlers> >>>> </system.webServer> >>>> <runtime> >>>> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> >>>> <dependentAssembly> >>>> <assemblyIdentity name="System.Web.Helpers" >>>> publicKeyToken="31bf3856ad364e35" /> >>>> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" >>>> newVersion="2.0.0.0" >>>> /> >>>> </dependentAssembly> >>>> <dependentAssembly> >>>> <assemblyIdentity name="System.Web.Mvc" >>>> publicKeyToken="31bf3856ad364e35" /> >>>> <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" >>>> newVersion="4.0.0.0" >>>> /> >>>> </dependentAssembly> >>>> <dependentAssembly> >>>> <assemblyIdentity name="System.Web.WebPages" >>>> publicKeyToken="31bf3856ad364e35" /> >>>> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" >>>> newVersion="2.0.0.0" >>>> /> >>>> </dependentAssembly> >>>> </assemblyBinding> >>>> </runtime> >>>> <entityFramework> >>>> <defaultConnectionFactory >>>> type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, >>>> EntityFramework"> >>>> <parameters> >>>> <parameter value="v11.0" /> >>>> </parameters> >>>> </defaultConnectionFactory> >>>> </entityFramework> >>>> </configuration> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://mono.1490590.n4.nabble.com/MVC-4-error-tp4659674.html >>>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com. >>>> _______________________________________________ >>>> Mono-aspnet-list mailing list >>>> [email protected] >>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list >>>> >>> >>> >> >> _______________________________________________ >> Mono-aspnet-list mailing list >> [email protected] >> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list >> >> >
_______________________________________________ Mono-aspnet-list mailing list [email protected] http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
