How to make a webservice publicly accessible on the internet - asp.net

I finally finish my web services, I have test with local host and in my network now what I'd like to do is send my web service to be uploaded to the internet.
I wrote my web service in C#, asp.net using the nodepad (and not using visual studio), also I use IIS for the localhost, so the files i have in my virtual directory are:
Web-Based Service Consumer: WebApp.aspx
FirstService.asmx
FirstService.cs
FirstService.dll
Now in localhost works great, but I have no idea of how to publish on the internet. Can someone explain or send a guideline, let me remember that i am not using Visual Studio (and dont want to, don't ask why).
The only thing I know is that I have to have a server working with IIS. Is this true?

Yes now you need to pay for an IIS hosting account to serve your files remotely for the world to see.
For example:
http://uk.godaddy.com/hosting/web-hosting.aspx
They will probably give you an FTP account where you can upload your files and some sort of web interface for you to configure the server. If you talk to them, I'm sure they can walk you through it.
Good luck.

Related

Setting up an IIS server

I need some help here. I have a website in asp.net and a database in my local machine, and I'm setting up a testing enviroment so that I can access the site and the database from outside the local network and make tests. I want to set up a server in my windows 10 using IIS to publish the site, and I already know how to publish a asp.net site through Visual Studio and IIS manager. My only issue now is to make it available outside my network. Is there a easier way of doing this than having to buy a domain and a hosting service?
You could create a free azure app:
https://azure.microsoft.com/en-gb/pricing/calculator/#app-service1
You can run a single website (asp.net) and not need to register a domain it will give you a link publicly available on the web.
Whoops, sorry, the database wouldn't be free however the basic version is not expensive. This is in fact what I run for my own test cases.
In order to host at home, you would need to ensure that you had a static IP address and that port 80 was opened to allow traffic in and out.
https://serverfault.com/questions/1058/how-do-i-set-up-a-web-server-out-of-my-home

Working with IIS on DMZ

Scenario
I have an application that I have been developing for two years. I use the framework .NET to develop it in a language called Oxygene that comes from Pascal.
When I have something new in my code, I publish my application in File System method. I have a couple servers working on Amazon EC2, so I transfer this files to a folder in my IIS Server. In this IIS Server I already have a website that corresponds to my application, so I just replace the old files for the newest files.
I have another server that works as an SQL server.
Last detail is that in my application the user is able to attach files, import pictures, export PDF and Excel files. Attachments and pictures are stored in the same folder the application is located.
Issue
Here is my problem. I have got a new client that is kind of a big client. It seems like this company has a strong IT security, so the application must be located in their servers.
The big problem is that they required my application to be set in the following architecture:
I am used to only use an app server (works for external access) and a SQL server. They want the third server in DMZ net so they can let external access happen. The reason the application can't be placed in the DMZ is because there are the files I mentioned bellow that the user stores in the application. The database stores all the data, but not those files mentioned.
Solutions I have offered, but won't be accepted:
Publishing the application in a IIS server located in the DMZ: That won't be accepted since my application stores user attachments in the same folder the application is located. There are also images stored there.
Publishing the application in the app server, but also publishing a empty application in the DMZ server redirecting to the IIS server inside the LAN: That's the best solution I have come up.
Using a reverse proxy to protect the LAN Net: This is off the table, since reverse proxy is not safe at all.
I am kind of confused because I can't see a way to separate my application in two to make it work in that suggested architecture.
Can anybody give me a hint or ideas of how this would work?
-
You can't "redirect" to inside the LAN, a redirect is a client-side operation, so if the internal server isn't already exposed, you can't redirect someone to it.
A reverse proxy is likely your best bet. Why do you believe it is not safe? This is a tried-and-true solution, it allows you to leave additional ports/services open to internal requests (like a file server, which it sounds like you are trying to expose).
How are these files getting uploaded? Are you using FTP? SMB? HTTP? This solution will not expose those other protocols to the outside world (please don't expose SMB to the outside, it will result in tragedy). Do the external users need to upload these files?

How to properly host my ASP.NET website?

I'm not very experienced with ASP.NET, I've started to learn about all of this a month or so ago, I've made a very simple website that I would like to test online, there are no database connections or anything of the sorts.
My previous experience with the Web has taught me to just upload files via an FTP client and being done, this is obviously not the case with ASP.NET.
I'm running Visual Web Developer Express and having a really hard time understanding how to get my website online on my host. I've read a few things about the web.config file, I've changed my server to support version 4.0, but I still battle with error after error after uploading my files onto my server. I've also read that the Express edition is limited in the "Publish Website" department.
I'd just like a direct answer on how to publish my website onto my host.
Make sure that your hosting company supports ASP.NET websites. Get a FTP client like FileZilla. Copy all of your files to the remote directory. If you are using a database, change the connection string in your web.config file to match the connection string of your new database. You get the connection string from the hosting company.
There are different ways to deploy your Asp.net web site.
Web Setup Project: Create a web setup project and use the resulting files to deploy your application. Read More
Copy Web Site Tool: Update and deploy websites in environments with multiple developers and servers. Read More
Publish website tool: Pre compile your websites.
Read more

Want to run my own server instance with special port for an ASP.Net 4 based solution

I have made an application in asp.net which sends and receive sms, it works very similar to desktop application and it will be installed on servers to send sms alerts, but the problem is if server does not have iis, it will not work. I have seen many apps which when installed, have their own server and port, you do not need to install any IIS, when you just double click it starts running on a special port and works well, similarly visual studio also runs its own port in development mod, so what is the best way to make such solution for an asp.net product.
If you're talking about how to host a service in an application outside IIS, Windows Communication Foundation (WCF), which allows you to host a service in a Windows Forms executable, Console Application, Windows service, or IIS.
It's too big a subject to explain fully here, but there's a nice starting point here.
This will allow you to create the host, and allow you to hose services similar to web services, but with more options for how to connect. (http, tcp, etc.)
But it's not an ASP.NET host. For that, you will need a web server that can execute ASP.NET, such as IIS. There's no way to get around the need to have a web server, whether it's one of the many already established, or if you write your own. I believe there are extensions for Apache that allow you to do so via Mono, but I've never used them. Writing your own would be, in my opinion, a waste of time and a bad idea.
The simplest solution by far is to specify that IIS instaled with the appropriate framework is a requirement for using your website.
Edit
However, if you REALY want to write a WinForms app and have it host ASP.NET, it looks like this previous question has an answer that would help. You can use the Cassini web server, the same one that Visual Studio uses.

asp.net application that manages an ftp server

I have a requirement to build an application that a company can use to manage an ftp server. The idea is that through the web app, they can create users which will also create an ftp space etc so that the user can then upload documents and files to the company. The requirement is specifically that clients can use an ftp program and the company manages it through a web application.
I know Plesk provides an API which could be used by an asp.net application, as well as being able to work with IIS directly etc
however, can anyone suggest:
- a .net library that makes this straight forward (or just tell me that IIS is the best way to go)
- a package that does this (even if it costs)
- an alternate ftp server (not the IIS one) that may make this easier
- examples of .net code managing the IIS ftp server
- "just use plesk"! but really, plesk has too much in it, really I just want the ftp management part of plesk
assume it would be running on a windows server with complete control...I was just presuming that I'd interact with the IIS ftp server but cannot find any real examples of managing the ftp side of things (mind you, searching FTP IIS and .Net etc gives a real mixture of results)
thanks heaps!
(do you always find stuff after you ask?)...
This looks exactly what I'm after...
http://learn.iis.net/page.aspx/285/provisioning-sample-in-c/#CreateFTP
But I'm still open to what's out there...has anyone implemented code similar to this?
This would be the best place to start with IIS7: http://msdn.microsoft.com/en-us/library/microsoft.web.administration%28v=VS.90%29.aspx
we've recently started using WinSCP's (winscp.net) scripting/command-line interface (CLI) from Windows Scheduled Tasks calling standard Windows batch files, but i noticed they also have a howto for c#:
C# example link: winscp.net/eng/docs/guide_dotnet#full_c_example

Resources