Asp.net App hosting from Visual Studio - asp.net

I am new to asp.net development. While running asp.net application visual studio first starts asp.net development environment and the application is hosted in localhost. Can we access the application (Web page) from other PC in the same network like we could do for the application hosted in IIS?
Is there any special configuration required in VS(we are using VS 2010) for that?
Thanks & Regards,
Arijit

No, you cannot. The best way is to create a new website in the IIS and to host your application there. In this way it could be accessed from the local network via the PC IP address. Just make sure you enable external connections on port 80 via your firewall/antivirus settings.

Related

virtual server to run asp.net project without visual studio

i make a web application in asp.net and this application will run on multiple computers on small network without server client ... and i need to run it without using visual studio
because the user is not asp expert ... so how to do that ??
is there is a way to make a virtual server or to run localhost ??
my web application within this path :
C:\Users\Samy\Documents\Visual Studio 2010\Projects\Redcrescent\PrecompiledWeb\Redcrescent
login.aspx the firstpage
You can host the web application on your local machine.. yes, you will need to set up IIS and configure it to do so. Then you would publish the web application to IIS.
You can google how to set up IIS on Windows 7 or whatever operating system you have.
This link will help as well.

Deployment of ASP.net site for remote access

As per my understanding Visual Studio has a default Deployment Server for ASP.net sites, what should be done if i need to access this site on intranet.
I created a web site in Visual Studio 2010 using asp.net and vb this works fine on localhost but if another friend of mine tries to access it from his pc (he is in the same netwrk) he gets access denied error.
Queries -
should there be a external server whr i should host this site
which is bttr IIS or apache or mono or something....
is there any other way pf remotely accessing this site
You have two options.
Set up IIS on your computer. http://www.youtube.com/watch?v=vBNoTK31zPo
You can set up a virtual directory that points to your project folder.
Use a proxy if you don't want to or can't set up IIS. Remote machines cannot connect to Visual Studio web server

Cannot connect ASP.NET development server (VS2010) via IP address

Visual Studio 2010 / ASP.NET project / ASP.NET Development server
I can run and debug my VS2010 ASP.NET project from my development computer (where VS2010 runs). URL: http://localhost:port/MyApp.htm works fine.
Since I want to test the application from an IPad as well, I need to call the application with its IP address such as http://192.168.0.132:port/MyApp.htm
To my surprise this does not work, neither from the IPad, nor from the dev. computer itself. It is not a matter of connectivity, the address is correct / ping is possible.
(Note that I have no IIS installed on this machine, actually the ASP.NET application is plain HTML+JS, I use VS2010 just for debugging.)
Any workaround for this?
The Visual Studio Development Server will only serve pages to the local machine:
From Web Servers in Visual Web Developer:
If you cannot or do not want to use IIS as your Web server, you can
still test your ASP.NET pages by using the ASP.NET Development Server.
The ASP.NET Development Server, which is included with Visual Web
Developer, is a Web server that runs locally on Windows operating
systems, including Windows XP Home Edition. It is specifically built
to serve, or run, ASP.NET Web pages under the local host scenario
(browsing from the same computer as the Web server). In other words,
the ASP.NET Development Server will serve pages to browser requests on
the local computer. It will not serve pages to another computer.
Additionally, it will not serve files that are outside of the
application scope. The ASP.NET Development Server provides an
efficient way to test pages locally before you publish the pages to a
production server running IIS.
The ASP.NET Development Server only
accepts authenticated requests on the local computer. This requires
that the server can support NTLM or Basic authentication.
If you wish to test pages remotely you will need to use IIS or IIS Express.
I ran into this same problem and found a great solution. You can use SPI Port Forwarder (or a similar tool) to forward outside requests to the VS development web server. It works great and you can turn it on and off as needed.
Check out the info here:
Accessing the Visual Studio ASP.NET Development Server from iPhone & iPad
http://opensource.oxyva.nl/simple-development-proxy seems to work around Visual Studio Express 2012 for Web not allowing connections from other devices like iPhone, iPad etc. which result in "HTTP Error 400: Bad Request - Invalid Hostname"
There seems to be another solution as described in: visual web developer Web service on debug HTTP/1.1 400 Bad Request
You need to set up a WebSite in IIS, and deploy solution to virtual directory for the application to be accessible through an IP address outside of localhost(127.0.0.1)

Sharing ASP.NET WebApp Url Inside a Network

I thought I would just replace the localhost with my computer and it will work but it does not:
http://10.90.108.66/MyWebApplication/Default.aspx
How can I make it work so I can share the url?
Are you using cassini/the visual studio web development server?
if so, this doesn't accept remote connections, you'll have to host it in an instance of IIS

How to access ASP.NET App Over a Network Using IP Address

My asp.net web app is hosted on this URL on my local machine:
http://localhost:45433/
I want to access the same application from a different computer on the network. I tried replacing the localhost with my IP but it did not work.
any ideas!
UPDATE 1:
Now, I am getting this error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
If your application is hosted using Visual Studio's built in web development server then this server does not allow remote connections. It is for testing purposes only and accepts connections only from localhost. In order to access your application from remote clients you might need to deploy it to IIS.
First, add the application as a virtual in IIS, and as long as you can access the machine on the network, you can do:
http://<machine name>/<virtual>
I do that at work, where I can access my co-worker's web site.
HTH.
That looks a lot like a url used by the development web server in visual studio. That web server only responds to requests from the localhost. It won't work for other requests from other machines on your network.
You need to install IIS on your machine (must be a Pro version of Windows) and deploy to that IIS install to share your app on the network.
I don't think the built-in version of Cassini (VS debug server) allows remote connections.
However, the UltiDev version, built off of the same code base with a few enhancements, does, and is a much lighter-weight install than IIS (especially if you can't find your OS install DVD). It also integrates nicely with Visual Studio for debugging purposes.

Resources