2.0 setup in IIS

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello,

I have just published NOP2.0 and copied the 'Deployabel/Nop2.0 folder to IIS machine.  I have created a new website in IIS pointing to the NOP2.0 folder.  When I bring up the site it automatically redirects to a 'install' folder which it won't even find.

From my dev machine I can run the application without any problems.  What am I missing here?

Any help is appreciated.
12 years ago
You need to create a default document if you haven't already done that.  Then you have to set that document at the top of the default document list in IIS.  I made mine an empty default.aspx and put this in the code behind:

protected void Page_Load(object sender, EventArgs e)
        {
            string originalPath = Request.Path;
            HttpContext.Current.RewritePath(Request.ApplicationPath, false);
            IHttpHandler httpHandler = new MvcHttpHandler();
            httpHandler.ProcessRequest(HttpContext.Current);
            HttpContext.Current.RewritePath(originalPath, false);
        }
12 years ago
in the app_data folder, copy the settings.txt to the one in the deployable. This should fix this.
12 years ago
oh and also, on the bottom of the installation page click the restart installation. You need to do this I think it caches.
12 years ago
HI all, where do you create default.aspx?  Is it in Nop.Web?  We have to build the solution again and run deploy.bat again?  I do have settings.txt under my App_data folder but I can't run Nop2 under IIS.  Please help.

Tayb, when I put your code to default.aspx.cs I got MvcHttpHandler namesapce not found.  What do I need to do?


Thanks.
12 years ago
Hi all,
I tried to add a default.aspx page in nop.web, rebuild, prepare.bat and deploy.bat.  I saw the default.aspx file in the root.  When I run http://localhost/Nop2/default.aspx, I got this error.  What does it mean?  What did I do wrong?

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Please help.  Thanks.
12 years ago
tramdoan wrote:
Hi all,
I tried to add a default.aspx page in nop.web, rebuild, prepare.bat and deploy.bat.  I saw the default.aspx file in the root.  When I run http://localhost/Nop2/default.aspx, I got this error.  What does it mean?  What did I do wrong?

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Please help.  Thanks.


Tramdoan, it is unfortunate that you've been lead astray in the above posts. You absolutely do not need a default .aspx file and although you will need a Settings.txt file that is much farther along in the deploy process than you are currently.

http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-vb


http://blogs.msdn.com/b/rickandy/archive/2011/03/14/enabling-iis-7-x-on-windows-7-vista-sp1-windows-2008-windows-2008-r2.aspx

Pay close attention to the options enabled in the "Roles" image of that blog post. You may not have the same views, but when configuring IIS7 you will have the same options.

Once that is configured you will need to copy all the files from Deployable\nop_{version} to the empty root directory of your website. Then you should be able to run the project and you will be automatically redirected to the install controller and it should be displayed. You can then install the application or copy the Settings.txt file into your App_Data folder and restart the website.

edit

baaba and tramdoan should review their configuration using the links I provided. I didn't realize when responding two different people were having similar issues.
12 years ago
Thanks Skyler.  I'll read the links and will give it another try.
12 years ago
OK, I really need help in deployment in IIS.  I read Skyler's links and apply it in my localhost first before I move it to testing server.  It gives me a "Directory Listing Denied".  This is my configuration, please let me know what I do wrong.

0. My system is Windows XP Professional, IIS 5.1.  I don't have IIS 7 so Skyler 2nd link is not applicable.
1. I want go run my store as "http://localhost/Nop2" where "Nop2" is a virtual directory pointed to "c:\inetpub\wwwroot\NopCommerce\Deployable\nop_2.0".  
2. I change my presentation\nop.web\global.asax.cs like below.  I rebuild, run prepare.bat and deploy.bat again :

     public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            //register custom routes (plugins, etc)
            var routePublisher = EngineContext.Current.Resolve<IRoutePublisher>();
            routePublisher.RegisterRoutes(routes);
            
            routes.MapRoute(
                "Default", // Route name
                "{controller}.mvc/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new[] { "Nop.Web.Controllers" }
            );

            routes.MapRoute( "Root", "", new { controller = "Home", action = "Index", id = UrlParameter.Optional } ) ;

        }
3. I ran registermvc.wsf to my local system.
4. I ran the store at http://localhost/Nop2 and get the error.  Now when I run the store from Visual Studio 10, it gives me this error.  This used to work before I change the global.asax file:
  ------------------------
      Multiple types were found that match the controller named 'Home'. This can happen if the route that services this request ('') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter
  -------------------------
Please Help.
12 years ago
tramdoan wrote:
OK, I really need help in deployment in IIS.  I read Skyler's links and apply it in my localhost first before I move it to testing server.  It gives me a "Directory Listing Denied".  This is my configuration, please let me know what I do wrong.

0. My system is Windows XP Professional, IIS 5.1.  I don't have IIS 7 so Skyler 2nd link is not applicable.
1. I want go run my store as "http://localhost/Nop2" where "Nop2" is a virtual directory pointed to "c:\inetpub\wwwroot\NopCommerce\Deployable\nop_2.0".  
2. I change my presentation\nop.web\global.asax.cs like below.  I rebuild, run prepare.bat and deploy.bat again :

     public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            //register custom routes (plugins, etc)
            var routePublisher = EngineContext.Current.Resolve<IRoutePublisher>();
            routePublisher.RegisterRoutes(routes);
            
            routes.MapRoute(
                "Default", // Route name
                "{controller}.mvc/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new[] { "Nop.Web.Controllers" }
            );

            routes.MapRoute( "Root", "", new { controller = "Home", action = "Index", id = UrlParameter.Optional } ) ;

        }
3. I ran registermvc.wsf to my local system.
4. I ran the store at http://localhost/Nop2 and get the error.  Now when I run the store from Visual Studio 10, it gives me this error.  This used to work before I change the global.asax file:
  ------------------------
      Multiple types were found that match the controller named 'Home'. This can happen if the route that services this request ('') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter
  -------------------------
Please Help.


tramdoan,

Unfortunately I cannot help much more than the links I posted above. It has been over 2 years since I've worked with IIS5 and I've never had to make MVC3 and IIS5 work together. Sorry!

p.s. IIS5 is not supported with the latest version of nopCommerce.
https://www.nopcommerce.com/technologysystemrequirements.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.