75203

Hosting Web Application ASP.NET MVC on Local Machine Without Internet

Question:

I built my first MVC ASP.Net web Application and host it on IIS on my machine and it works fine.Now i want to host it on Client Computer without internet. Please guide my how can i perform this. Do i Need to Install Visual Studio and SQL server on my Client Computer as well and then publish it there, or I can simply copy the published Folder and copy to client Machine which i don't know how. Moreover how would i manage my DB on Client Computer and what necessary changes should i Make in Web.config file to work it properly. Thank u.

Answer1:

Try following Steps.

1 ) Create a folder in C:\inetpub\YourFolder

2 ) Place your Published Web Application here.

3 ) Open Internet Information Service.

4 ) Sites -> Add Website

5 ) Give a site name

6 ) Set above folder path as at Physical Path Option

7 ) Select a Port no as example 88

8 ) Press OK

<strong>Image</strong>

<a href="https://i.stack.imgur.com/ghk4k.png" rel="nofollow"><img alt="IIs Manager" class="b-lazy" data-src="https://i.stack.imgur.com/ghk4k.png" data-original="https://i.stack.imgur.com/ghk4k.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

9 ) Run in browser

while running, it may show an error, that Login failed for IIS APPPOOL\my-website-name , to clear this problem do the following steps more :

<ol><li>

Open MSSQL Server.

</li> <li>

Open security folder -> Logins folder then right click, and select New Login from option.

</li> </ol>

<a href="https://i.stack.imgur.com/33k69.png" rel="nofollow"><img alt="MS SQL Server" class="b-lazy" data-src="https://i.stack.imgur.com/33k69.png" data-original="https://i.stack.imgur.com/33k69.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

<ol start="3"><li>Add the name as shown in image.</li> </ol>

<a href="https://i.stack.imgur.com/yZ5ug.png" rel="nofollow"><img alt="Add new login" class="b-lazy" data-src="https://i.stack.imgur.com/yZ5ug.png" data-original="https://i.stack.imgur.com/yZ5ug.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

<ol start="4"><li>

Select user mapping tab, then select database file from the list. Then select the check box for db_owner and public.

</li> <li>

Run in browser.

</li> </ol>

<a href="https://i.stack.imgur.com/XQYaQ.png" rel="nofollow"><img alt="User Mapping" class="b-lazy" data-src="https://i.stack.imgur.com/XQYaQ.png" data-original="https://i.stack.imgur.com/XQYaQ.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

For more details : <a href="https://youtu.be/3SXBi3zd-OM" rel="nofollow">Asp.Net MVC website hosting in localhost</a>

Answer2:

You can definitely self host a .NET web application using OWIN. Unfortunately documentation and information about it is vague and confusing at best. The fact that you're using MVC makes it somewhat easier as you may be able to directly use the self-host packages from Nuget for self hosting Web API. There may be similar packages for MVC.

I don't have recent experience but a Nuget search for "MVC Self Host" should yield some results.

Below is a link with an example. But the term you are looking for is definitely "self host". It can be done via a console window or (more complex) a windows service. It will likely use some form of OWIN but you can probably find some startup code to copy and paste into your project, usually in the form of a Startup.cs file.

<a href="http://www.c-sharpcorner.com/UploadFile/4b0136/working-with-owin-hosting-and-self-hosting-in-Asp-Net/" rel="nofollow">http://www.c-sharpcorner.com/UploadFile/4b0136/working-with-owin-hosting-and-self-hosting-in-Asp-Net/</a>

Recommend

  • How to remove left and right margins from all wrapped rows in flexbox (without nth-child or js)
  • Azure Diagnostic is not saving logs in azure tables
  • Linux command line : edit hacked index files
  • Application bar icon text length
  • Why are YouTube videos using 'youtube.com/v' not loading
  • Web.config system.webserver errors
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • Specifying Castle WCF Integration Facility Endpoint Behavior per Endpoint
  • Marklogic : Query response time is very high
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • Read text file and split every line in MSBuild
  • req.body is undefined - nodejs
  • Optimizing database types to compact database (SQLite)
  • Counter field in MS Access, how to generate?
  • Is there a amazon webstore API for customers?
  • Get object from AWS S3 as a stream
  • Java applet as stand-alone Windows application?
  • DirectX11 ClearRenderTargetViewback with transparent buffer?
  • MySQL WHERE-condition in procedure ignored
  • Can I make an Android app that runs a web view in Chrome 39?
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • Adding custom controls to a full screen movie
  • Web-crawler for facebook in python
  • Circular dependency while pushing http interceptor
  • Comma separated Values
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Buffer size for converting unsigned long to string
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • JTable with a ScrollPane misbehaving
  • Angular 2 constructor injection vs direct access
  • how does django model after text[] in postgresql [duplicate]
  • Java static initializers and reflection
  • Android Google Maps API OnLocationChanged only called once
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster
  • reshape alternating columns in less time and using less memory
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?