Loading the default page via IIS browse

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/18/2012 10:38:27 PM
Gravatar
Total Posts 14

Loading the default page via IIS browse

I have search for the answer to my problem and have not found a solution.  I hope I am requesting help in the correct location as well.  Anyway, I have successfully installed the latest version of mojo portal but I am having issues with the styles / theme and the loading of the initial page when selecting browse via IIS 7.5.  I created a new website in visual studio and loaded all contents from the wwwroot folder into the website root directory.  I had to run setup by selecting the root default.aspx a choosing view in browser.  By doing this it ran setup and completed the installation process.  In Visual Studio I can, after installation, view default.aspx in the browser and the website runs perfectly.  Where my problem lays, and has me concerned I will have the same problem once I deploy it, is that when browsing the website via right clicking the website and selecting browse the initial page (home.aspx or default.aspx) fails to load.  It redirects to : http://whatwhyhow/login.aspx?ReturnUrl=%2f. and it fails to load the theme.

12/19/2012 7:49:22 AM
Gravatar
Total Posts 18439

Re: Loading the default page via IIS browse

See the article Understanding the Difference Between Deployment Files and Source Code.

Hope that helps,

Joe

12/19/2012 1:12:28 PM
Gravatar
Total Posts 14

Re: Loading the default page via IIS browse

Joe, thanks for your quick response but I am very aware of the difference in deployment files and development / code files.  I am a developer by profession.  I did not try to compile the app in Visual Studio just browse the default page via "view in browser" selection from the right click context menu.  That should just start up IIS express from within Visual Studio by my understanding; I am not a guru so I could be wrong.  I took this path because I could not get the setup to run simply by viewing it from the browser or by viewing it via browsing the website from IIS.  I attempt to view it from IIS in the following manner: Right click the website, select "Manage Site" and then select "browse".  I have the app set up in IIS which I believe is proper deployment.  My host file is set to reflect my IP for the "WhatWhyHow" website.  My Application pool is named after my website and using NetworkServices for my Identity.  This is where the site breaks.  It runs perfect when I browse it from selecting "view in browser" right click context menu.  It does not work correctly from browsing in IIS.  IIS and deployment is where I fall short.  I have very little involved in the deployment process and am not very knowledgable of IIS.

12/19/2012 1:36:20 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Loading the default page via IIS browse

I would say that the only time Visual Studio should ever be involved, is if you are using the developer deployment cycle like I am:

  • Download the latest source code using TorgoiseHG
  • Build the solution
  • Visit localhost/setup through either the Visual Studio browser, or outside of Visual Studio in the browser with IIS installed on the workstation (that's my choice).

However, if you are downloading the deployment files and unzipping them, as it sounds like you are, you should:

  • Extract the deployment files to a known folder
  • Set up IIS to point to that folder as the root of the site (IIS site basic settings)
  • Load your browser and visit localhost/setup.

I would never attempt to use Visual Studio with the deployment files, and I think that was what Joe was trying to get at with his short reply. Hope that helps,

Jamie

12/19/2012 4:02:54 PM
Gravatar
Total Posts 18439

Re: Loading the default page via IIS browse

I think maybe some file system permissions got funky from running it in IIS Express first, files it created such as the log and files it copied during setup (such as skin files it copies from /Data/skins into /Data/Sites/[SiteID]/skins) may have got some funky permissions because the file owner was different in IIS Express when the files were created or copied, same file problems can happen when moving to a new server.

It would be cleaner to leave VS out of the equation and just install a fresh copy directly in IIS either from our zip download or the easiest way to install it is using the Web Platform Installer, our latest version is in the Web App Gallery.

Once you do install it in IIS, if you are pointing VS to the same folder and running it or debugging it there, then you should run VS as Administrator (right click the icon and run as Administrator to launch VS).

Hope that helps,

Joe

12/19/2012 4:51:32 PM
Gravatar
Total Posts 14

Re: Loading the default page via IIS browse

Ok, I started over and followed the instructions of Jamie but without any luck.  I am having the same problems.  Let me provide the steps I took to be clear.

1) I extracted a deployment solutions from the zip file to my desktop and renamed the wwwroot folder to WhatWhyHow.

2) I then changed the user.config.sample to user.config and set my database info.

3) I then added the App_Data folder, because it was not included.

4) I created the website in IIS and set the app pool settings, v4.0, and set the permissions on the root folder and child items to read.

5) I changed permissions on both the App_Data folder and the Data folder to full control.

6) From the browser I navigated to http://whatwhyhow/setup; I named my host in IIS "whatwhyhow"

7) Setup ran without hickups and gave me the link to go to the home page and crash.  It navigated to : http://whatwhyhow/login.aspx?ReturnUrl=%2f

My theme and the default root page is acting the same as before.

 

12/20/2012 8:11:18 AM
Gravatar
Total Posts 18439

Re: Loading the default page via IIS browse

In IIS double click your web site. Then in the IIS pane in the middle double click Authentication. Make sure that what you see there is that only Anonymous and Forms Authentication are enabled.

For the style problem view the source of the page and get the full url for ...csshandler.ashx paste that url into a new browser tab. Does it return css or an error or what? If an error what error details?

Hope that helps,

Joe

12/20/2012 12:49:03 PM
Gravatar
Total Posts 14

Re: Loading the default page via IIS browse

Thank you for your continued help Joe.  I have checked both of your recommendations and what I have found is this:

There are three authentication items listed but only the two you mentioned are "Enabled", however the Forms Authentication piece has "HTTP 302 Login/Redirect" as a response type.  I believe I understand this is for the purpose of areas requiring authentication and to where the page is to redirect if the user is not authenticated.  It would appear that with the problem I am having it either does not understand what the default landing page is supposed to be or that the default landing page is set to be authenticated.  This is the forms authentication setting in the web config.  <forms name=".mojochangeme" protection="All" timeout="20160" path="/" cookieless="UseCookies" />.  I recognized the ".mojochangeme" when choosing the edit view of forms authentication in IIS.  Unless I am mistaken, does the tag not suggest that all paths are requiring authentication?  Does the "path" attribute not suggest the root path and in turn cause all pages to require authentication?  I am familiar with asp.net membership and forms authentication but my have some misunderstandings.

The style sheet situation falls into the same concern about the authentication question.  When I login I get all theme settings flawlessly.  It is only when I am not logged in that my theme does not get loaded.  I have copied the link path for both logged in and not authenticated scenerios and they are identical.

<link href="/csshandler.ashx?skin=artisteer31-green&s=1&v=2.3.9.4&sv=00000000-0000-0000-0000-000000000000" rel="stylesheet" type="text/css"/>

<link href="/csshandler.ashx?skin=artisteer31-green&s=1&v=2.3.9.4&sv=00000000-0000-0000-0000-000000000000" rel="stylesheet" type="text/css"/>

12/20/2012 1:00:42 PM
Gravatar
Total Posts 18439

Re: Loading the default page via IIS browse

In IIS double click your web site node, then in the top section for ASP.NET double click .NET Authorization Rules

Make sure it says Mode: Allow, Users: All Users

The only reason I can think of why it would not already have that is if there happens to be another web.config file somewhere in a folder above the site root folder.

Hope that helps,

Joe

12/20/2012 3:30:51 PM
Gravatar
Total Posts 14

Re: Loading the default page via IIS browse

Well, that is as you say it should be.  This is totally mind boggling.

12/20/2012 4:16:15 PM
Gravatar
Total Posts 18439

Re: Loading the default page via IIS browse

Select your web site in the treeview on the left in IIS, then on the far right click "Basic Settings", does it say "Passthrough authentication" in tha dialog? It should, if not click the "Connect as" button and choose "Application user"

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.