IIS Local Server Setup - asp.net

I have a web apllication that I want to test on other machines such as smartphones,tablets etc.How can I make changes to the code on my computer and see the build on other devices?

If you can hook the machines into a local area network that is the same as your web server, then that is the easiest solution. For example, if they can share the same Wifi connection then it may be possible for your tablet or smartphone to access your web server through its local IP.
On the other hand, if you don't want to have that network dependency, you'll need a public IP that will work for the tablets, smartphones, etc. to see the site.

what OS/IIS version are you running? In any case point the "Default Web Site" to the root of your web project and make sure it's bound to port 80. You should be able to access it by "http://[machinename]" or "http://[ipaddress]". Make sure your devices are connected to your LAN. I've noticed that Android will not resolve the machine name but ip address should work.

From this support article.
Log on to the Web server computer as an administrator.
Click Start, point to Settings, and then click Control Panel.
Double-click Administrative Tools, and then double-click Internet Services Manager.
Right-click the Web site that you want to configure in the left pane, and then click properties.
Click the Web site tab.
Type a description for the Web site in the Description box.
Type the Internet Protocol (IP) address to use for the Web site or leave the All (Unassigned) default setting.
Modify the Transmission Control Protocol (TCP) port as appropriate.
Click the Home Directory tab.
To use a folder on the local computer, click A directory on this computer, and then click Browse to locate the folder that you want to use (your asp.net web site).
Click Read to grant read access to the folder (required).
Click OK to accept the Web site properties.
Then you can navigate it by your computer name or IP address. This is assuming the devices you want to use are on the same domain (network).
For instance it could be http://127.0.0.1/YourSiteName to get to the site on your local machine. You can figure out your machine's IP address by running ipconfig from the command prompt.

Related

ERR_INVALID_REDIRECT When Accessing An IIS Website From Another Machine On The Network

I'm receiving an ERR_INVALID_REDIRECT error when trying to access the Default.aspx webpage from another computer.
I have setup a local website using IIS - from the machine where the website has been hosted using IIS, I am able to navigate to the Default.aspx webpage on the local browser.
I have setup bindings to an IP address so I can access it from other devices on the network. I have also setup the firewall to unblock all ports so I am able to access this.
Problem:
When I navigate on the local machine where I have the website hosted using IIS, I am able to see the Default.aspx webpage.
However, now that I have binded an IP in IIS to the website, I want to be able to reach it from another PC on the network.
Currently I am able to access all the webpages in sub directories and also the main directory for the website using:
192.168.1.165:81/SubDirectory/File.aspx
192.168.1.165:81/FileInLocalDirectory.aspx
BUT I am not able to access the homepage named 192.168.1.165:81/Default.aspx.
I have no idea why. The error I receive is
192.168.1.165 sent an invalid response.
ERR_INVALID_REDIRECT
I don't know what the issue is. I don't know if there is something in Default.aspx that is stopping the webpage from being displayed when trying to be accessed from a machine and not the local machine.
#LexLi

How can I host a sub domain

Hello I have a website hosted on remote desktop. ("mywebsite.com")
I want to host another web app with domain "app.mywebsite.com". I created a website in IIS but its not working. What's the configuration setting I need to do make this working ?
(I use IIS7) first app(mywebsite.com) is hosted before. I downt know anything about.
I just created an app and want to host it in same remote desktop with "app.mywebsite.com" alias.
there is an warrning seem on basic settings > Test settings pane
Error message is : "The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again."
How can I fix this ?
Thanks for help
You'll need to add a binding:
Open IIS Manager.
In the Connections pane, expand the Sites node in the tree, and then click to select the site for which you want to add a binding.
In the Actions pane, click Bindings.
In the Site Bindings dialog box, click Add.
In the Add Site Binding dialog box, add the binding information and then click OK.

how to open index.php on local network

i have installed WAMP server on a windows computer and set up a mysql database and php enabled web application. The server is running windows XP.
Now I want to access the index.php file through my Mac connected to the same network. When I browse to the folder and click on the file, it downloads and opens it on the editor instead of the browser. Even when I right click on the file and select open with other, all the browsers are greyed out and not selectable.
I would really appreciate if someone can help me out with this.
You are trying to access the HTML file in the File Explorer.
Web pages served by web servers are supposed to accessed through the browser (like Safari, Chrome, Firefox and Internet Explorer).
So, if the name of the server machine (the one running windows XP, in your case) is, say, windowshost, then go into the browser and type:
http://windowshost
Or, maybe, since it is wamp:
http://windowshost:8080
That last part (:8080) is the port where the web server is. It really depends on how it is configured.
make sure that Windows Firewall is not blocking port 80
and then from the browser in Mac type : http://[windows-ip-address]/index.php
This is a confusion arising from the fact that the index.php file exists in two locations: the 'virtual location` that is provided by the web server, and the actual location on your computer's storage device (whether this is a local or remote storage device).
When accessed through the server, the PHP is rendered into HTML, so your browser can understand it, and the content-type is explicitly set to HTML.
When you attempt to open the php file from your file browser, it just looks like a .php file :) So, quite understandably, it opens in your text editor.
In order to see the rendered index.php, you must, in your web browser, go to your Windows' computer's hostname/ip address.
if you want to access through it mac, then first ensure that whether it is accessible on windows if yes, then in that link put your ip address in space of localhost then it will be accessible on mac.If it is still not accessible then put you ip address in mac host file then it will be accessible.

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 to make an ASP application available over an Intranet

I've created a copy of our legacy, (decrepit) homegrown Timesheet ASP application on to a different, newer workstation for backup purposes.
I've finally got it to the point where I can run it locally over http, using this address:
http://localhost/timesheet/Timesheet.asp
I would like to test it over the network with an address like this:
http://backupServerHostname/timesheet/Timesheet.asp
The live application uses a similar addressing scheme. I'm just not clear on what needs to be done to make this application available from the new server.
You'll want to ensure that backup server isn't using windows firewall or something to block port 80 access. Also you may run into permissions issues if your asp app isn't set to allow anonymous access (assuming you want that).
Goto the folder where the Timesheet web stuff lives (could be C:\Inetpub\wwwroot\TimeSheet, just a guess).
Then Right-Click on the folder, select "Properties", then click the "Web Sharing" tab, then select "Share This Folder" option, this should bring up an "Edit Alias" window. Change the alias to "backupServerHostName".
This is assuming all the machines on on the same LAN.
Nothing needs to be done. If it is serving localhost on Port 80, it should serve other computers on your local network using a name similar to the one you gave. It may literally be as easy as just trying it...
If you just need to browse to it from other machines at work, just replace the "localhost" part with your machine name.
If you need it accessible over the net, you need to install it with IIS on an outward-facing server, and then browse to it that way.

Resources