In order to be able to update certain files on an IIS ASP.NET website like .aspx files, you need to publish it with the "Allow precompiled site to be updatable" option selected in the advanced precompile settings dialog in Visual Studio. However, what about after the site has been published? Where is this setting stored? What if I published a website with that setting off, but I want to enable it? Do I have to republish the whole site? In any case, where is that setting stored?
That setting is not stored anywhere, and after pre-compilation it is lost. If you published a site with that setting off, you will have to republish so as to have it on.
Related
I have a hosted web site built using ASP.Net. I was working on an update and wanted to install it in a sub folder of the domain to test it. I published it using VS 2010, but the site would not run. I contacted the vendor and they made some changes. Although the site run you must type in the full path to default.aspx to view the main page. I was expecting that typing the path in to the browser will find and load default.aspx; instead it shows the folder contents in the browser window.
I contacted the vendor again and they said I must use IIS 7 or above to turn off folder browsing myself or they could do it for me for one-time fee of $95. I downloaded IIS and logged in to my domain, but I don't see the folder where the new site is. If fact, I don't see any of my folders or files. I don't see a WWWRoot. I'm not really sure what I'm looking at.
How do I find the folder in IIS? If I can find it I see the option to turn off folder browsing.
Greg
Enable or Disable Directory Browsing in IIS 7
https://technet.microsoft.com/en-us/library/cc731109%28v=ws.10%29.aspx
https://technet.microsoft.com/en-us/library/cc731109%28v=ws.10%29.aspx
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
In Features View, double-click Directory Browsing.
In the Actions pane, click Enable if the Directory Browsing feature is disabled and you want to enable it. Or, click Disable if the Directory Browsing feature is enabled and you want to disable it.
I have a sitecore site running on .NET 4.0 and IIS 7.5 on Windows 7 machine.
While setting up sitecore, I had installed only the sitecore client and then set up IIS7. I think some permissions have got messed up because of that.
Whenever I try to change a code file in my website in Visual Studio, it gives me a message that I don't have any permissions to modify the files. I can overwrite the existing one, however, this is not normal.
Also, I have ApplicationPoolIdentity set as my Identity for my Application Pool. Whenever I try to go to sitecore desktop it doesn't work, however I can go to content editor upon login. Even after logging in, if I try to go to sitecore desktop mode like /sitecore/shell/default.aspx, the page never loads and the progress wheel just keeps spinning.
It happens in FF, Chrome and IE so it can't be a browser issue.
I checked the permissions of various folder and they all look fine. System, Administrator and Local computer user have full control on the website folder and the files and folders underneath it.
It would be great if someone can help in trying to figure out the right configuration and settings for my website folder.
Firstly, as per the best practice of installing Sitecore, we should set the identity as NetworkService.
So please do 2 things:
Change the Identity in Application Pool as Network Service
Make sure that Website and all its descendants + the Data Folder and all its descendants have Read & Write access for Network Service.
Mostly this should work.
Regards,
Varun Shringarpure
Does IUSR have "Read" permissions on the \Website folder and on all descendants?
Additionally, you may want to look at the Sitecore logs under the \Data\logs folder. You may be having a database connectivity issue that may show up there.
What is the difference between publishing a website to {localdrive}\inetpub\wwwroot and anywhere else on the web server e.g. C:\Website.
I have noticed that I am always left with a directory and a website in the IIS console if I publish to {localdrive}\inetpub\wwwroot.
After reading articles on MSDN, I am still unclear of the difference. I realise that there is probably a simpe answer to this, but I cannot find it.
The web path / is already mapped to c:\inetpub\wwwroot, so /abc is mapped to c:\inetpub\wwwroot\abc automatically.
When you publish to c:\website, you need to set up a virtual path manually.
Nothing too much as your website path in IIS can point to any directory. However, that being said always double check your directory permissions and security settings. In addition, I guess if a hacker did compromised your webserver... the default c:\inetpub\wwwroot is well known.
And just for good measure in case you are having issues - check out the Aspnet_regiis.exe tool on MSDN as it usually solves a lot of issues for folks.
{localdrive}\inetpub\wwwroot is usually used for the default web site that comes with IIS.
Additional Microsoft products use the same directory and take advantage of the virtual directories that exist in the default site.
If this is your personal web site, or a web site you created from scratch, you can publish anywhere you want.
Before you publish, you need to make sure IIS knows where the directory will be, and you need to assign the correct permissions for that folder.
The default website in IIS is mapped to C:\inetpub\wwwroot by default, so publishing to wwwroot makes it easy to add applications as virtual directories.
However, you can publish wherever you like, and either point a virtual directory or new website at your publication location. You simply need to make sure user the App Pool is running as (usually IUSR under IIS7, IUSR_MachineName under previous versions) has read/execute permissions on the folder you are publishing to.
Although they say Virtual Directory created by default for your website in wwwroot and you don't have to configure it again. Many times I found we still have to go there and click on Remove and then click on Create button again :)
Thus it is almost no problem if you create your website outside wwwroot, only difference outside you have to give full path of VD and inside you have to click Remove and then Create button
The problem I had was different from all of the above. I was trying to publish in "C:\inetpub\wwwroot" and the publish failed every time. Than i changed the publish folder to another and it worked. When I launched visual studio as administrator I could copy to C:\inetpub\wwwroot also without problems
when I try to view ASP.NET website in browser I get the full list of files in the website folder. What could be the reason?Is there only one reason or there might be a lot?
That could happen if you have not specified a start page for your web application.
Right click on the web page you want to use as the default page and choose "Set as Start Page" whenever you run the web application from Visual Studio, it will open the selected page.
Refer to the following:
Set Default Page in Asp.net
Setting the default page for ASP.NET (Visual Studio) server configuration
EDIT:
If you are launching the site from within Visual Studio, you can set the default page by doing the following:
From this SO question answer
Right click on the web page you want
to use as the default page and choose
"Set as Start Page" whenever you run
the web application from Visual
Studio, it will open the selected
page.
You need to specify on the server (in IIS) what the default page is, and disable directory listing for the site.
See also:
Setting the default page & disabling directory browsing in ISS / Web.config
It could be any of the other cases mentioned in the answers OR
IIS by default looks for these files in the directory to serve in the given order if no file is specified.
Perhaps you have not specified a file, and turned on "Directory Listing"
When I use the "publish web site" feature in visual studio 2008, it automatically places a app_offline.htm on the web server while it is pushing the files up. If you navigate to http://MyWebSite.com/somepage.aspx you will see the application offline page, which is good.
However if you navigate to http://MyWebSite.com you will get a directory listing denied error message.
Is there any way to correct this behavior?
What is the default document? If the default document is a .htm(l) file, which won't pass through the .NET ISAPI (If you are using IIS 6 or less or on 7+ in classic mode), then .NET won't have the chance to intercept the request and display the offline page.
Since it is not placing any web.config there to allow viewing pages it will give that error. You can set a default page in IIS though.