I think I might have IIS setup wrong. In VS 2010, I clicked File > New > Web Site. I have not modified any of the code. In VS, if I right click Default.aspx and View in browser, it appears exactly as I would expect. However, when I push the files to my web server, things don't look so good.
When setting up the site in IIS, I set the physical path to C:\inetpub\wwwroot\asptest. The site does not work at this point. It errors with "<compilation debug="false" targetFramework="4.0" />".
In IIS Manager, I set my Application Pool Default to 4.0.
Try going to the virtual directory in IIS. Then right click on the Default.aspx page and right click and then select Browse. What do you get?
Not sure what's going on here, so trying to identify.
No, your site "asptest" is the virtual directory.
So now in the Actions panel go to the Content View and then right click on the default.aspx and select Browse.
As an aside, just a week back I got IIS7. A week before and I would have had no idea what is this "Actions panel" that you are talking of!
How is your CSS referenced in the mark up? Can you post the HTML code here? Two reasons, that I can think of, that will lead to this are either incorrect reference to CSS file or insufficient permission.
To check whether the CSS file is downloaded at all to client, you can use Fiddler. For permissions, I will see if the styles folder (or the folder containing CSS file) has permissions to anonymous user.
In that case, I would look if your folder containing the aspx files has sufficient permission for IIS_IUSRS. And also if there are any authentication mechanisms specified in the web.config. If it is set to "Forms", I'd set it to None and then test.
Unrelated point: If you are building a website for code test purposes, I would set it up as a virtual directory under "Default Web Site" instead of setting up a new web site for each project that you make. That way you wouldn't have to specify a port number every time you invoke your sample website.
I have just gone through the exact process that you have described above, and it all works fine for me.
The steps I took were as follows:
1. Open IIS Manager
2. Right click on Sites, and select Add Web Site
3. Specify asptest as the site name
4. Click the Select... button and choose ASP.NET 4.0 as the application pool and click OK
5. Specify the physical path as C:\inetpub\wwwroot\asptest
6. Change the port number to 8079
7. Click Ok
8. Open Visual Studio
9. Select File | New | Web Site...
10. Build the project to make sure it is functioning
11. Right click the project in the solution explorer and select "Open Folder in Windows Explorer"
12. Select All the files and then copy
13. Navigate to C:\inetpub\wwwroot\asptest and paste
14. Open Internet Explorer and entered the following address http://localhost:8079/Default.aspx
15. The site works as expected.
Can you please verify whether these are the steps that you followed?
HTTP Error 401.3 - Unauthorized
You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.
Hi.I thought that you were publishing your site to another server all the time.You should have said that,or you are publishing to another server?.Try temporarily turning of the UAC, let us know. http://windows.microsoft.com/en-us/w...trol-on-or-off
Gary the admin had a recent problem with UAC on W 2008 so i though i'll suggest that.
Also i would ask again.Is this local IIS7 or the server one.I haven't tried local iis7 but i had problems with local iis6 in the past.Seems i had to start granting permissions everywhere in order for it to work.
Ok what my suggestion is.1st go to the root folder of your site and write all the roles you have there and their permissions.2nd delete the folder, go to application pool on IIS and delete everything that is not the default applications pool.Copy again your site and give it permissions.Use IIS steps Gary gave you.
One last thought since you are using logs.Make sure you have Networks service as a role in root.Go to IIS, Application pools, the pool of your site and go to advanced settings, in there go to Process Model --- identity click the button and choose Network Service.Restart IIS try again.
I just poured through the event viewer after refreshing the site. There are no events in any of the categories from 8:14, which is when I refreshed the page. There have been no events since then, either, but that's irrelevant.
Just to recap, this site is just the default web site generated by VS 2010, web.config and everything.
Tested on what i currently have.Win7 ultimate IIS7.5.
Works fine.
What i did, rather than setting the app pool to default was to have the site run at it's own app pool and just added the 4.0. framework at that pool and set another port on the site.Other than that nothing.The security on root is (didn't change anything)Administrators(full),Users(Read & execute,Read,List),System(full),Authenticated users(All minus special and Full).
I also set the debug mode to true since you had it on false.Try doing the same, see if you are getting any more information.
Last observation, see if you have default.aspx added to the IIS default docments.
Do you have an IT department at your work that can help you? Sounding very much like it has to be "something" with your IIS setup, but anything we suggest really would just be stabs in the dark at this point
Do you have an IT department at your work that can help you?
I am the IT department
Originally Posted by sapator
There is a security group named Users.Have you added it and if so what permission did you gave?
Users was not originally listed in the security settings for this folder. I have added it with "Read & execute," "List folder contents," and "Read" permissions and IT WORKS!
I had just assumed IIS would create the proper permissions.
Glad to hear it!!
I don't think IIS adds permissions by itself.Supposedly putting your site to inetpub will get you started with the permissions but i try to remember looking at the permissions anyway because i will always have a problem on a read-write folder or with IUSRS.