smtp4dev - access from remote computer - asp.net-mvc

Is it possible to access smtp4dev from a remote computer. I am using smtp4dev locally for development so that I can view emails as my ASP.NET MVC 3 application sends them out. It would nice to be able to do the same one a testing server with the ability for me or a colleage to view messages being generated on that remote testing server.
If smtp4dev can't do it are there any other tools that can? I know it is possible to output files to a share via ASP.NET configuration, but I find smtp4dev to be a much more user friendly experience...

It sounds like you need to access you local smtp4dev service from a hosted instance of your project. You have several options:
Personally, I use a gmail account for doing this - you're limited to 100 emails per day.
Port forward your local smtp4dev service - find the IP address of the computer it's runnning on, the port the service operates on (SMTP port), go to your router and add the port forwarding rule / Virtual Server. It's possible that smtp4dev only bind to the loopback interface, in which case port forwarding won't work. You should also make sure the firewall exception is added for the port or program.
Your hosting might already have an SMTP server you can use
You could use a public SMTP server - mail.{someisp}.com
In any case, if you're a bit more specific, we will be able to help you further.

Related

Linking online network server between software and application without web

I'm trying to make my network server online and link it to a system and an application that I designed. However I don't want to make a website to upload the server to. Is this possible? Can I link my server directly to my software and my application via the internet? Thanks.
You can connect to servers with out the world wide web.
Their is for example the Gropher protocol.
Most likely this is not what you are looking for.
If you want to reach your server from the outside you need a public IP address. Your internet provider has to give you one. You could get around this, if you know someone with a public IP who accepts to forward your traffic.

Accessing a website on private network

I developed a NodeJS web application meant to be accessed on a private wifi network.
My goal is to have users connect to my server hosted on Ubuntu 14.04LTS, on which I setted up a Wifi hotspot.
The users connect to the wifi network with mobile devices, and then go with their browser to
http://my.server.local.ip/
What is the easiest way to set up a DNS (or something else) so that they are able to browse to a human readable URL instead of my IP ?
Sorry if the question has been answered before, I am a beginner in network configuration and I may not search the good keywords.
Thanks for reading
EDIT:
I forgot to mention that my network provides no access to Internet. I already own a domain for this app, but for the online-version of it. My goal is to build a portable server machine which can serve the application to mobiles on bad Internet coverage areas.
This depends on which machine acts as the DNS-server for your network. Does your Server/WiFi-AP just redirect/bridge the traffic to an ethernet-port and the DHCP-requests from the mobile devices are answered by another device (router-box?) in your network? In that case, that box will also be the DNS-server the mobile devices will be querying for hostname resolution. Maybe you can configure a static IP and hostname for your Ubuntu-server in the router's web interface.
Otherwise, you can set up a DHCP and/or DNS-server on the Ubuntu-machine. A lightweight tool for this job is DNSmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html). This seems to be what you want, reading your latest comment. Configure a static IP address for the server-machine's WiFi-Interface and configure your DNS-server running on the Ubuntu-machine to map the hostname/domain of your choice to that IP. Then the mobile devices can access the website delivered by the Ubuntu machine by using that domain name.

Wordpress and Rails on same domain

I have an Amazon AWS and I want to install both Wordpress and Rails on this same server using Apache. I know that we can do this by configuring Apache virtual host. The problem is with the domain. Currently, we are using example.com for the Wordpress website, this website contains other pages such as blog, help, faq, etc. For the rails app, I want to use the app.example.com as the root path. And when an user signs up, I also want to give him a unique subdomain such as user1.example.com, user2.example.com, etc
How can I achieve such things? I am thinking about using some rewrites to redirect .example.com to Rails app but I don't really know how.
Thanks in advance
The way the internet works is that you address specific machine by its address - the domain is simply a mechanism to make that address prettier - and by the service port
Now, lets say that you are addressing http://example.com
What do you need the http for? this is the protocol you are using and each protocol had a predefined well known port number
You can address a different port by stating it - example.com:3000 for example
Now, a port is like the access point to some web application, but no two applications on same machine can make use of the same port
This is the reason that you can not run both WordPress and Rails server on the same machine and port
So change the port number, right? Not exactly - Because people will not know on which port you put it and will not be able to access it - However, I'm not sure, but in your Name Service Provider (GoDaddy, Networks Solution etc.) in the CNAME definition you might be able to point http://example.com to [your machine name]:[your port] - I'm not sure , you should check it out
Your options:
Use same machine - Leave the WordPress as is, put the Rails on HTTPS (port 8080) - Which is the secured protocol and it is also reasonable if the user need to put in some details that you want to be safe - Then your address will be https://app.example.com and you should update it also in your Service Name Provider settings and also set up a certificate and all read more about it before you start doing that
Use two machines - If you use a micro machine for the rails application it costs you nothing and put your DB also on AWS so you will have access to it from both machines
Hope I was helpfull

How to publish and host a MVC4 application in your domain?

I have a webdomain www.MyDomain.com and a MVC4 web application MyMVCWebApp.
First I publish the application to a local destination.
For instance: C:\TempLocation
And then I host it to my domain with a FTP-tool (FileZilla??)
The files will be hosted but I can't find the webpage.
Which url do I have to write?
http://www.MyDomain.com/MyMVCWebApp/Home/Index.chtml or something?!
Do I have change the settings in my web.config?
What do I have to do?
You can't host an application on a domain.
An application is hosted on a web server. A domain name is only a way to translate an easy to remember address like "www.google.com" to the web server ip address which looks like 173.194.66.104
It is possible to purchase a domain without a web server.
So before going further:
Check if you actually bought a domain only, or a domain with a server
Your domain should redirect to your server ip address, you can see if he is correctly configured by opening a command prompt and doing
C:\> ping www.yourdomain.com
If this is not the case you will need to update the A record of your domain, and wait for the update to be replicated on DNS server worldwird.
If you have a managed server, you should check your hosting provider website. They usually provide in depth documentation, and they all have a different way to do things. Most of the time indeed you will be able to upload your files using a FTP software such as Filezilla.
However, in order to host a MVC 4 application you need a server with
the IIS web server, which means that you need a Windows server. So if
you have a Linux server, you should contact your hosting provider
support and tell them you made a mistake during your order. (It is
possible to host a MVC 4 application on Linux, but I don't think it
is often provided on managed servers)
If you have a dedicated server you are on your own.
The URL you will have to write to access your application will depends on what you have configured in the RegisterRoutes method of the RouteConfigs.cs file.
I recommend you to watch the last video on this page to have a better overview of the possibilities.

How to host a Rails application as an API that is only accessible locally?

I am starting to create a RESTful API that is built on Ruby on Rails. I would like my other applications (which are hosted on the same server) to be able to use this API. I had the idea that if the API is only available locally, I won't have to deal with the authentication logic since it won't be publicly accessible. I have never done this sort of thing before, so I don't even know if what I am asking for is possible (or if this is even a good idea).
How can I host this application so that my REST API is only locally accessible?
You can do one of the following:
Set the webserver to listen on loopback only
If you need to give access to the local network then configure your firewall to forward ports accordingly
Set the webserver to listen only on the private network interface (not public)

Resources