Netbeans 8.0.2, Glassfish 3 tutorial - where is the EAR file? - web-deployment

I'm taking the following tutorial on creating an enterprise app through NetBeans:
https://netbeans.org/kb/docs/javaee/entappclient.html#Exercise_10
Before doing the tutorial, I downloaded Glassfish 3 (which we use in production) and added it as a server in NetBeans. I also deleted the Glassfish 4 server from the server node in the NetBeans IDE.
I've built, deployed and run the enterprise app - it works. However, the deployment instructions shown below suggest that an EAR file should have been created, and I haven't been able to find it. Where should I look, or was it actually created?
Deploying the Enterprise Application
You can now build and run the enterprise application. When you run the application, the IDE will deploy the EAR archive to the server.
Right-click the EntAppEJB enterprise application and choose Deploy.
When you click Deploy, the IDE builds the enterprise application and deploys the EAR archive to the server. If you look in the Files window you can see that the EJBRemoteInterface JAR is deployed with the application.
In the Services window, if you expand the Applications node of GlassFish Server you can see that EntAppEJB was deployed.

for me after clean build EnterpriseApplication i can find .ear under dist folder.

Related

Deploy ASP.NET Core Razor page to Azure App Service

I'm trying to host a ASP.NET Core RazorPages project in Azure App Service.
As an example I've created a new project and that's the app I want to publish.
At first: the publish function from VS2019 (CE) failed with an exception. It is a common exception and I'm not investigate more time in in.
So I thought: I publish it using the portal. So i have a Free account of Azure, create a Resource Group, a Hosting Plan and a Web App. Then i've upload my website using OneDrive and that works.
I've add the ASP.NET Core 3.1 (x86) Runtime to the extensions and the stack is .NET Core (32 bit, because of free plan). I've build the app also for x86.
But the application doesn't work. When I add a default Index.html to the application it works (but not the Razor Pages).
Who can solve this problem??
Regards
Donovan
Looks like you copied too many files to your App Service. The bin/debug and/or bin/release folders should not be there. You need to prepare the website for deployment. In Visual Studio, you can do so by doing a right-click on the ASP.NET project and selecting 'Publish'. On the page that opens, configure a local publish to a folder. The contents of that folder should then be copied to the App Service.
For more information, see Deploy an app to a local folder using Visual Studio.
Also interesting: Host and deploy ASP.NET Core
The dotnet publish command compiles app code and copies the files required to run the app into a publish folder. When deploying from Visual Studio, the dotnet publish step occurs automatically before the files are copied to the deployment destination.
Folder contents
The publish folder contains one or more app assembly files, dependencies, and optionally the .NET runtime.
A .NET Core app can be published as self-contained deployment or framework-dependent deployment. If the app is self-contained, the assembly files that contain the .NET runtime are included in the publish folder. If the app is framework-dependent, the .NET runtime files aren't included because the app has a reference to a version of .NET that's installed on the server. The default deployment model is framework-dependent. For more information, see .NET Core application deployment.
In addition to .exe and .dll files, the publish folder for an ASP.NET Core app typically contains configuration files, static assets, and MVC views. For more information, see ASP.NET Core directory structure.

App_Code in local IIS and Azure/TFS build

I am using Visual Studio Express 2013 for Web & developing web APPS ( not sites ) on .net 4.5.
I build,test & view my site on a local IIS 7.5.
I host on Azure - using App Services.
I build and release to an App Services slot using VSTS Online
I have my classes in an App_Code folder - files are marked as compile
This appears to be the only way I can set this up to work on local IIS ( or am I missing something ?)
And it all works - all classes are available
But I need to build and release on VSTS/TFS ( using VS Team explorer to push)
I am using the standard Azure Web App build definition module on TFS -
Which takes the App_Code folder and moves it into the bin folder - but does not compile it - thus breaking the classes when they are deployed
I have tried renaming App_Code but that breaks local and still does not compile on TFS
What am I missing - how do I get TFS to either compile my classes OR copy the App_Code folder to the root ( not ideal but hey it works )?
In TFS, dll files will be generated under bin folder when you build a Class Library project. This is the correct phenomenon. Suggest you to create a Nuget Packages to manage your class libraries . And you can add a "NuGet Installer" task at the top of your build definition to restore the nuget packages for your solution.
If you are using vNext Build on TFS. There also has been a very detail tutorial Build and Deploy Azure Web Apps using Team Foundation Server/Services vNext Builds for you reference.

How to publish a asp.net 5 project in visual studio 2015 to a docker image or linux without azure

in visual studio 2015 i have a asp.net 5 web application which runs fine on windows. But i like to run it under linux. I already set up a linux vm with centOS 7 and installed the needed resources as described under installing-on-centos-7.
Now i like to publish the web application into the linux vm. How can i do this? What i have to do to publish it, any hints?
I already read many sites about using docker with azure but this is not an option (because of company reasons).
Thank you for your help.
Run dnx publish or dotnet publish and you'll get the published app. Then copy all the files in docker container or add the copy step to the dockerfile

ASP.NET WebForms : Unable to find ArcGISRuntime deployment folder (on server)

I have a simple .NET WebForms application with ArcGIS Runtime SDK for .NET 10.2.6.0 installed on the development machine running MS Visual Studio Professional 2013.
When I run my ASPX page locally, no issues. But when trying to do the same on the web server where I copied the project via FTP, I get the following runtime server error:
Error initializing ArcGISRuntimeEnvironment. Unable to find ArcGISRuntime deployment folder. To create a deployment run the ArcGISRuntime Deployment Tool to create a folder called arcgisruntime10.2.6
ArcGIS deployment folder VS is using on the development machine is probably within the GAC :
C:\Program Files (x86)\ArcGIS SDKs\DotNet10.2.6\WindowsDesktop\bin\arcgisruntime10.2.6
I uploaded ArcGIS DLL & deployment folder on the server via FTP as follows:
/site/wwwroot/bin/Esri.ArcGISRuntime.dll
/site/wwwroot/bin/arcgisruntime10.2.6/
/site/wwwroot/bin/arcgisruntime10.2.6/client32/
/site/wwwroot/bin/arcgisruntime10.2.6/client64/
ASP.Net page I run is at the root:
/site/wwwroot/TestPage.aspx
and the business logic CS file at:
/site/wwwroot/Content/Geometry.cs
So where the ArcGIS deployment folder has to be created if not in the /bin ? Also are client32 & client64 enough to avoid the runtime error, knowing that I haven't copied LocalServer and resources subfolders? Perhaps I should change ArcGISRuntimeEnvironment.InstallPath but I don't know how to do that.
Thanks
The runtime SDK can't be used for server side applications as it's against the licensing requirements. You need to switch to using ArcGIS Server or Portal.

Creation of asp.net websites artifacts in Teamcity from SVN repository

I'm using TeamCity Professional Version 4.5.4 (build 9071) at work to build my asp.net web application project.
My solution file consists of several projects (e.g. web application, unit tests, some web service project, etc).
I want to create an artifact consisting of my web application (the others can be ignore for now), so I have the following configuration on teamcity (deviating from the default values):
General Settings
Artifact Paths: trunk\project-src\intranet-webapp***=>WebAppArtifact
Version control settings (SVN)
Automatically checkout on agent
Runner (sln2008)
Targets: Clean Publish
It builds my artifacts just fine, but there is a big problem: The artifact keeps the ".svn" folders and the .cs (C# code-behind) files in it.
I expected that with the "Publish" target in my runner, I would have exactly what the "Publish project" menu in VS 2008 does: copies the compiled project to some location without the code-behind files and no .svn folders.
Could anyone tell me what configuration am I missing?
If you will use checkout on server, there will be no .svn directories.

Resources