Why my webservice runs in localhost but doesn't run in my host on the internet? - asp.net

I wrote a simple web service and published it, then upload it in my host. There is a folder with name "webservice1" in my host, beside other files of my web site.
In folder "webservice1" I upload 2 files: myclass_Service1.asmx and web.config and a folder bin which has dll files.
But when I type the address of my webservice in the URL, it isn't recognized.
I also upload files in root of my host, but they also aren't recognized.
In my local host it will run, but on my host it doesn't
Why?
thanks

What exactly does your Browser say?
Sounds like a Firewall issue to me:
Open the "Windows Firewall with Advanced Security"
Choose the "Inbound Rules"
Search for Rules including "WWW-Services" or Similar
Make sure to Activate the Rules allowing Port 80 (and 443 for https)
Screenshot (Sorry for german):
Windows Firewall

Related

I need to run a file that I placed on an AWS server using sftp

I have a bitnami WordPress instance using AWS lightsail. I need to migrate the site to another identical AWS instance. I created a PHP installer from the first instance using the Wordpress Duplicator plugin.
I then uploaded the file onto the new server to a folder (opt/bitnami/apache2/htdocs/).The instructions I've seen online they say I just need to navigate to the location of the installer in a browser and it will run. However, when I attempt to access the PHP file from a browser I just get an error on the front-end saying:
OOPS! THAT PAGE CAN’T BE FOUND
I have seen suggestions online that the installer be placed into a public folder called html_public but my instance doesn't have a folder like that. I changed the access rights to the folder, and the installer, to be full rw access.
Any ideas how I can get this to work?
You must config the Security Groups firewall to open the HTTP port.
Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/]
On the Inbound Rules tab, choose Edit the port range 80, 443 - Source: Anywhere - IP Address: 0.0.0.0/0 and Save.

How to move wordpress website with ssl on localhost?

Website with ssl on wordpress. Moved it on localhost, changed wp-config, changed https://olddomain.ru to http://newdomain.ru.
But still have error ERR_SSL_PROTOCOL_ERROR in browser and Invalid method in request \x16\x03\x01 in apache2 logs.Trying to start it via MAMP. How to disable SSL?
This question relates to current and previous MAMP and MAMP PRO versions. MAMP PRO assists in replicating basic web host production environment on a users local Windows based system.
First, it's best to isolate the problem by disconnecting your system from internet.
Turning off GroupStart for Apache and MySQL by un-checking "Include MySQL in GroupStart" is another isolation problem solving technique:
https://documentation.mamp.info/en/MAMP-PRO-Windows/Servers-and-Services/Apache/
https://documentation.mamp.info/en/MAMP-PRO-Windows/Servers-and-Services/MySQL/
Emptying logs by erasing the log files prior to trying out the steps below is another way to isolate problems:
C:\MAMP\logs
Most local systems have AntiVirus program and the antivirus program usually has software firewall bundled. Be sure to add Web Server and HTTPS ports under ports and services of your choice of AntiVirus software.
1. Custom Domain:
First issue is related to assigning custom domains. A custom domain is assigned by modifying Windows Hosts file to point localhost host with IP 127.0.0.1 to a fictitious domain name.
Here is how the default hosts file looks like:
https://support.microsoft.com/en-us/help/972034/how-to-reset-the-hosts-file-back-to-the-default
Here is the required modification:
hosts file
127.0.0.1 newdomain.ru
::0 localhost
::0 is the bus/port designation of a systems network adapter. Usually the first available network adapter software on a device has ::0 address.
After modifying hosts file be sure to flush dns by using Windows command prompt:
ipconfig /flushdns
2. Location of Virtual Hosts data
MAMP documentation recommends you store virtual Hosts data outside of default C:\MAMP\htdocs directory.
https://documentation.mamp.info/en/MAMP-PRO-Windows/First-Steps/View-Localhost/
3. Serverside language application
MAMP recommends to serve serverside language applications such as WordPress on port 80 in your local development environment.
https://documentation.mamp.info/en/MAMP-PRO-Windows/Troubleshooting/WordPress/WordPress1/

adding website to local iis. getting Server not found error

I am adding a web application to my local iis. I added the path to the folder with the bin is inside. I specified the application pool and applied my login credentials. When I hit test settings, everything passed. When I typed mysite.local on the browser, I get the following. I also clicked on Browse Website and get the same error. This is on my personal PC.
Server not found
Firefox can't find the server at www.comicrage.local.
Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Have you added mysite.local to the hosts file? If not, add the following to C:\Windows\System32\Drivers\etc\hosts.
127.0.0.1 mysite.local
The hosts file is responsible for any local overrides that should take precedence over DNS.

Set up ASP.NET web app on server and run on other computer in the network

I googled this a bit, but could't find anything useful.
I need to set up my ASP.NET web app on my server, but run it from another computer in the network.
How can I do this?
The idea is to have the files on the server and run the app by typing the ip adress of the server in the browser adress bar to run it.
eg. 158.1.6.102/myApp.aspx
Any help is appriciated!
Thanks!
Andrej
Steps:
a. Set up the site in IIS on your server. Make a note of the Host Name under the basic binding properties e.g. MyApp.local
b. Set this in your hosts file (%WINDIR%/system32/drivers/etc/hosts) on your workstation machine.
...
MyApp.local 192.168.1.100 <use the IP Address of your Server />
...
c. In the Properties sheet for your Web Application in Visual Studio (right-click the web project in Solution Explorer and get 'Properties') go to the 'Web' section and put a dot in the radiobutton that says 'Use Custom Web Server' and set the 'Server Url' field to http://MyApp.local (or whatever you put for step 1).
d. Build and Go/Debug!
hth
you need to publish it on webserver (IIS) and then you can access it from another machine.
(assume that ip address of webserver is 192.168.0.1)
http://192.168.0.1/webapplication
the most important is the windows firewall of webserver should allow access to another machine.

How remove "localhost:portno" when running an asp.net website under iis?

How remove "localhost:portno" when running an asp.net website under iis?... When i browse my virtual directory i can http://localhost:120/mine/Forms/Clients.aspx.....
If your using IIS 7+ you can create a website (or edit its bindings). In the bindings, add your url that you would like specified. I usually follow {projectName}.{machineName}.{CompanyDomainName}.com.
Then open up notepad, notepad++, ect as admin and open up the host file (C:\Windows\System32\drivers\etc\hosts) and add the following:
127.0.0.1 {url you specified for the binding}
Restart IIS and when you navigate to the binding url, it should open the site.
Example:
Machine Name: Colorado
Domain Name: stackoverflow
Project Name: userDashboard
Binding: UserDashboard.Colorado.StackOverflow.com
Host File:
127.0.0.1 UserDashboard.Colorado.StackOverflow.com
Hope this helps
Configure your virtual directory in Default website in IIS where port = 80 OR set website port = 80.
For port 80 you need not to define port in URL.
To set port, Go to website properties > In website tab > See TCP Port
You have to specify port explicitly only when running non-default websites on IIS.
Deploy you app to default website (or to virtual directory in it). Default website configured to 80 port so you can just type in browser "http://localhost/{virtual_directory}"

Resources