RE: How do I move an existing homepage from server to local host
Hi
I tried to reply on my first topic "How do I move an existing homepage from server to local host", but I couldn't reply to it. So I thought I should click on the correct signs, but then it said that my problem was resolved...:-(
So now I'll try again.
I have made a setup of a new umbraco as Sascha Wolter suggested me in the other topic. And it works fine, I could se the runway homepage and log into umbraco.
As I mentioned in the first tropic I'm installing it on a Windows XP proffessinal sp3 with IIS 5.1, SQL server 2008 Express Advanced and Umbraco 4.0.4.2
I have now made a copy from the FTP folder from the Server provider and paste it into wwwroot. I can see the homepage on http://localhost but when I try to log into umbraco on the http://localhost/umbraco/login.aspx I get this error :
Can someone please help me with that problem. And if someone could write how to solve the problem step by step I would be happy.. thanks
Anita
Server Error in '/' Application. --------------------------------------------------------------------------------
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.] System.Web.UI.Page.get_Session() +2636272 umbraco.cms.presentation.login.Button1_Click(Object sender, EventArgs e) +432 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
From my experience if none of the above solves the issue it is because you are doing something with the Session object in the code that is at the time of execution not allowed, e.g. trying to retrieve a value form a non-initialised Session variable or converting it to a wrong type. From the stack trace it looks like the login control wants to retrieve something from the session that wasn't there, which is odd because this should work out of the box with a standard iis/machine configuration.
Server Error in '/' Application. --------------------------------------------------------------------------------
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'System.Web.SessionStateModule'. (c:\inetpub\wwwroot\web.config line 75)
Source Error:
Line 73: <!-- URL REWRTIER --> Line 74: <remove name="session" /> Line 75: <add name="Session" type="System.Web.SessionStateModule" /> Line 76: <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" /> Line 77: <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3614
that is most unfortunate. However I think the solution can't be far away. If everything was setup correctly on your PC you shouldn't get this message. The System.Web.SessionStateModule is a ASP.Net core component and should be accessible in the GAC (global assembly cache, i.e. available for all applications on the PC). I've added all the lines above to my own 4.0.4.2 installation and it worked fine (if everything works fine you won't need them anyway, that's why they are not included in the web.config by default). So I'm thinking 2 things: either something has gone wrong with your setup of your PC or something is hindering the web application to access the module in question.
There is one thing you might want to check: in IIS6 manager, if you right click on your default web site and click on properties, then select the directory tab and click on configuration, then it should be the second tab: here are the server properties for session state. If session state is turned off here it will most probably not work on your web site, so have a look and see if you can find anything suspicious.
Otherwise I'm out of my wits and if I were in your situation I would either get my hands on another XP machine or setup my own machine from scratch.
I have made a new setup on an other machine that was exactly identical with the one I had the problems on.
Here I could also see the new installed Umbraco both the login and localhost. It worked fine.´
Afterwards I took a copy from the one machine to the other and just made a copy past into the wwwroot. That worked fine too.
Then I got crazy... :-) I took the web.config that I had downloaded from the provider server and compared it with the web.config from the new installation. That took some time... :-)
Here I saw that the provider had added a new session with a specific url to there own server, where I think they may have some security and some other things related to that. So I texted them out and then.... :-) now it works. My problem is solved
Wonderful, glad to hear you got it working. Odd that the provider would add session information linking to another server in the web.config file. But I guess that is not your problem at the moment now that you got it running on your local host. :)
No it's not my problem right now. But it will be my problem when I have made the change to the site. Then I have to load it back to the providers server again.
I think the web.config is the place where the hole umbraco is connected with the masterpages and so on. Is that correct?
the web.config has not really anything to do with the masterpages, it is more of a configuration for the web site from a non-content point of view, so things like which .Net dlls need to be present and loaded, how the server will react to certain requests, configuration of the membership profiles and SMTP clients etc etc. And also how the session state is held, e.g. if it is held 'inProc' (aka in memory) or on a server, which is mostly relevant when using multiple servers or if you maybe want to persist the session even after the user is 'gone'. So in order for you to get it running on the server again I guess you would just have to plug in the code you disabled and it should work perfectly fine on the server. I usually don't touch the web.config file at all when uploading changes to a web site as it is in most cases different from my local version anyway and does not need to change if you make any content, CSS, XSLT etc. changes.
However I would probably send the provider an email asking them why they changed the web.config file (which is usually not their concern at all) and to what purpose. It might not be anything really but might also be good to know. It is jsut quite odd because there is also a machine.config file which contains the configuration for the whole server, so if they wanted all their hosted web sites to use a certain session state they could do it probably via this file.
RE: How do I move an existing homepage from server to local host
Hi
I tried to reply on my first topic "How do I move an existing homepage from server to local host", but I couldn't reply to it. So I thought I should click on the correct signs, but then it said that my problem was resolved...:-(
So now I'll try again.
I have made a setup of a new umbraco as Sascha Wolter suggested me in the other topic. And it works fine, I could se the runway homepage and log into umbraco.
As I mentioned in the first tropic I'm installing it on a Windows XP proffessinal sp3 with IIS 5.1, SQL server 2008 Express Advanced and Umbraco 4.0.4.2
I have now made a copy from the FTP folder from the Server provider and paste it into wwwroot. I can see the homepage on http://localhost but when I try to log into umbraco on the http://localhost/umbraco/login.aspx I get this error :
Can someone please help me with that problem. And if someone could write how to solve the problem step by step I would be happy.. thanks
Anita
Server Error in '/' Application.
--------------------------------------------------------------------------------
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.]
System.Web.UI.Page.get_Session() +2636272
umbraco.cms.presentation.login.Button1_Click(Object sender, EventArgs e) +432
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3614
Hi Anita,
here is some useful information I found: http://www.velocityreviews.com/forums/t292042-session-state-can-only-be-used-when-enablesessionstate-is-set-to-true.html
can you please check the following in your web.config:
Do you have the following line in <system.web>?
You can add a enableSessionState= true to your pages directive, like so:
Try adding this to the httpModules section:
From my experience if none of the above solves the issue it is because you are doing something with the Session object in the code that is at the time of execution not allowed, e.g. trying to retrieve a value form a non-initialised Session variable or converting it to a wrong type. From the stack trace it looks like the login control wants to retrieve something from the session that wasn't there, which is odd because this should work out of the box with a standard iis/machine configuration.
Let me know what happens when you add the above!
Sascha
Hi Sascha
I have added the timeout ="20" in the Sessionstate as you suggested.
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />´
and under it was like this :
<!-- add name="Session" type="System.Web.SessionStateModule"/-->
so I changed it to this:
<
add name="Session" type="System.Web.SessionStateModule" />and now I get this error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'System.Web.SessionStateModule'. (c:\inetpub\wwwroot\web.config line 75)
Source Error:
Line 73: <!-- URL REWRTIER -->
Line 74: <remove name="session" />
Line 75: <add name="Session" type="System.Web.SessionStateModule" />
Line 76: <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
Line 77: <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
Source File: c:\inetpub\wwwroot\web.config Line: 75
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3614
so it still don't work
Anita
Hi Anita,
that is most unfortunate. However I think the solution can't be far away. If everything was setup correctly on your PC you shouldn't get this message. The System.Web.SessionStateModule is a ASP.Net core component and should be accessible in the GAC (global assembly cache, i.e. available for all applications on the PC). I've added all the lines above to my own 4.0.4.2 installation and it worked fine (if everything works fine you won't need them anyway, that's why they are not included in the web.config by default). So I'm thinking 2 things: either something has gone wrong with your setup of your PC or something is hindering the web application to access the module in question.
There is one thing you might want to check: in IIS6 manager, if you right click on your default web site and click on properties, then select the directory tab and click on configuration, then it should be the second tab: here are the server properties for session state. If session state is turned off here it will most probably not work on your web site, so have a look and see if you can find anything suspicious.
Otherwise I'm out of my wits and if I were in your situation I would either get my hands on another XP machine or setup my own machine from scratch.
Best regards,
Sascha
Hi Sascha
I have made a new setup on an other machine that was exactly identical with the one I had the problems on.
Here I could also see the new installed Umbraco both the login and localhost. It worked fine.´
Afterwards I took a copy from the one machine to the other and just made a copy past into the wwwroot. That worked fine too.
Then I got crazy... :-) I took the web.config that I had downloaded from the provider server and compared it with the web.config from the new installation. That took some time... :-)
Here I saw that the provider had added a new session with a specific url to there own server, where I think they may have some security and some other things related to that. So I texted them out and then.... :-) now it works. My problem is solved
Anita
Wonderful, glad to hear you got it working. Odd that the provider would add session information linking to another server in the web.config file. But I guess that is not your problem at the moment now that you got it running on your local host. :)
Kind regards,
Sascha
Hi Sascha
No it's not my problem right now. But it will be my problem when I have made the change to the site. Then I have to load it back to the providers server again.
I think the web.config is the place where the hole umbraco is connected with the masterpages and so on. Is that correct?
regards
Anita
Hi Anita,
the web.config has not really anything to do with the masterpages, it is more of a configuration for the web site from a non-content point of view, so things like which .Net dlls need to be present and loaded, how the server will react to certain requests, configuration of the membership profiles and SMTP clients etc etc. And also how the session state is held, e.g. if it is held 'inProc' (aka in memory) or on a server, which is mostly relevant when using multiple servers or if you maybe want to persist the session even after the user is 'gone'. So in order for you to get it running on the server again I guess you would just have to plug in the code you disabled and it should work perfectly fine on the server. I usually don't touch the web.config file at all when uploading changes to a web site as it is in most cases different from my local version anyway and does not need to change if you make any content, CSS, XSLT etc. changes.
However I would probably send the provider an email asking them why they changed the web.config file (which is usually not their concern at all) and to what purpose. It might not be anything really but might also be good to know. It is jsut quite odd because there is also a machine.config file which contains the configuration for the whole server, so if they wanted all their hosted web sites to use a certain session state they could do it probably via this file.
Kind regards,
Sascha
is working on a reply...