How to run set up mvc website on local - c#

I've got a web application for our office use only. In my office I've got 12 computer and want to install one pc and access via web browser from all computers. I can run web application on visual studio but couldn't find a proper way for all computers and kinda new in this area.
I would like to access on browser like "myapp.com" or localhost something else. Is that possible to give specific name and access even on mobile phones?
Thanks in advance for all suggestions.

You can host your application using IIS. IIS can be setup in any machine.
Steps :
Install IIS
Open IIS manager by entering inetmgr in Run(win+R)
Add website by browisng to its location to the published website location. (Hope you know how to publish a website in visual studio)
Edit the web config file to configure the sql server credentials(Sql db could be hosted separately or in the same machine)
Right click the website in IIS Manager and click start.
Click browse to view the website
You could either access the site by localhost:portnumber or by specifying IP:port number in settings of the website in IIS manager
You can access the website from mobile or external devices if you select public IP for your website. Incase you're connected to a local network, then the website could be accessed only from within your work place. Discuss with your network admin about exposing your server to public by providing a public IP address, if you're on local network.
Feel free to revert if you have more doubts.

Related

IIS Does not refresh changes on web references ASP.NET

I am working over a Virtual Machine using Microsoft Azure, and I installed an app into the IIS, however the when I want to replace the files I've transferred via FTP (From my Local computer to a VM folder) the IIS does not refresh the changes. These are the steps I've run:
Site -- Add new website
Fill up all the required fields
Start the app
but what I can see in the browser is old application, I tried to modified the code but the changes never displayed in the screen.
Note: it is a web service which I try to modified.
Note: I've tried, iisreset, stop the web site, re-start it, re-start the server, deleting the web site, re-create the web site but nothing works.
I am using 4.5.0 in my web app, in [Web.config].
Windows Server 2016.
IIS 10.
Is there something which I am doing incorrectly?
The issue was that there is something in VS2015 solution which does not allow to refresh the web service once the new files are updated via FTP. What I did was to install the https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer and configure the Visual Studio to Deploy the web service to IIS in the Virtual Machine. This was the link which helped a lot.
https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis
RECOMMENDATION
DO NOT deploy a web site or service using FTP, it is better to set the ports in the VM and run the deployment from VS properly.
Check to be absolutely sure that you are overwriting the original files. I have seen some ftp clients show a very small status window that can make it easy to assume the files are transferring due to the flood of messages streaming by when in reality there are permissions issues preventing you from overwriting files. Expand the logging window for whatever client you're using so that you can confirm for certain that your files are actually transmitting. If they are, maybe you're dropping them in the wrong folder.

Run Asp Website On IIS or Asp Developement Server

I have created a full website and everything ok in my laptop at home
and I can run it from visual studio and when I run it this notification shows on my taskbar like image below
the problem is my website is ok in my home but when I copy it on flash and put in the University PC its not running well because its run on IIS localhost and i want to run on Asp development server like in home
I tried to creat a empety website on university pc and copy my website in there but its not working
i get this error over and over when i run
this application defines configuration in the system.web/httpmodules section
I hope you understand me!
Development server as name suggests is only for development purpose and will only be accessed by you. If you want it to be accessible over internet then need to deploy on web server, IIS. In such case it will not use the local port anymore and rather use port 80 (http) or 443(https)

Cannot browse asp site from IIS 6.1 from server itself

I cannot browse my asp site from IIS 6.1 from server itself .
My deploying steps are
I compiled my asp.net web site using West Wind ASP.NET 2.0 Compiler
Utility
Deploy my web site to IIS 6.1
Add host header to my host file
(C:\Windows\System32\drivers\etc\hosts) (Let's say :192.168.1.1
www.mywebsite.com)
I cannot browse www.mywebsite.com from my server itself , but I can browse it from client pc by adding host header as step 3 .
I want to know how can i browse my site from server itself . Is there any option ?
Kindly help me , Thanks :)
Try this KB... http://support.microsoft.com/kb/896861
If you are able to browse from other machines, and not from local machine, most likely it is due to LoopBackCheck. The KB explains what needs to be done.
In the server's hosts file, try setting the IP to the loopback address (e.g. 127.0.0.1) instead of the local network IP address. http://en.wikipedia.org/wiki/Loopback Also double check, how is it bound in IIS? To a specific IP or to "all addresses"?

What configs should be required to connect .aspx online?

I'm pretty new learning c#, and ASP.NET. I want to connect the page I've written with visual studio2012 using IIS. I know how this works on local, but I don't have a clue about making this work online.
For example, when I debug my asp.net page, the directory is:
localhost:2791/WebForm1.aspx.
This project is saved on the IIS root directory, and all the configs for the IIS seems to be fine.
But when I try to access this such as, myip/WebForm1.aspx, it doesn't work.
What am I missing?
Firstly you need to host your web application in the IIS.
I am assuming that, you have correctly hosted your application in the IIS.
Now, try accessing it with address localhost:portnumber/virtual directory,
if you are able to access, then go ahead and read the answer below, otherwise, you simply have not hosted your app properly in IIS.
Now, to access your IIS hosted website through your IP address +Port number(if not default), you must check if Firewall has not blocked it.
For enabling access to your IIS hosted website through your IP, do this:
goto Control Panel\System and Security\Windows Firewall\Allowed Programs and make sure property World Wide Web Services (HTTP) is checked (for all the networks)

Issue with Deploying an app in IIS 7.5

I am trying to deploy an app on IIS7.0
I developed the app in 4.0 (Just a web app not MVC or anything)
These are the steps I followed
1.Select Application pools -> Create New ->TestApp--> Select the framework version to 4.0
Sites -> Add web Sites -> SiteName ->TestApp -->Choose the TestApp Application Pool
Select the Physical Path
If I leave the Host Name Empty and click on Ok
when I go to the website and manage application ->Browse I am seeing the App as localhost (Very Well)
But When I enter the host name as Testapp.Domainname.com It is not working what am I doing wrong??
You need to have that domain configured in DNS server you're using. If you want to have the app accessible under this URL from the internet, you need to go to one of the domains resellers, buy the domain name and configure it to point to your IIS server.
For development, you probably want to set up DNS name locally, for your machine only - you have to specify this domain name in your hosts file than:
127.0.0.1 testapp.domainname.com

Categories