Copied to clipboard

Flag this post as spam?

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


  • Alex 29 posts 58 karma points
    May 13, 2015 @ 10:32
    Alex
    0

    Deploying Umbraco using Visual Studio

    Hi, I am trying to deploy my Umbraco Visual Studio solution to our local server for testing.  I couldn't find much of the information by googling.  Found this but it sounds quite complicated and not sure if it's the right source:

    http://maffrigby.com/how-to-deploy-umbraco-7-to-an-azure-website-using-visual-studio-online/

    Can anyone suggest for some guide or documentation on deploying Umbraco Visual Studio solution please?

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 13, 2015 @ 16:37
    James Jackson-South
    1

    It should be as simple as creating and implementing publish profiles for your solution.

    Here's some documentation on that.

    https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx

  • Alex 29 posts 58 karma points
    May 14, 2015 @ 15:57
    Alex
    0

    Thank you for your reply James.  

    I have managed to publish it using using Files systems as a Publish method.  I have deployed to a our local staging server but when I run on a browser I am getting the following error message:

    "An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine." 

    <!-- Web.Config Configuration File -->

    <configuration>

        <system.web>

            <customErrors mode="Off"/>

        </system.web>

    </configuration>

     

    But when I check my config file the setting is: <customErrors mode="RemoteOnly" />

    Can anyone help please.  What am I doint wrong?

     

     

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 14, 2015 @ 18:16
    James Jackson-South
    1

    Hi Alex,

    Are you seeing that error on a browser out-with the development server or through remote desktop?

    First thing, could you change that value to Off so you can see what the error message is and post the result here?

    The most common issue when deploying via Visual Studio is that files are missed since Visual Studio will only deploy files that are included in the project. Anything contained within App_Data is usually missed and some important Umbraco folders might be missing also unless they are specifically added.

    I would also check connection string for the database once you have the error message.

    Let me know how you get on.

    James

  • Alex 29 posts 58 karma points
    May 14, 2015 @ 18:36
    Alex
    0

    Thank you James,

    While this site was down ((( I have been making some changes, namely, switched that value to Off now and can see a different error:

    "Parser Error Message: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework."

    Line 112:      <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>

    Line 113:    </httpHandlers>

    Line 114:    <compilation defaultLanguage="c#" batch="false" targetFramework="4.5">

    Line 115:      <assemblies>

     

    Line 116:        <add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    I don't understand why I am getting this error.  I have checked the Application Pool in IIS 7 Server manager and the highest framework was available v4.0.3019.  I've been googling about this I read that this should be fine.  I have also changed my application to target from 4.5.1 to 4.5, but still the same error occurres.

    In terms of app data and databases, my app initial configuration was based on default local db and I hardly done any work - just using the included a starter-kit.

    The reason I created in Visual Studio is that in the next version I will be adding some code for authentication etc and would prefer to have Visual Studio.  But if this defenately causing the problem I can "initially' use another editor, perhaps Webmatrix?  In a long run though I will need Visual Studio and I skip this now it will comeback again.

    I really don't know what to do.  

     

      


     


  • Alex 29 posts 58 karma points
    May 14, 2015 @ 19:14
    Alex
    0

    Right, I have created a new simple MVC project in Visual Studio without installing any Umbraco libraries for testing.  And I am still geting the same above errors.  In a way it is a good news because it means there is nothing wrong with Umbraco files and libraries.  So it's more general issue and I hope I can find some answers quicker.

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 14, 2015 @ 19:30
    James Jackson-South
    1

    It looks to me like you don't have .NET 4.5 or greater installed on the development server. I'd double check that.

  • Alex 29 posts 58 karma points
    May 15, 2015 @ 11:49
    Alex
    0

    Thank you James.  Yes, that was the problem, the server did not have latest version of .net framework.  I've installed it now and the website can run.  However, I cannot login to backend.  If I run on localhost using Visual Studio it works fine, but not from the domain site.

    The database is default and nothing that I have changed/added apart from few users from backend.  In terms of design/implementation - also nothing, only a starter kit.  So I don't think that this can be to do with the database, but not sure.

    I've found one similar thread here but no solution been proposed apart from looking into cache but I have tested from different browsers.

    Any suggestions please?

  • Alex 29 posts 58 karma points
    May 15, 2015 @ 12:09
    Alex
    0

    This is the error I am getting and not sure what to do.  It looks as there is a problem with the database access.  Can anyone please suggest what extra step should I take when publishing solution in Visual Studio if the database is default.  Should I still change any connection strings?

    POST http://myumbraco/umbraco/backoffice/UmbracoApi/Authentication/PostLogin 500 (Internal Server Error)

    ExceptionMessage: "The database file cannot be found. Check the path to the database. [ Data Source = E:\Inetpub\Umbraco\App_Data\Umbraco.sdf ]" ExceptionType: "System.Data.SqlServerCe.SqlCeException" Message: "An error has occurred." StackTrace: " at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) ↵ at System.Data.SqlServerCe.SqlCeConnection.Open() ↵ at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.<>c__DisplayClass1.b__0() ↵ at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) ↵ at Umbraco.Core.Persistence.Database.OpenSharedConnection() ↵ at Umbraco.Core.Persistence.Database.d__1c`1.MoveNext() ↵ at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) ↵ at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) ↵ at Umbraco.Core.Persistence.Repositories.UserRepository.PerformGetByQuery(IQuery`1 query) ↵ at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetByQuery(IQuery`1 query) ↵ at Umbraco.Core.Services.UserService.GetByUsername(String username) ↵ at Umbraco.Web.Security.Providers.UmbracoMembershipProvider`2.ValidateUser(String username, String password) ↵ at Umbraco.Web.Editors.AuthenticationController.PostLogin(LoginModel loginModel) ↵ at lambda_method(Closure , Object , Object[] ) ↵ at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.b__c(Object instance, Object[] methodParameters) ↵ at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) ↵ at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 15, 2015 @ 12:24
    James Jackson-South
    0

    Ah right... The database got copied up yeah? It might not have due to it being in the App_Data folder. Remember how I said things could get missed.

    Check it's there, if it is, then double check your connection string. It should be something like this...

       <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
    

    Let me know how you get on.

  • Alex 29 posts 58 karma points
    May 15, 2015 @ 12:45
    Alex
    0

    Thanks James.  I have copied all the folders to App_Data folder and yes indeed most of them were missing, including .sdf file.  But now I am getting the access denied error as below:

    ExceptionMessage: "Access to the database file is not allowed. [ 1914,File name = E:\Inetpub\Umbraco\App_Data\Umbraco.sdf,SeCreateFile ]"

    ExceptionType: "System.Data.SqlServerCe.SqlCeException"

    Message: "An error has occurred."

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 15, 2015 @ 12:59
    James Jackson-South
    100

    R-click and make sure that your database permissions are not set to readonly. Also make sure your application has read/write permissions to the folder/file.

    Check the thread here. They have the same issue.

    http://forums.asp.net/t/1889383.aspx?Please+help+me+fix+this+error+Access+to+the+database+file+is+not+allowed+

  • Alex 29 posts 58 karma points
    May 15, 2015 @ 14:07
    Alex
    0

    It seems that I am hitting every possible error as I am trying to deploy (((

    I have changed the security permissions to various users for App_Data and umbraco.sdf file.  Now it behaves oddly - when browse to MYDOMAIN the browser displays a comple blank screen.  But if I try MYDOMAIN/Umbraco it works and I can even now login successfully.

    This is really odd - I can't understand.  I have also copied some other missing folders too such as css js in case.

    I even re-published again but still blank screen on my main domain. 

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 15, 2015 @ 14:22
    James Jackson-South
    0

    I there anything in the source for the page?

    Try deleting the umbraco.config file in the App_Data folder and republishing the content.

  • Alex 29 posts 58 karma points
    May 15, 2015 @ 15:21
    Alex
    0

    No, there were nothing displaying in the source page.  After fiddling with the folders and files manually one-by-one and deleting umbraco.config file as you have suggested it worked )))  There were view files missing in Views folder - I don't know why.

    I would like to thank you very much James for your support throughout the process, without it I would have been still stack, who knows for how long.

    I am thinking to put the steps I went through somewhere here in some designated area so that other users can avoid the difficulties I went through.

    Thank you again for your help! 

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 15, 2015 @ 16:32
    James Jackson-South
    0

    Ah brilliant! So glad you got it working! :) The views might not have been included in the Visual Studio project.

    My absolute pleasure, more than happy to help. If you can mark one of the answers as an answer that will help clean up the forum and help others.

Please Sign in or register to post replies

Write your reply to:

Draft