ASP.NET pages with nginx


3 posts
by parnican » Fri Feb 07, 2014 2:45 pm
Hi all, i would like to use my aspx pages with raspy but it seem not an easy goal... I have tried almost all "tutorials" on the web but i can not find solution for my issue. With lots of experiments i was able to reach a point where i can not move forward.

Could you please help?

Image
No Application Found, Unable to find a matching application for request:
,Host bernolak.dyndns.info:8080
,Port 8080
,Request Path /Default.aspx
,Physical Path /var/www/demo/Default.aspx

Here is my setup:
Code: Select all
uname -a
Linux raspberrypi 3.10.23+ #608 PREEMPT Mon Dec 9 21:11:23 GMT 2013 armv6l GNU/Linux
mono -V
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. http://www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  armel,vfp
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)


More-less all installed packages following this guide:
(http://jokecamp.wordpress.com/2013/06/3 ... italocean/)
Code: Select all
sudo apt-get install nginx
apt-get install mono-complete
sudo apt-get install mono-fastcgi-server4

Then changing config in /etc/nginx/sites-available/default. Download config https://googledrive.com/host/0B0xKyJnisPLtbGJqMEo2NzhTVm8/Net-Raspberry/default
Code: Select all
server {
   listen 8080;
   server_name  bernolak.dyndns.info;
   #root /var/www/demo;
   access_log /var/log/nginx/bernolak.access.log;
    error_log /var/log/nginx/bernolak.error.log;
   location / {
      root /var/www/demo;
      index index.html index.htm default.aspx Default.aspx;
      fastcgi_index Default.aspx;
      fastcgi_pass 127.0.0.1:9000;
      include /etc/nginx/fastcgi_params;
      fastcgi_buffer_size 4K;
      fastcgi_buffers 64 4k;
   }
}


Added to /etc/nginx/fastcgi_params. Download fastcgi_params https://googledrive.com/host/0B0xKyJnisPLtbGJqMEo2NzhTVm8/Net-Raspberry/fastcgi_params
Code: Select all
fastcgi_param  PATH_INFO          "";
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;


Verified configuration and reload was successfull
Code: Select all
sudo nginx -t && sudo service nginx reload

Image

start the mono server by running this command
Code: Select all
sudo fastcgi-mono-server4 /applications=/bernolak.dyndns.info:8080:/:/var/www/demo/ /socket=tcp:127.0.0.1:9000 /logfile=/var/log/mono/fastcgi.log /printlog=True &


EDIT: March 4th 2014
Use this command if raspy hosted behind NAT. IP to hostname will cause error!
Code: Select all
sudo fastcgi-mono-server4 /applications=/:/var/www/demo /socket=tcp:127.0.0.1:9000 /logfile=/var/log/mono/fastcgi.log /printlog=True &


When i reload url i can see in the console error:
Image

Settings in /etc/nginx/nginx.conf are default, here is conf for download https://googledrive.com/host/0B0xKyJnisPLtdkVYUHdSaWh4Sms/nginx.conf
Image
Last edited by parnican on Tue Mar 04, 2014 10:57 am, edited 3 times in total.
Posts: 2
Joined: Fri Feb 07, 2014 2:01 pm
by duberry » Fri Feb 07, 2014 8:36 pm
ASP
dot NET :lol: :twisted:
Try php or something with more support / open licensing .

( yea i v heard ur trying to use mono but ... i saw a guest lecture with a "real" business man slagging off raspberry pi
because he had no joy with mono :| )
lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi
User avatar
Posts: 380
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour
by parnican » Fri Feb 07, 2014 8:48 pm
duberry wrote:ASP
dot NET :lol: :twisted:
Try php or something with more support / open licensing .

( yea i v heard ur trying to use mono but ... i saw a guest lecture with a "real" business man slagging off raspberry pi
because he had no joy with mono :| )


hehe...i have spent already 4days with this topic....simply i don't want to give up after so much hours spent with "basic" point.
...i'm really starting to think about Python...but still...i just would like to solve this issue
Posts: 2
Joined: Fri Feb 07, 2014 2:01 pm