Results 1 to 40 of 40

Thread: [RESOLVED] Problem with IIS setup, perhaps?

  1. #1
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Resolved [RESOLVED] Problem with IIS setup, perhaps?

    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.

    My web site uses IIS bound to port 8079. When I go to http://localhost:8079, I get routed to http://localhost:8079/Account/Login.aspx?ReturnUrl=%2f instead. The page looks terrible, too, because the css is not loaded. If I try to navigate directly to the css, I get http://localhost:8079/Account/Login.aspx?ReturnUrl=%2f also.

    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.

    Now I see what is described above. Any advice?

    Base 2
    Fcnncu"Nqxgu"Lguug##

  2. #2
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    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.

  3. #3
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Are you saying open IIS Manager, click the site I want (asptest), then, in the Actions panel, click View Virtual Directories?

    If so, it appears there are none.

    Base 2
    Fcnncu"Nqxgu"Lguug##

  4. #4
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    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!

  5. #5
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    I don't see what you're referring to. Here's what I see when I click asptest.

    Base 2
    Fcnncu"Nqxgu"Lguug##

  6. #6
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    Towards the bottom of the screen, right next to "Features View" -- that's your current view.

  7. #7
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?



    CSS is not loaded because any calls to Styles/site.css return http://localhost:8079/Account/Login....les%2fsite.css

    Base 2
    Fcnncu"Nqxgu"Lguug##

  8. #8
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    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.

  9. #9
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    This is just the default web site generated by visual studio. File > New > Web Site.

    It's more than just not being able to see the CSS file. When I navigate to localhost:8079, I should see the default.aspx page. I am redirected to http://localhost:8079/Account/Login.aspx?ReturnUrl=&#37;2f instead.

    Base 2
    Fcnncu"Nqxgu"Lguug##

  10. #10
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    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.

  11. #11
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    Hi.As rjv_rnjn says + show your web.config and also have you specified the port number when you created the web site?
    Slow as hell.

  12. #12
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Hello,

    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?

    Gary

  13. #13
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by rjv_rnjn View Post
    That way you wouldn't have to specify a port number every time you invoke your sample website.
    I already have another site which is using port 80.

    Quote Originally Posted by gep13
    Can you please verify whether these are the steps that you followed?
    I started over from scratch and followed the exact method you posted, but I get the same result

    C:\inetpub\wwwroot\asptest has Read & execute, List folder contents, and Read rights for IIS_IUSRS

    Base 2
    Fcnncu"Nqxgu"Lguug##

  14. #14
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by half flung pie View Post
    I already have another site which is using port 80.
    That does not matter. Multiple websites can use the same port; but for the moment that besides the point.

    Quote Originally Posted by half flung pie View Post
    C:\inetpub\wwwroot\asptest has Read & execute, List folder contents, and Read rights for IIS_IUSRS
    That's good. What about the Authentication node value in web.config?

  15. #15
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by rjv_rnjn View Post
    What about the Authentication node value in web.config?
    Code:
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
        </authentication>

    Base 2
    Fcnncu"Nqxgu"Lguug##

  16. #16
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    Try setting that value to "None"
    Code:
    <authentication mode="None">
    <!--      <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> -->
        </authentication>

  17. #17
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Code:
    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.

    Base 2
    Fcnncu"Nqxgu"Lguug##

  18. #18
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Hmmm...

    To confirm, you haven't modified the base web site project at all, right?

    Are you running this on your own machine? What OS are you running?

    Gary

  19. #19
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by gep13 View Post
    To confirm, you haven't modified the base web site project at all, right?
    That's correct.

    I'm running this on my windows 2008 r2 sp1 server with IIS 7.5

    Base 2
    Fcnncu"Nqxgu"Lguug##

  20. #20
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    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
    Slow as hell.

  21. #21
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Sap,

    What difference would that make? Did I miss something?

    Gary

  22. #22
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    No change

    Base 2
    Fcnncu"Nqxgu"Lguug##

  23. #23
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: Problem with IIS setup, perhaps?

    Ok, since I am running out of ideas, did you check if your website grants access to anonymous users?
    WebSite -> Features View - > Authentication.

  24. #24
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Anonymous access is enabled, yes

    Base 2
    Fcnncu"Nqxgu"Lguug##

  25. #25
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    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.
    Slow as hell.

  26. #26
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by sapator View Post
    Gary the admin had a recent problem with UAC on W 2008 so i though i'll suggest that.
    Gotcha.

    half flung pie, have you checked the server's event viewer? Are there any errors being thrown in any of the event logs?

    Gary

  27. #27
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    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.

    Base 2
    Fcnncu"Nqxgu"Lguug##

  28. #28
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Hello,

    Ok, this is a long, but can you zip up the files that you have deployed to IIS and attach them here?

    That way we can deploy them and see if there is something else going on here.

    Gary

  29. #29
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Sure thing, here you go
    Attached Files Attached Files

    Base 2
    Fcnncu"Nqxgu"Lguug##

  30. #30
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    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.
    Slow as hell.

  31. #31
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    Hey,

    This also worked for me

    half flung pie, do you have another machine that you could test this on?

    Gary

  32. #32
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    The asptest site is using the asptest Application Pool

    The asptest Application Pool is set to .NET Framework v4.0.30319, Integrated, Start application pool immediately

    Permissions for C:\inetpub\wwwroot\asptest:

    SYSTEM: Full
    Administrator: Full
    Administrators: Full
    IIS_IUSRS: Read & execute, List folder contents, Read, Special Permissions which include
    Traverse folder / execute file, List folder / read data, Read attributes, Read extended attributes, Read permissions
    TrustedInstaller: Full

    Base 2
    Fcnncu"Nqxgu"Lguug##

  33. #33
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    Users? Users permissions?
    Slow as hell.

  34. #34
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    half flung pie, did you see my note? Have you been able to test on another IIS?

    Gary

  35. #35
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by sapator View Post
    Users? Users permissions?
    Sorry, I'm not following you

    Quote Originally Posted by gep13 View Post
    half flung pie, did you see my note? Have you been able to test on another IIS?

    Gary
    Unfortunately I have only one server to work with, but others have tried the zip I posted earlier on their IIS installations and it works for them

    Base 2
    Fcnncu"Nqxgu"Lguug##

  36. #36
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,744

    Re: Problem with IIS setup, perhaps?

    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

    Gary

  37. #37
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by half flung pie View Post
    Sorry, I'm not following you


    Unfortunately I have only one server to work with, but others have tried the zip I posted earlier on their IIS installations and it works for them
    There is a security group named Users.Have you added it and if so what permission did you gave?
    Slow as hell.

  38. #38
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 05
    Location
    South Carolina, USA
    Posts
    310

    Re: Problem with IIS setup, perhaps?

    Quote Originally Posted by gep13 View Post
    Do you have an IT department at your work that can help you?
    I am the IT department

    Quote Originally Posted by sapator View Post
    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.

    Thanks, sapator and everyone else!

    Base 2
    Fcnncu"Nqxgu"Lguug##

  39. #39
    King of sapila
    Join Date
    Oct 06
    Location
    Greece
    Posts
    3,521

    Re: [RESOLVED] Problem with IIS setup, perhaps?

    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.
    Slow as hell.

  40. #40
    Fanatic Member
    Join Date
    Jun 04
    Location
    All useless places
    Posts
    916

    Re: [RESOLVED] Problem with IIS setup, perhaps?

    Quote Originally Posted by sapator View Post
    ... 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.
    I've had issues with IUSRS permissions too, but had never to explicitly assign permission set to Users group. So that was a good catch.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •