Semana Interop: Desenvolvendo Asp.NET para Linux
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Semana Interop: Desenvolvendo Asp.NET para Linux

on

  • 1,251 views

Desenvolvendo Asp.NET para Linux

Desenvolvendo Asp.NET para Linux
Portando Aplicativos
Mono e ASP.NET
Progrando ASP.NET no Mono
Criando uma aplicação
Cases de Sucesso

Statistics

Views

Total Views
1,251
Views on SlideShare
1,251
Embed Views
0

Actions

Likes
1
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Semana Interop: Desenvolvendo Asp.NET para Linux Presentation Transcript

  • 1. 3
  • 2. 4
  • 3. 5
  • 4. Supported Architectures Runtime Operating system s390, s390x (32 and 64 bits) JIT Linux SPARC (32) JIT Solaris, Linux PowerPC JIT Linux, Mac OSX, Wii, PlayStation 3 x86 JIT Linux, FreeBSD, OpenBSD, NetBSD, Microsoft Windows, Solaris, OS X JIT Linux, Solaris JIT Linux ARM: little and big endian JIT Linux (both old and new ABI), iPhone Alpha MIPS HPPA JIT Linux JIT Linux JIT Linux x86-64: AMD64 and EM64T (64 bit) IA64 Itanium2 (64 bit) 6
  • 5. www.mono-project.com http://mono-project.com/Monkeyguide http://www.go-mono.com/docs/ http://www.monobrasil.org 7
  • 6. 8
  • 7. Busca manual de Separadores int index = exePath.LastIndexOf(""); exeDir = exePath.Substring(0, index); exeFile = exePath.Substring(index+1); Código mais portável exeDir = Path.GetDirectoryName (exePath); exeFile = Path.GetFileName (exePath); 10
  • 8. “;” “:” Console.WriteLine ( "Subdiretorios encontrados no PATH :“ ); string path_env = Environment.GetEnvironmentVariable ( "PATH“ ); string[] path_dirs = path_env.Split (Path.PathSeparator); foreach (string pathdir in path_dirs) Console.WriteLine(pathdir); 11
  • 9. 12
  • 10. 13
  • 11. 14
  • 12. 15
  • 13. 16
  • 14. 17
  • 15. 20
  • 16. Inclua no apache Include /etc/apache2/mod_mono.conf ou Carregar via módulo no apache LoadModule mono_module /usr/lib/httpd/modules/mod_mono.so 21
  • 17. Apache MonoServerPath "/usr/bin/mod-mono-server2“ MonoAutoApplication enabled <httpHandlers> <add verb="*" path="*.m" type="Maverick.Dispatcher, Maverick" /> </httpHandlers> mod_mono.conf AddType application/x-asp-net .m 22
  • 18. Copie seu site para o servidor e descompacte $ cd /var/www/ $ unzip CommunityServer.zip Você vai acessá-lo em http://localhost/CommunityServer/ http://www.mono-project.com/ASP.NET http://www.mono-project.com/Mod_mono http://www.mono-project.com/AutoHosting Instruções para o Ubuntu https://help.ubuntu.com/community/ModMono 23
  • 19. $ cd /usr/lib/xsp/test $ xsp Listening on port: 8080 Listening on address: 0.0.0.0 Root directory: /home/cvs/mcs/class/corlib/Microsoft.Win32 Hit Return to stop the server. 24
  • 20. 25
  • 21. http://www.monoproject.com/ASP.NET_Mono_Specific_Configuration 26
  • 22. http://www.grokthis.net/ http://www.ubiquityhosting.com/ 27
  • 23. 28
  • 24. Crie os diretórios $ mkdir asp-net $ cd asp-net/ $ mkdir bin Crie o Arquivo teste1.aspx <html> <head> <title>Teste às ASP .NET no Mono</title> </head> <body> Olá Mundo! </body> </html>
  • 25. Para teste execute o xsp no diretório da aplicação $ xsp Adding applications '/:.'... Registering application: Host: any Port: any Virtual path: / Physical path: /home/pre/tmp/asp-net Listening on port: 8080 Listening on address: 0.0.0.0 Root directory: /home/pre/tmp/asp-net Hit Return to stop the server. 31
  • 26. Teste2.aspx <%@ Page Language="c#" Inherits="Mono.Teste2" %> <html> <head> <title>Teste II às ASP .NET no Mono</title> </head> <body> <asp:Label id="msg" runat="server" /> </body> </html> 32
  • 27. Mono C# Compiler Mono C# Compiler Arquivo de Saída $ mcs teste2.cs -r:System.Web -t:library -out:bin/teste1.dll Compilation succeeded Arquivo CSharp Tipo 33
  • 28. 34
  • 29. 35
  • 30. 36
  • 31. 37
  • 32. 38
  • 33. 39
  • 34. 4 0
  • 35. MojoPortal http://www.mojoportal.com http://demo.mojoportal.com/ 41
  • 36. www.mindtouch 42
  • 37. 43