Copied to clipboard

Flag this post as spam?

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


  • Roger Withnell 128 posts 613 karma points
    Aug 20, 2015 @ 12:13
    Roger Withnell
    0

    Publish from Visual Studio

    First website now ready to be published from Visual Studio 2013 using FTP. Database already on the production server.

    Is there a guide how to do this? Tried and get a lot of errors. Found several entries on the web about only publishing certain files and not compiling nor building?

    Your help would be much appreciated.

    Thanking you in anticipation.

    Roger

  • David Veksler 81 posts 166 karma points
    Aug 20, 2015 @ 12:24
    David Veksler
    1

    I just launched my first Umbraco site (yay) by publishing using Visual Studio 2015. I used default options and it worked fine. I'm publishing to another folder directly on the server.

    In my project, I've excluded my media and App_Data folders, but otherwise it's important to include everything else (otherwise it won't get pushed).

    I suggest not using FTP - it will take a long time and will be error prone.

    publish screenshot

  • Samira 113 posts 452 karma points
    Aug 20, 2015 @ 12:26
    Samira
    1

    Hi,

    You publish Your First site on live server??

    What kind of error you seee??

    Grazitti

  • Roger Withnell 128 posts 613 karma points
    Aug 20, 2015 @ 16:00
    Roger Withnell
    0

    I've made progress by simply uploading all the files to the production server through the file system. Upgraded the server to Framework 4.5 to fix the first error (local development server on 4.5).

    Here is the stack trace of the error that now occurs on the production server (works fine on the local development server).

    Server Error in '/' Application.
    --------------------------------------------------------------------------------
    
    Access to the path 'D:\...\App_Data\TEMP\PluginCache\umbraco-plugins.CP5-43782.hash' is denied. 
    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.UnauthorizedAccessException: Access to the path 'D:\....\App_Data\TEMP\PluginCache\umbraco-plugins.CP5-43782.hash' is denied. 
    
    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. 
    
    To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
    
    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: 
    
    
    [UnauthorizedAccessException: Access to the path 'D:\....\App_Data\TEMP\PluginCache\umbraco-plugins.CP5-43782.hash' is denied.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +10760710
       System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1352
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +66
       System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +73
       System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +124
       System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) +64
       System.IO.File.WriteAllText(String path, String contents, Encoding encoding) +42
       Umbraco.Core.PluginManager.WriteCachePluginsHash() +76
       Umbraco.Core.PluginManager..ctor(Boolean detectChanges) +257
       Umbraco.Core.PluginManager.get_Current() +216
       Umbraco.Core.CoreBootManager.InitializeApplicationEventsResolver() +10
       Umbraco.Web.WebBootManager.InitializeApplicationEventsResolver() +5
       Umbraco.Core.CoreBootManager.Initialize() +331
       Umbraco.Web.WebBootManager.Initialize() +75
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +177
       Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9
    
    [HttpException (0x80004005): Access to the path 'D:\....\App_Data\TEMP\PluginCache\umbraco-plugins.CP5-43782.hash' is denied.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859725
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
    
    [HttpException (0x80004005): Access to the path 'D:\....\App_Data\TEMP\PluginCache\umbraco-plugins.CP5-43782.hash' is denied.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 
    

    I've added the {MACHINE}\ASPNET and I already had IISIUSRS names in the security settings of the AppData folder's parent folder.

    I've also tried removing the App_Data folder completely (as you did, David) and I get a similar error, saying access is denied on ...\PluginCache| folder rather than on the .hash file in it.

    Looking forward to receiving your comments, with gratitude.

    Roger

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Aug 20, 2015 @ 16:10
    Nicholas Westby
    1

    Watch this video to see how I set permissions (about a minute and 15 seconds in): https://www.youtube.com/watch?v=iK8YM3JBgwM

    Basically, you set the permissions based on the name of the application pool, which is typically the same as the name of the website in IIS.

  • Mark Bowser 273 posts 860 karma points c-trib
    Aug 20, 2015 @ 16:38
    Mark Bowser
    1

    When you are publishing umbraco sites, remember not to publish anything in the App_Data/ folder except for access.config and the packages/ folder. All of the rest of the files in App_Data are all temp files that will probably need to be regenerated anyways.

    The packages/ folder just has some xml that Umbraco uses in the developer section to display what packages you've installed or created. Not mission critical but still nice to have.

    The access.config file is what Umbraco uses to store its public access settings per node. This could potentially be mission critical. Without this file, you won't have public access.

  • Roger Withnell 128 posts 613 karma points
    Aug 21, 2015 @ 07:36
    Roger Withnell
    0

    Getting there!

    Nicolas, setting permissions based on the application pool fixed the permissions problem.

    Now, the website works fine but when I go to domain.com/Umbraco, I get a blank page!

    Any thoughts on that?

  • Roger Withnell 128 posts 613 karma points
    Aug 21, 2015 @ 14:11
    Roger Withnell
    0

    Still stuck on opening the back office on the production server. The website displays correctly on the front office.

    domain.com/Umbraco does not forward to domain.com/Umbraco/#/login. I've uploaded all the files again using Visual Studio's File System publish method to a local folder and then uploading the local folder to the production server with FTP.

    The Umbraco system requirements are OK - I've added 4.5 Full Trust to the web.config.

    Is there anything else I should check on the production server (2008 R2)?

    I need your help, please, guys. Don't know what to try next!

    Roger

  • Roger Withnell 128 posts 613 karma points
    Aug 21, 2015 @ 14:53
    Roger Withnell
    0

    Looks like the problem is to with Angular js.

    The domain.com/Umbraco calls a function using angular and gives the error "Angular is undefined".

    What do I do to define it in my project?

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Aug 22, 2015 @ 05:49
    Nicholas Westby
    100

    Angular comes with Umbraco. You don't need to do anything to include it. Maybe ensure you have everything you are supposed to in the Umbraco and Umbraco_Client folders.

    Which version of Umbraco are you using?

  • Roger Withnell 128 posts 613 karma points
    Aug 22, 2015 @ 16:51
    Roger Withnell
    0

    I've finally managed to upload to the production server and the front and back offices are working. Thanks to all the contributors above for your invaluable help.

    Here are some comments about this saga, which may be of help to others. These points apply to my specific case, using Visual Studio 2013, and may not be appropriate or effective elsewhere:

    1) Using FTP (with FileZilla) never worked. A range of problems. 2) Using Web Deploy from Visual Studio did work but one has to get the server IIS set up correctly. https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx and https://msdn.microsoft.com/en-us/library/dd394698(v=vs.110).aspx were helpful in the regard. However: 3) Files in the App_Data folder were required. I lost patience with working out which ones so I just uploaded the lot. Make sure the folders are included in the project and

    Thanks again, guys. I've given the solution tick to Nicholas because his last comment inspired me to try Web Deploy rather than FTP and then there was light at the end of the tunnel

    Roger

  • Josh Yates 6 posts 86 karma points
    Jul 17, 2016 @ 16:00
    Josh Yates
    0

    I had to exclude App_Data, Bin, and media folder from my solution.

    I added to the .pubxml

    <AutoParameterizationWebConfigConnectionStrings>false</AutoParameterizationWebConfigConnectionStrings>
    
Please Sign in or register to post replies

Write your reply to:

Draft