I have created a Web API in ASP.NET. I deployed this API in Azure Web App and I was able to use controllers from web API like this http://.azurewebsites.net/api/{controller}.
Now I have deployed the Web API on an FTP server and I am unable to access my controllers like I did before. Any idea on how to do it?
I would really appreciate your help as I am new to FTP.
Thanks in advance.
Just because you can upload/deploy an asp.net site via FTP, it does not mean that the server can automatically run the site and start serving those endpoints (/api/{controller}) automatically.
You need to clarify with whoever is hosting your FTP server if such server can also host asp.net websites. If so, you need to ask them in what particular folder within that server you need to upload your site to.
Related
I created the swagger API in C#, was able to put the site on React using the netlife service. Now I want my API to work not only if I run it, but so that it is on a remote server, but I don't know how to do it. Please describe in detail how I can do this (preferably free hosting or with a small fee)
Current Scenario that works well:
I have a .NET solution that contains 2 projects - Web Application and a Web API Project.
When I need to Publish - I am publishing Web Application first and then Web API project on the Web Server. I am using IP Address to Communicate from Web Application to Call Web API Controllers.
The client now needs this Application to be published to two different web servers that of course have different IPs.
How do I publish because I am using an IP address that is different for both the web servers?
Even if I use hostname/server name, I would get into the same issue of both being different.
Will you have 2 different databases?
I didnt not understand you clearly what is the problem here, if you host Web Application on serv1 and Web API on serv2, Web Application will use serv2 IP address to access the Web API, usualy Web API does not need to access to the Web application since is used just to store and revive data from someware but if u need to push something to the Web Application, Web API will use serv1 IP address to access.
If the WebApp is in angular/react then create the build from VS Code or whichever ide you are using.
If as WebApp you are using Razor/Mvc then remove all the references and then at every call instead of having the call directly have a web api call.
Web Api can be published independently if no references are attached to it.
Following is my problem scenario.
I have an ip address 1.2.3.4
My client will make a webrequest like : http://1.2.3.4/aaa&bbb&ccc
I need to capture this request and instead of serving a web page I want to do something with the "aaa&bbb&ccc" part.
This process will keep looping.
I know how to host a website or a web service on IIS. My confusion is, how do I receive the request on my IP and instead of serving a webpage, just eat it up and 'digest' it. I will have IIS 7 as the web server and ASP.Net/C# as my dev environment.
How do I do this? (Would using a RESTFull ASP web service be a good practice?)
Sincere thanks and regards.
Actually you are looking for Web Service, which grab a request from client(can be in static IP & method name), and do what ever developer wants with the entrance parameters(without have to serve a page).
you can read this for more informations Getting raw soap data from a web reference client running in asp.net
I needed some help in understanding how i can get this setup completed. Due to the current setup of the website, we have a "/blog" that is powered by Wordpress PHP. We are looking to upgrade the website with ASP.NET C# for the main website "/" in a Windows Azure server but maintaining "/blog" on a Linux machine.
The service doesn't wish to use sub-domain for the blog in fear of losing too much SEO value that cannot be duplicated.
May i ask how can this be done?
Thanks!
Make the php website a subfolder of your main ASP.NET site as described in Create a Separate Site or Virtual Directory for PHP Content.
See also Can PHP and ASP.Net run together within the same web site in IIS 7.5?
i am new in asp.net i dont know to how to combine two asp.net web site into one like domain and subdomain concept.
i know the procedure to host one web application in local iis. Please explain the how to combine two application and how to host in local iis i.e) single url as domain(one web application) and subdomain(another web application).
The url should be like these:
http://localhost/firstapplication/
http://localhost/secondapplication.firstapplication/
Thanks in advance.
I'm not 100% sure I understand your question but I think what you want to do is setup a host header for 2 different applications so that you can access them from the same IIS instance. Here is an article that shows you how to configure the hosts:
Using Host Headers to host multiple websites on IIS 6.0
If you are testing this locally you probably want to make a host file entry to simulate the environment.
If you want it to be localhost/firstapplication and localhost/secondapplication.firstapplication/ then you could create a virtual for each application. Here is how you can do that:
How To Create a Virtual Directory in Internet Information Services (IIS)