locked
How can I use a PC on the local network as a web server for an MVC core application RRS feed

  • Question

  • User283528319 posted

    Hi all,

    I am working in a Veterinary Institute and writing a web-based app to connect institute's units (laboratories, sample acceptance, accountants etc.)

    Instead of <g class="gr_ gr_306 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="306" data-gr-id="306">a ASP-NET</g> web <g class="gr_ gr_307 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="307" data-gr-id="307">hosting</g> I need to host the database (MySQL) and server in a local workstation.

    I would be very pleased if you could explain how can I turn a local machine to <g class="gr_ gr_526 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="526" data-gr-id="526">a ASP-NET</g> server.

    thank you.

    Saturday, January 12, 2019 11:33 AM

Answers

All replies

  • User1120430333 posted

    Well, there is nothing stopping you from installing MySQL on a PC and using it.

    There is no such thing as an ASP.NET Web server. There is a local IIS Web server that comes with the professional versions of the Windows workstation O/S. I think the Home version of Win 10 has local IIS too, which host ASP.NET Web programs.

    What kind of Windows workstation  O/S do you have on the PC? 

     

    Saturday, January 12, 2019 12:23 PM
  • User283528319 posted

    I have windows 10 installed at the local machine

    Saturday, January 12, 2019 12:49 PM
  • User1120430333 posted

    I have windows 10 installed at the local machine

    https://www.itnota.com/install-iis-windows/

    http://codetunnel.com/how-to-debug-your-aspnet-projects-running-under-iis/

    You have somethings to learn about IIS administration, and I suggest that you post to the IIS forums where they can guide you.

    https://forums.iis.net/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 12, 2019 1:05 PM
  • User283528319 posted

    DA924

    fatihbarut

    I have windows 10 installed at the local machine

    https://www.itnota.com/install-iis-windows/

    http://codetunnel.com/how-to-debug-your-aspnet-projects-running-under-iis/

    You have somethings to learn about IIS administration, and I suggest that you post to the IIS forums where they can guide you.

    https://forums.iis.net/

    It looks very <g class="gr_ gr_6 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="6" data-gr-id="6">promissing</g> but how can I reach to that server <g class="gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" id="5" data-gr-id="5">form</g> another pc in the network?

    I meant instead of localhost what should I write to the browser's address bar?

    And <g class="gr_ gr_116 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="116" data-gr-id="116">ofcourse</g> in which folder in the server should I put my all my web project files.

    Saturday, January 12, 2019 1:13 PM
  • User-826336654 posted

    Hi fatihbarut,

    Follow the steps below. It is very easy as well.

    Step 1: Install "Internet Information Server (IIS)" on your Windows 10 machine.

    https://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/

    Step 2: Create your ASP.NET application. Once finished then publish your application to iis.

    https://www.c-sharpcorner.com/article/deploying-your-Asp-Net-mvc-5-app-to-iis-8/

    https://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-iis-host-and-publish-in-mvc-5/

    That's all. you need.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 12, 2019 1:14 PM
  • User283528319 posted

    <g class="gr_ gr_20 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="20" data-gr-id="20">Hi</g> <g class="gr_ gr_18 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" id="18" data-gr-id="18">fatihbarut</g>,

    Follow the steps below. It is very easy as well.

    Step 1: Install "Internet Information Server (IIS)" on your Windows 10 machine.

    https://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/

    Step 2: Create your ASP.NET application. Once finished then publish your application to <g class="gr_ gr_17 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="17" data-gr-id="17">iis</g>.

    https://www.c-sharpcorner.com/article/deploying-your-Asp-Net-mvc-5-app-to-iis-8/

    https://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-iis-host-and-publish-in-mvc-5/

    That's all. you need.

    thanks a <g class="gr_ gr_41 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="41" data-gr-id="41">lot</g> great information. 

    The only <g class="gr_ gr_52 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="52" data-gr-id="52">consern</g> I have is "how can I protect that computer from hacking and other internet base assaults when I open it to all over the world?"

    Saturday, January 12, 2019 1:17 PM
  • User1120430333 posted

    It looks very promissing but how can I reach to that server form another pc in the network?

    You would have to know the IP address of the machine on the Local Area Network (LAN) that is hosting IIS.

    I meant instead of localhost what should I write to the browser's address bar?

    Typical LAN IP that would be issued to a machine on the LAN is 192.168.0.100. You can get the IP the machine is using by using the Command Prompt on the O/S and entering Ipconfig /all.

    And ofcourse in which folder in the server should I put my all my web project files.

    It's called a virtual directory, if it's a Web app. 

    But it depends on what kind of ASP.NET Web solution project you have, becuase Visual Stuido will set up everything for you on IIS. The link as been given to you.

    http://codetunnel.com/how-to-debug-your-aspnet-projects-running-under-iis/

    Or you post to the IIS forums and have them show you how to do it manually.

    Saturday, January 12, 2019 1:46 PM
  • User1120430333 posted

    thanks a lot great information.
    The only consern I have is "how can I protect that computer from hacking and other internet base assaults when I open it to all over the world?"

    Sorry,  you don't have the expertise to harden to attack the Windows O/S, user accounts, registry,  file system and IIS for a computer that is exposed to the public Internet running the Windows O/S. There are 1,000 page books concerning this,  and the experts can hardly protect the machine. 

    I suggest that you stick with a Web hosting provider, becuase all you'll be doing is putting up hack-bait and a jumping off point for hackers to attack networks from you machine with it all pointing back to you and your machine with the law enforcement knocking on your door.

    Saturday, January 12, 2019 2:15 PM
  • User475983607 posted

    The only consern I have is "how can I protect that computer from hacking and other internet base assaults when I open it to all over the world?"

    Asking this question means you should attempt to do this on your own.  Your best option is going with a hosting service.   Hosting is is a lot cheaper than rolling your own plus it removes the local network security concerns.

    Saturday, January 12, 2019 3:15 PM
  • User283528319 posted

    fatihbarut

    The only consern I have is "how can I protect that computer from hacking and other internet base assaults when I open it to all over the world?"

    Asking this question means you should attempt to do this on your own.  Your best option is going with a hosting service.   Hosting <g class="gr_ gr_7 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" id="7" data-gr-id="7">is</g> is a lot cheaper than rolling your own plus it removes the local network security concerns.

    I wish I could do it. Not possible to host these files in a hosting firm. regulations etc.

    Saturday, January 12, 2019 3:58 PM
  • User-2054057000 posted

    I want to add to this. 

    Since your College Computers will be connected on Lan therfore on your browser you will add the ip of the SERVER PC followed by the Virtual Directory where your ASP.NET Application is placed. 

    This is how to make any PC as Server of ASP.NET application.

    1. Install DOT NET CORE or any other version of DOT NET in the PC. 

    2. Install IIS on the PC. And create a virtual directory using IIS

    3. Publish your ASP.NET Site on the Virtual directory.

    Now if the PC ip is 172.8.9.10 and virtual directory name is 'mysite'. Then over LAN you can assess the site by opening the following URL in your web browser.

    http://172.8.9.10/mysite

    Thanks & Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, January 12, 2019 4:08 PM
  • User475983607 posted

    fatihbarut

    I wish I could do it. Not possible to host these files in a hosting firm. regulations etc.

    You can always purchase a VM which is under your control. 

    Talk with your network admin If an on-prem system is needed. Your network admin should be able to provide assistance in this area.

    Saturday, January 12, 2019 4:15 PM
  • User-474980206 posted

    thanks a lot great information. 

    The only consern I have is "how can I protect that computer from hacking and other internet base assaults when I open it to all over the world?"

    once you install IIS on your machine, and install you app in IIS, only computers on your local lan can access it. they will need you machine name. to give internet access to your machine is a different matter. you would need your network team to dedicate a static ipaddress for your machine, and open a tunnel to it from the internet. if this was a home machine, you would need to buy a static IPAddress from your isp. then you would open a firewall port with your router to this ipaddress (usually using nat translation). then you would register your static ipaddress with a DNS server (usually via the register you buy your domain name from).

    Saturday, January 12, 2019 10:07 PM
  • User283528319 posted

    fatihbarut

    I wish I could do it. Not possible to host these files in a hosting firm. regulations etc.

    You can always purchase a VM which is under your control. 

    Talk with your network admin If an on-prem system is needed. Your network admin should be able to provide assistance in this area.

    In a perfect world yeah possibilities are endless but in this world, there are evils blocking every good way :)

    Saturday, January 12, 2019 11:05 PM
  • User1120430333 posted

    mgebhard

    fatihbarut

    I wish I could do it. Not possible to host these files in a hosting firm. regulations etc.

    You can always purchase a VM which is under your control. 

    Talk with your network admin If an on-prem system is needed. Your network admin should be able to provide assistance in this area.

    In a perfect world yeah possibilities are endless but in this world, there are evils blocking every good way :)

    The good way and the right thing to do is to not stick that machine out there on the public Internet, becuase it will be hack-bait that will get the machines on the LAN hacked after they hack the machine you stuck out there. They will do it right in your face and burry the exploit on the machines,  and you won't even know it's there. And they will be all over the top of MySQL to see what's on the database too. :)

    Sunday, January 13, 2019 1:29 AM
  • User283528319 posted

    fatihbarut

    mgebhard

    fatihbarut

    I wish I could do it. Not possible to host these files in a hosting firm. regulations etc.

    You can always purchase a VM which is under your control. 

    Talk with your network admin If an on-prem system is needed. Your network admin should be able to provide assistance in this area.

    In a perfect world yeah possibilities are endless but in this world, there are evils blocking every good way :)

    The good way and the right thing to do is to not stick that machine out there on the public Internet, <g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="9" data-gr-id="9">becuase</g> it will be hack-bait that will get the machines on the LAN hacked after they hack the machine you stuck out there. They will do it right in your face and <g class="gr_ gr_8 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" id="8" data-gr-id="8">burry</g> the exploit on the machines,  and you won't even know it's there. And they will be all over the top of MySQL to see what's on the database too. :)

    I am not talking about hackers as evil. I am talking about governmental jackasses who forbid everything by thinking that is good. However, <g class="gr_ gr_496 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="496" data-gr-id="496">actually</g> they are much more harmful than hackers.

    Sunday, January 13, 2019 7:39 AM
  • User1120430333 posted

    I am not talking about hackers as evil. I am talking about governmental jackasses who forbid everything by thinking that is good. However, actually they are much more harmful than hackers.

    One other thing as far as opening the Windows workstation O/S up to the world  hosting IIS, the Windows O/S workstation version only allows 10 concurrent connections at any given time to be open to it,  and you can't buy more concurrent connection licenses. As opposed to a server version of the Windows O/S, additional concurrent licenses can be purchased. It means that 10 concurrent connections would be used up in a heartbeat causing other programs seeking connections, that 11th connection,  to the O/S to be  terminate with a computer running the Windows workstation version of the O/S.  

    Just FYI....

    Monday, January 14, 2019 4:39 AM
  • User283528319 posted

    One other thing as far as opening the Windows workstation O/S up to the <g class="gr_ gr_22 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" id="22" data-gr-id="22">world  hosting</g> IIS, the Windows O/S workstation version only allows 10 concurrent connections at any given time to be open to it,  and you can't buy more concurrent connection licenses. As opposed to a server version of the Windows O/S, additional concurrent licenses can be purchased. It means that 10 concurrent connections would be used up in a heartbeat causing other programs seeking connections, that 11th connection,  to the O/S to <g class="gr_ gr_23 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" id="23" data-gr-id="23">be  <g class="gr_ gr_19 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="19" data-gr-id="19">terminate</g></g> with a computer running the Windows workstation version of the O/S.  

    Just FYI<g class="gr_ gr_13 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation multiReplace" id="13" data-gr-id="13">....</g>

    What does that actually mean? We have over 50 pc / <g class="gr_ gr_171 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="171" data-gr-id="171">person-s</g> in our network who should have <g class="gr_ gr_191 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" id="191" data-gr-id="191">connection</g> to this program.

    <g class="gr_ gr_214 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" id="214" data-gr-id="214">May be</g> not exactly the same time (as <g class="gr_ gr_261 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="261" data-gr-id="261">milisecond</g>) (concurrent) but still at the same work hours.

    Does that mean it is not possible to use workstation version of windows server for our institute?

    Monday, January 14, 2019 6:22 AM
  • User1120430333 posted

    What does that actually mean? We have over 50 pc / person-s in our network who should have connection to this program.

    You can have 1,000 computers on the LAN. It doesn't mean that 999 computers are trying to connect to a single computer on the LAN with 999 machines trying to access resources on the single computer in a remote fashion. A single computer by itself can have multiple connections open on a computer its sharing resources with, as an example   

    May be not exactly the same time (as milisecond) (concurrent) but still at the same work hours.

    The clue here  is one computer having 10 connections opened up on it concurrently  by other computers trying to access its resources remotely., like the one computer has a file on it that other computers on the network will access the file. If 10 computers try to access the file on the one computer concurrently,  that's 10 connections that are open on the Windows WS O/S concurrently,  and if a 11th computer tries at the same time, it is out of luck.  Maybe, it takes more than milliseconds to access the file. Maybe what is being accessed is a database and 11 or more users are running a program on their machine trying to remotely access the database running on the single computer that is using the workstation version of the O/S. 

    Does that mean it is not possible to use workstation version of windows server for our institute?

    It means that  if you stick the Windows workstation O/S out on the public Internet thinking it's a Windows server O/S,  it's hosting IIS to the world with many many many users trying to access a given Web program on IIS through a browser, then many many many  connections are going to be open concurrently to the O/S. Heck, a single user running a Web program can have more than one connection open depending upon what the Web program is doing at any given time. Connections are being opened and closed by Web clients on the Web server computer  all over the place. What's the chances that 10 connections  would be open concurrently on the computer within milliseconds? What happens if the 11th user tries to open a connection within the milliseconds? 

    As opposed to a Windows O/S server version that can have licensing for 1,000  or more concurrent connections. What's the odds of 1,000  or more connections being opened concurrently within milliseconds? 

    Capiche?

    Monday, January 14, 2019 7:37 AM