Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jimmy Dan Mortensen 2 posts 22 karma points
    Jan 26, 2010 @ 19:58
    Jimmy Dan Mortensen
    0

    Deployment to external webserver

    Hi Gurus.

    I'm trying out Umbraco, and had it installed locally on my Windows 7 using a local sqlexpress 2008 db. Now I want to show what I have made, and are trying to move it to my webserver.

    My installation is an IIS 6 webserver and a SQL Server 2005 which is installed on a different machine.

    When I moved the DB, i exported it from my sqlexpress to a Access-db, and imported it on the SQLServer. The import apparently went well, as I have compared a lot of the tables.

    I get the following error when trying to view the website:

    --------------------

    Specified cast is not valid. 

    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.InvalidCastException: Specified cast is not valid.

     

    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: 

     

     

    [InvalidCastException: Specified cast is not valid.]

       System.Data.SqlClient.SqlBuffer.get_Boolean() +4838873

       System.Data.SqlClient.SqlDataReader.GetBoolean(Int32 i) +38

       umbraco.DataLayer.RecordsReaderAdapter`1.GetBoolean(String fieldName) +36

       umbraco.BusinessLogic.User.setupUser(Int32 ID) +167

       umbraco.BusinessLogic.User..ctor(Int32 ID) +101

       umbraco.BusinessLogic.User.GetUser(Int32 id) +89

       umbraco.content.LoadContentFromDatabase() +82

       umbraco.content.LoadContent() +89

       umbraco.content.get_XmlContentInternal() +81

       umbraco.content.get_XmlContent() +76

       umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e) +887

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

       System.EventHandler.Invoke(Object sender, EventArgs e) +0

       System.Web.UI.Page.OnPreInit(EventArgs e) +8698174

       System.Web.UI.Page.PerformPreInit() +31

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282

     

     

     

     

    --------------------------------------------------------------------------------

    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 

    Request Details 

    Session Id: mcapsz2rgcyixa45ysvb0f55 Request Type: GET 

    Time of Request: 26-01-2010 19:45:18 Status Code: 500 

    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8) 

    Trace Information 

    Category Message From First(s) From Last(s) 

    registerIapplications + Adding application 'Nibble.Umb.MailEngine.AddMailingActionEvent   

    registerIapplications + Adding application 'umbraco.presentation.nodeFactory.UmbracoSiteMapProviderAccessUpdate 0,64433921212724 0,644339 

    aspx.page Begin PreInit 2,08203722048171 1,437698 

    umbracoInit handling request 2,08756125449633 0,005524 

    Unhandled Execution Error 

    Specified cast is not valid.

      at System.Data.SqlClient.SqlBuffer.get_Boolean()

      at System.Data.SqlClient.SqlDataReader.GetBoolean(Int32 i)

      at umbraco.DataLayer.RecordsReaderAdapter`1.GetBoolean(String fieldName)

      at umbraco.BusinessLogic.User.setupUser(Int32 ID)

      at umbraco.BusinessLogic.User..ctor(Int32 ID)

      at umbraco.BusinessLogic.User.GetUser(Int32 id)

      at umbraco.content.LoadContentFromDatabase()

      at umbraco.content.LoadContent()

      at umbraco.content.get_XmlContentInternal()

      at umbraco.content.get_XmlContent()

      at umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e)

      at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)

      at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)

      at System.EventHandler.Invoke(Object sender, EventArgs e)

      at System.Web.UI.Page.OnPreInit(EventArgs e)

      at System.Web.UI.Page.PerformPreInit()

      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 48,1235004728397 46,035939 

    Control Tree 

    Control UniqueID Type Render Size Bytes (including children) ViewState Size Bytes (excluding children) ControlState Size Bytes (excluding children) 

    __Page ASP.default_aspx 0 0 0 

    Session State 

    Session Key Type Value 

    Application State 

    Application Key Type Value 

    umbracoUrl System.String 10.100.8.19:81/umbraco 

    umbracoNeedConfiguration System.Boolean False 

    Request Cookies Collection 

    Name Value Size 

    Response Cookies Collection 

    Name Value Size 

    Headers Collection 

    Name Value 

    Connection Keep-Alive 

    Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */* 

    Accept-Encoding gzip, deflate 

    Accept-Language da 

    Host 10.100.8.19:81 

    User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) 

    UA-CPU x86 

    Response Headers Collection 

    Name Value 

    X-AspNet-Version 2.0.50727 

    Cache-Control private 

    Content-Type text/html 

    Form Collection 

    Name Value 

    Querystring Collection 

    Name Value 

    Server Variables 

    Name Value 

    ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:da HTTP_HOST:10.100.8.19:81 HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) HTTP_UA_CPU:x86  

    ALL_RAW Connection: Keep-Alive Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */* Accept-Encoding: gzip, deflate Accept-Language: da Host: 10.100.8.19:81 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) UA-CPU: x86  

    APPL_MD_PATH /LM/W3SVC/2069684684/Root 

    APPL_PHYSICAL_PATH D:\Inetpub\wwwroot\test.hessel.dk\ 

    AUTH_TYPE   

    AUTH_USER   

    AUTH_PASSWORD   

    LOGON_USER   

    REMOTE_USER   

    CERT_COOKIE   

    CERT_FLAGS   

    CERT_ISSUER   

    CERT_KEYSIZE   

    CERT_SECRETKEYSIZE   

    CERT_SERIALNUMBER   

    CERT_SERVER_ISSUER   

    CERT_SERVER_SUBJECT   

    CERT_SUBJECT   

    CONTENT_LENGTH 0 

    CONTENT_TYPE   

    GATEWAY_INTERFACE CGI/1.1 

    HTTPS off 

    HTTPS_KEYSIZE   

    HTTPS_SECRETKEYSIZE   

    HTTPS_SERVER_ISSUER   

    HTTPS_SERVER_SUBJECT   

    INSTANCE_ID 2069684684 

    INSTANCE_META_PATH /LM/W3SVC/2069684684 

    LOCAL_ADDR 10.100.8.19 

    PATH_INFO /Default.aspx 

    PATH_TRANSLATED D:\Inetpub\wwwroot\test.hessel.dk\Default.aspx 

    QUERY_STRING   

    REMOTE_ADDR 192.168.251.116 

    REMOTE_HOST 192.168.251.116 

    REMOTE_PORT 1461 

    REQUEST_METHOD GET 

    SCRIPT_NAME /Default.aspx 

    SERVER_NAME 10.100.8.19 

    SERVER_PORT 81 

    SERVER_PORT_SECURE 0 

    SERVER_PROTOCOL HTTP/1.1 

    SERVER_SOFTWARE Microsoft-IIS/6.0 

    URL /Default.aspx 

    HTTP_CONNECTION Keep-Alive 

    HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */* 

    HTTP_ACCEPT_ENCODING gzip, deflate 

    HTTP_ACCEPT_LANGUAGE da 

    HTTP_HOST 10.100.8.19:81 

    HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) 

    HTTP_UA_CPU x86 

    Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 

    ------------------

    I hope that someone has the answer, as it is getting quite frustrating :-)

    Best regards
    Jimmy Dan Mortensen

  • Rich Green 2245 posts 3856 karma points
    Jan 26, 2010 @ 20:11
    Rich Green
    1

    When I've had to go from SQL Server 2008 to SQL Server I've created a script of the 2008 db (selecting script data) and then ran this script on a fresh 2005 database.

    I'd give this a try as it sounds like a data type got mislaid along the way.

    R

  • Nico Lubbers 151 posts 170 karma points
    Jan 26, 2010 @ 23:10
    Nico Lubbers
    0

    I agree with Rich, simply follow these steps:

    • open SQL Server Management Studio
    • right-click on your database and choose Tasks- Generate Scripts
    • Now take a look at the settings, I always change the following:
    • Script for server version (in your case 2005)
    • Script drop: true
    • Script create: true
    • Script Data: true
    • Script indexes: true
    • Script Primary Keys: true
    • In the next step, choose Tables
    • In the next step: choose "select all" button
    • In the next step. Script to file

    Now.. with this script you can simply build a new database on a different location. Is working for me.

    Nico

  • Jimmy Dan Mortensen 2 posts 22 karma points
    Jan 27, 2010 @ 13:38
    Jimmy Dan Mortensen
    0

    Thank you so much. I figured out that it was some sort of wrong format - But your way of exporting and importing data is obviously the right way to do things. I'll remember that for the future.

    Again thank you for the extremely fast help.

    Best regards
    Jimmy Dan Mortensen

Please Sign in or register to post replies

Write your reply to:

Draft