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
Related
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.
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.
I created an ASP.NET WEB project in VS2012 and add a WCF Data Service file(.svc).When i run, i can reach it(localhost:61388/default.svc), but i can't reach it in another computer by typing my host's ip address(192.168.1.4:61388/default.svc) and it shows BAD REQUEST-INVALID HOST NAME.
Then how can I reach my wcf data service from another computer?
I've turned off all firewalls and my os is windows 7 Pro
For that you need to host your WCF service in IIS server...To learn more about IIS server and add website see this
BY default there is a default website running at port 80.(You can check by typing http:\localhost) If you dont get anything that means IIS is not installed in your PC.
Once your IIS is up and running add your WCF service to IIS just like you add website to IIS (Or directly publish your WCF service in IIS publish-->IIS) and give it a specific port number (lets say your WCF service is running at 81).you can access the service from other computer (Lets say the PC which host has ip 10.20.50.121)...then you can access it on another computer by typing 10.20.50.121:81.
Now to connect your WCF service to Website,you need to check if your wcf service is running or not.For that when you publish your wcf service to IIS you get 3 files out of which one is default.svc(or any of your name you can click on the service go to contents view and see it) click it and on the right hand side click browse if you see a success page that your service is running then you need to copy that address an paste it in your Website webconfig endpoint address location and change the appopriate dns value .That should get your WCF service started
can you access it from your own computer using 192.168.1.4:61388/default.svc ? Or only localhost ? Run netstat -a and check the webserver is actually binding to the 1.4 address and not just to your local loopback adapter (127.0.0.1).
Create a virtual directly pointing to folder where your wcf svc is lying and try accessing it.
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"?
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)