Run Asp Website On IIS or Asp Developement Server - c#

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)

Related

How to run set up mvc website on local

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.

Why can't ASP.NET API be accessed via external ip?

I have a Windows Server 2012 R2 instance and I wanted to deploy an ASP.NET Web API to it (I have used custom deployment method, saving the .rar file on disk). I have created the website inside IIS and everything is working great on http://localhost:8080.
When I try to access it by its external ip (http://12.34.567.899:8080) it won't respond.
Also, the default website on port 80 is fully working.
Things that I have tried
1. My port is open as I have run 'netstat -a' and port 8080 shows as 'LISTENING'
2. I have already checked bindings for IIS, they are ':8080'
Thank you in advance.

Creating a Web Server container to emulate an IIS server

Okay, I'm a very green developer (co-op student) so I'll try my best to make sense. Currently I have a web application (call it "Updater") that is an aspx and runs through IIS. My boss has asked my to look into creating a program (exe or command line) that can run the app through created encapsulated web server that can act like IIS. This is so that I can run the exe during an installer procedure on a client's machine so that the updater can configure the client's program.
So Far I've looked into sources upon sources on how to create a self hosted web server to handle a web app and I've managed to do the following:
-Create a command line server hosted at a given port #######.
-Use a StreamReader to read an html file
-Use HttpResponseMessage to set the Content to this html page.
Obviously this is very rudimentary, but I couldn't understand how to switch the app over to the server I created rather than the IIS.
Any help ont he matter would be appreciated, like I said I'm still quite new.
You can use OWIN to self host from within a console application.
Look for 'Self-Host OWIN in a Console Application' in the following link:
http://www.asp.net/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana
You need to start you self host server with the address your app is trying to contact. If your IIS is running with the default settings it should be http://localhost:80. Before you start the self host server you need to shut down your IIS website that is running on port 80. Two applications can not listen on the same port at the same time.
What you ask is a redistributable web server for ASP.NET. So, you might find interesting the UltiDev Web Server, formerly known as Cassini web server.
From their website:
UltiDev Web Server Pro (UWS) is an advanced, redistributable web server for Windows that can be use as a regular web server to host web sites and ASP.NET applications, or packaged with your ASP.NET web application and installed on your customers' systems along with your web app or site.

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)

Silverlight socket

I downloaded the silverlight 4 socket application from the book "Pro silverlight 4 with c#" which is basically just a silverlight socket client and server application. The server is a console application and the client is a silverlight web applcation.
I can run the server and client fine on ONE computer, it shows that its connected and so on, but when i tried connecting to the server on a different computer (Local Network), it wont connect. Any idea??? Eventually i want to put this on the internet and go live, not local. When i run using visual studio development server, it shows localhost and port 1091, and i thoguth silverlight only uses port 5200 somthing.
Silverlight applications are only allowed to connect back to the site it was loaded from by default, much like Java and Flash does. If you need to communicate with another server, that server needs to explicitly allow it by running a policy service listening to port 943, or by serving a policy file over HTTP port 80. See http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx for the full details on how to implement this.
Have you added policy file to you "C:\inetpub\wwwroot"?
I used example from "Pro silverlight 3 with c#" and its work from internet and local.
I added policy file to "C:\inetpub\wwwroot", where my silverlight website was published and everything works fine.
Note that website published in the same machine where server application runs.
Hope this will help you.

Categories