How do I move an application from Default Web Site onto its own site? - iis

I have an existing application under the "Default Web Site" that is functioning but want to move it as its own "Site". What is the best approach to this as the functioning site has a lot of configuration to it.
I've tried creating a new site and copy/pasting the folder contents(c:/inetpub/wwwroot/application) over but that does not work.
In theory, if I could simply drag the application out of the "Default Web Site" and drop it to the "Sites" folder, that would be nice...
Any help with this would be greatly appreciated! Thank you!

All you have to do in IIS.
Right Click on Sites --> Add web Site (Make up a name for it)
Just set the physical path to the location of the application (You don't even have to move the application)

If you have an old website you want to move to a different folder (like on a different hard drive w/ more memory), you can:
copy the folder to the website to the new location (making sure to reset all the file permissions b/c they are often not automatically copied),
open the site in IIS,
click "Basic settings" in the "Actions" panel on the right hand side of the screen,
change the "Physical path"
click ok
Do an app pool recycle afterwards to ensure everything takes effect

Related

Local VS Inherited pages in IIS

Unfortunately I have deleted the 401 page at application level in IIS..
I have created a new one there back.. type of that page is local instead of inherited..
How should I get it to inherited at app level..
Tried resett but no luck
Unless someone has changed the delegation configuration for your Error Pages, the changes made to your Application Error Pages will be made to the Application's Web.Config file.
Click your Application on the Left Side of IIS Manager.
Next Click Explore in the Top Right corner to open Windows Explorer to the Physical Path of the Application.
Open the Web.config in NotePad.
Locate the tag for < httpErrors>.
I imagine you'll only have two entries one for Remove and one for add. If this is the case, delete everything between < ttpErrors and the closing < / httpErrors>. (Feel free to make a backup of the web.config if you're nervous).
If you have something other than that in the web.config or you don't find it, post back with what you find.

IIS default page doesn't work

I think I must have changed something to IIS default website settings. Now I cannot even browse IIS default website. Even if I create new website, when I browse, it always go to http://localhost/webpages/home.aspx which became the default page for all website I added to IIS. where can I change that setting not to call that http://localhost/webpages/home.aspx by default.
any pointer would be appreciated.
if I understand your question correctly.
These steps should help you to produce the result(s) you require:
1 Create your project in VS.
2 Right click Project name.
3 Select Properties.
4 Select Web.
5 Under Server there is a dropdownbox. Here the default is IIS.
dropdownbox
The usual choice as far as I know is between IIS and localhost.
6 Click the Create Virtual Directory button located to the right.
A message box should pop up saying Virtual Directory successfully created!
Here is a link that may be more helpful. https://www.youtube.com/watch?v=k5RKfOEpOGk&index=9&list=PL6n9fhu94yhXQS_p1i-HLIftB9Y7Vnxlo

IIS 8.5 is not serving JS, CSS, and Image files (static content)

The problem
We're running IIS on Windows 8.1 with Update. We're at the Orchard CMS first time setup screen, and IIS is giving 401s for all static content. We have read the following to no avail:
IIS 7.5 no images css js showing
IIS 7.5 no images css js showing
The official Orchard deployment documentation
Based on those, this is what I have tried that doesn't work.
Turn on the IIS feature to Serve Static Content.
Give IIS_IUSRS permission to Read, write & execute.
Give the site's application pool permission to Read, write & execute.
What does work though is the nuclear option: to give Everyone the Read permission (unless we want to proceed with the Orchard setup; then we need to give Everyone even more permissions.) That leads me to believe that I must give permission to some principle with less scope than Everyone but more scope than both IIS_IUSRS and the application pool combined.
Who/what is that principle?
Pictures to show the problem
We receive a 401 on ..\Themes\SafeMode\Styles\site.css
The task manager confirms that the site is running as the orchard user.
The security properties of the ..\Themes\SafeMode\Styles\ directory gives Read permission to orchard.
Why does it only work when we give Read permission to Everyone?
I had a similar problem. Under authentication, I right clicked "Anonymous Authentication" and clicked "Edit". That shows a dialog giving you the ability to set the identity of the anonymous user. I set it to "Application pool identity" and that fixed the problem for me.
.
This may not be the most secure configuration though, but I'm on a dev server so I don't care.
Try turn on the Static Content and Directory Browsing features under Internet Information Services->World Wide Web Services->Common HTTP Features node.
In my case I had to set Read permission for IUSR user for the web site folder.
So, what I had to do to fix this problem was the following:
(and please understand, that this is not ASP or PHP script related, the server wouldn't even show basic simple .html files, yet would serve out PHP results all day long!)
Two fold…
Had to set the application pool for each site, under advanced settings, to use LocalSystem for it’s process
Under site, advanced settings, security, add the IUSR account to have read & list contents access, for the site… :-)
See any problems with doing that?
'cuz it's working....
Updating windows feature for WWW services/Common Http Features/static content by selecting Static Content checkbox fixed my IIS not service static content issue.
Open IIS -> go to advanced settings of selected website and open Physical Path Credentials -> Select specific user and enter your local user credentials. Open below screenshot for further visualising the things:
IIS Settings

HTTP 403 Forbidden : This website requires you to log in

Using asp .net MVC 4.0 , razor , VS2010 , IIS5.2 , windows Server 2003
I have built an application which i want to publish in IIS. what i did is listed below:
Cleaned then built the solution.
right click on project file and clicked PUBLISH.
publish method : File System
Target Location : C:\Inetpub\wwwroot\testing
then publish.
Then i went to IIS and got my site in Default web sites. happy :). Then i did:
right clicked on testing(my app) and open properties.
In the tabdirectory everything goes fine.
in asp.nettab, i set asp .net version 4.0.30319
here is a little confusion, I set home/index as my default content page in documentstab
then I right click testing and clicked browse. And it shows :
Most likely causes:
This website requires you to log in.
This error(HTTP 403 Forbidden) means that this program was able to connect to
the website, but it does not have permission to view the webpage.
a short summury what i got as error message. This is my fist mvc application and first hosting. What is my fault here? what should i do now?
I had the similar issue. Please try the following:
A. Suggestion below from Microsoft Technet helped me:
The solution is to ensure that the Authenticated Users or \Users group (which usually contains DOMAIN\Users group) has Read & Execute, List Folder Contents and Read permissions on the /BIN folder below C:\inetpub\wwwroot\wss\VirtualDirectories{Sitename80}. Follow the steps listed below to grant the required permissions:
Open Windows Explorer and navigate to the /bin directory of
your web application
Right-click on the folder and click on Properties
Go to Security tab and click on Edit
Click on Add and add the local server group Authenticated
Users or < SERVER NAME >\Users (this usually contains
DOMAIN\Users group).
Select the Read & Execute, List Folder Contents and Read
permissions (if you are planning to add Everyone to the /bin folder,
grant Read permissions only)
Click OK to apply the new settings
NOTE: you may need to to it after every Publish, as permissions somehow may get reset.
B. In VS - set the default page for your website, or try navigating to specific page as opposed to simply opening the website with only the site name.
I know it sounds dumb, but that also was the problem for me
after publishing your webiste to IIS, navigate to http://myServer/mySite/somePage instead of http://myServer/MySite

Loading a web site to IIS

A developer just send me a running website files from IIS directory. I want to know if I can run the website on my PC. The file contain "Default.aspx" file, which I assume is of some importance.
I want to know if it is possible to run the website on my PC, I have installed IIS and I placed the file in the wwwroot folder, but unfortunately I dont know how to proceed from here.
Can someone please point me to the right way to continue with this task.
Thanks in advance
First time use of IIS
Now that IIS is running on your system, it should have defaulted to running on port 80. You can test this out by going to http://localhost/
The file you have placed in the wwwroot directory Default.aspx is an ASP.NET application. You need to go to IIS and convert the directory it is stored into a web application.
Now when creating web applications, it is better to create them in another folder other than your wwwroot folder, and in the case of this tutorial it is easier. Move your Default.aspx into a folder named 'webapp', or something of the like.
To convert it into an application, do the following:
In the Server Manager, expand the
'Roles' item in the tree
Expand the 'Web Server (IIS)' item
Click on 'Internet Information Services (IIS) Manager
In the window on the right hand side, you will need to open up your server. In my case, my server is called WIN2008R2. Your server name will be located inside the 'Connections' pane. Expand your server in the tree
Expand the 'Sites' item
Expand your newly created site. There should only be one there, and the item will have a globe next to it
Now right click on your 'webapp' item which will have a folder next to it, and click 'Convert to Application'. Then leave all the properties the same in the window that comes up and click OK.
You have now created a new web application. By going to http://localhost/webapp you should see it working.
You need to configure IIS to host an ASP.NET website.
You can find information about configuring IIS here: http://msdn.microsoft.com/en-us/library/ms178477.aspx
Another option is using the Cassini web server (instead of IIS). You may find it easier to configure: http://ultidev.com/products/cassini/

Resources