[Mono-aspnet-list] Fwd: Web-Service On Nginx

nikhil sehgal nikhil.jiet at gmail.com
Thu Feb 2 07:26:36 UTC 2017


GetNum.asmx

<%@ WebService Language="C#" CodeBehind="GetNum.asmx.cs"
 Class="GetNumService.GetNum" %>


and my dll is located in bin folder in same directory PFA screenshot

[image: Inline image 1]
[image: Inline image 2]

On Thu, Feb 2, 2017 at 12:22 PM, amru rosyada <amru.rosyada at gmail.com>
wrote:

> Hi,
>
> Can you share your code  GetNum.asmx?
>
> error output said that there is no GetNum type.
>
> Regards,
>
> On Feb 2, 2017, at 1:32 PM, nikhil sehgal <nikhil.jiet at gmail.com> wrote:
>
> Hi Amru ,
>
> Thanks for your reply !
>
> I have removed that line "*try_files $uri $uri/ =404;*" from  sudo gedit
> /etc/nginx/sites-available/default
>
> and set *root /var/www;*
>
> and using following command to start fastcgi server
>
> fastcgi-mono-server4 --appconfigdir /home/nikhil/www/mono-fastcgi
> /applications=/:/var/www /socket=tcp:127.0.0.1:9000 /printlog=True
> /loglevel=All /verbose=True
>
>
> listen 443;
> server_name localhost;
>
> root /var/www;
> #index index.html index.htm;
>
> ssl on;
> ssl_certificate cert.crt;
> ssl_certificate_key cert.key;
>
> ssl_session_timeout 5m;
>
> ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
> ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
> ssl_prefer_server_ciphers on;
>
> location / {
> *root /var/www;*
>   index index.html index.htm index.aspx;
>                 fastcgi_index Default.aspx;
>                 fastcgi_pass 127.0.0.1:9000;
>                 include /etc/nginx/fastcgi_params;
> }
> }
>
> my wb service uri is* https://localhost/webservice/GetNum.asmx
> <https://localhost/webservice/GetNum.asmx>*
>
> still getting same error
>
> <image.png>
>
> On Thu, Feb 2, 2017 at 10:15 AM, amru rosyada <amru.rosyada at gmail.com>
> wrote:
>
>> Hi,
>>
>> May be you should remove this line:
>>
>> *try_files $uri $uri/ =404;*
>>
>> and don’t forget to set your root folder to your application root folder
>> in this line
>>
>> *root /var/www;* ==> set to your root app folder
>>
>> and you also need to start fast cgi service to passs your asp page
>>
>> fastcgi-mono-server4 /applications=/:/path to your application folder/
>> /socket=tcp:127.0.0.1:9000
>>
>>
>> Hope it help,
>>
>> Regards,
>>
>> On Feb 2, 2017, at 9:38 AM, nikhil sehgal <nikhil.jiet at gmail.com> wrote:
>>
>> ---------- Forwarded message ----------
>> From: "nikhil sehgal" <nikhil.jiet at gmail.com>
>> Date: Feb 1, 2017 11:08 PM
>> Subject: Web-Service On Nginx
>> To: <mono-devel-list at lists.dot.net>, <mono-list at lists.dot.net>
>> Cc:
>>
>> HI ALL,
>>
>>
>> I am trying to host simple web-service on Nginx using Fast CGI on https .
>>
>> I am so sorry asking for some silly error .
>>
>> I am Getting following error .it is not able to find my class (in dll)
>> <image.png>
>>
>> Following are my configuration
>>
>> *gedit /etc/nginx/sites-available/default(PFA)*
>>
>>
>> isten 443;
>> server_name localhost;
>>
>> root /var/www;
>> #index index.html index.htm;
>>
>> ssl on;
>> ssl_certificate cert.crt;
>> ssl_certificate_key cert.key;
>>
>> ssl_session_timeout 5m;
>>
>> ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
>> ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
>> ssl_prefer_server_ciphers on;
>>
>> location / {
>> try_files $uri $uri/ =404;
>>   index index.html index.htm index.aspx;
>>                 fastcgi_index Default.aspx;
>>                 fastcgi_pass 127.0.0.1:9000;
>>                 include /etc/nginx/fastcgi_params;
>> }
>> }
>>
>> *etc/nginx/fastcgi_params(PFA file)*
>>
>>
>> fastcgi_param QUERY_STRING $query_string;
>> fastcgi_param REQUEST_METHOD $request_method;
>> fastcgi_param CONTENT_TYPE $content_type;
>> fastcgi_param CONTENT_LENGTH $content_length;
>>
>> #fastcgi_param SCRIPT_FILENAME $request_filename;
>> fastcgi_param SCRIPT_NAME $fastcgi_script_name;
>> fastcgi_param REQUEST_URI $request_uri;
>> fastcgi_param DOCUMENT_URI $document_uri;
>> fastcgi_param DOCUMENT_ROOT $document_root;
>> fastcgi_param SERVER_PROTOCOL $server_protocol;
>>
>> fastcgi_param GATEWAY_INTERFACE CGI/1.1;
>> fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
>>
>> fastcgi_param REMOTE_ADDR $remote_addr;
>> fastcgi_param REMOTE_PORT $remote_port;
>> fastcgi_param SERVER_ADDR $server_addr;
>> fastcgi_param SERVER_PORT $server_port;
>> fastcgi_param SERVER_NAME $server_name;
>>
>> fastcgi_param HTTPS $https if_not_empty;
>> *fastcgi_param  PATH_INFO          "";*
>> *fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;*
>>
>> # PHP only, required if PHP was built with --enable-force-cgi-redirect
>> fastcgi_param REDIRE   T_STATUS 200;
>>
>>
>>
>> webapp file fastcgi configurationnlocaled at
>> /home/nikhil/www/mono-fastcgi/aspnet.webapp(PFA)
>>
>>
>> <apps>
>>   <web-application>
>>     <name>aspnet</name>
>>     <vhost>*</vhost>
>>     <vport>443</vport>
>>     <vpath>/</vpath>
>>     <path>/var/www</path>
>>   </web-application>
>> </apps>
>>
>> location of web service var/www/webservice
>>
>> <image.png>
>>
>>
>> <image.png>
>>
>> <default><fastcgi_params><aspnet.webapp>____________________
>> ___________________________
>> Mono-aspnet-list mailing list
>> Mono-aspnet-list at lists.dot.net
>> http://lists.dot.net/mailman/listinfo/mono-aspnet-list
>>
>>
>>
>
>
> --
> Thanks & Regards
> NIkhil Sehgal
> Mobile No 9711855929
> Email Id nikhil.jiet at gmail.com
> Skype ID sehgal.nikhil
>
>
>


-- 
Thanks & Regards
NIkhil Sehgal
Mobile No 9711855929
Email Id nikhil.jiet at gmail.com
Skype ID sehgal.nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-aspnet-list/attachments/20170202/008b4e87/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 67735 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/mono-aspnet-list/attachments/20170202/008b4e87/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 17152 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/mono-aspnet-list/attachments/20170202/008b4e87/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GetNum.asmx
Type: application/xml
Size: 94 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/mono-aspnet-list/attachments/20170202/008b4e87/attachment-0001.wsdl>


More information about the Mono-aspnet-list mailing list