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

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.

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.

How to deploy ASP.NET MVC application with devexpress components to Azure websites

Is there a way to deploy asp net application with dexexpress components other than using virtual machine with installed libs on it?
I want to deploy it to azure websites but get an error that .dll are missing (dont get that error during debugging on localhost where devexpress installed).
Be sure, that you marked the referenced assemblies that you want to publish on the vm as "copy local = true". You can find that option in the properties of a reference.
The output folder of your web app will be automatically copied over to azure websites. For more information how web pages are packaged have a look How to: Create a Web Deployment Package in Visual Studio
You can try one of these options:
Find a NuGet package which includes the dll's you need. I don't know which components you use but NuGet contains a lot of packages -> https://www.nuget.org/packages?q=devexpress
Include the dll's you need in a 3thPartyLib in your project and then reference these assemblies (with copy local = true) from your project.
Be sure to include the license file in your deployment.

Deploying ASP.Net Project to Ubuntu server using Mono

I have developed an ASP.net 4.5 Project using Visual Studio 2013 and I am assigned to deploy it on our Ubuntu server.
Like what other tutorials said I need to use Mono to make this possible. I think I followed those steps but when I try to open the page, it gives me this error.
I had this exception when deploying my application, but to a Windows Server. The problem was that some dlls references pointed to my local assemblies. (example: System.Web.Http.WebHost was referenced to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Http.WebHost.dll, so in the server this LoadException ocurred because this dll was missing.)
So the generic answer is: There is some dll missing. Compare the references in your project with the bin folder in the server. If there's some reference that points to local machine, change the property CopyLocal to true, so when you compile and publish the dll will be copied to the output directory.
I don't use Mono, but how this same problem ocurred to me in a Windows Server, may be the same problem with you in a Linux Machine.
If the probem persists, try to create a simple project, with just one page and a few dependencies just to see if the asp.net works fine in this server.

Could not load file or assembly 'System.Web.WebPages' Asp.Net Webforms Navigation

I recently installed the package [Navigation] to an ASP.Net 4.5 Web Application. While I am running it on my local machine [I have VS 2012 installed] it works fine, but when I deploy to the production server I am receiving the error: Could not load file or assembly 'System.Web.WebPages'. I have added references to Syste.Web.WebPages and Syste.Web.WebPages.Deployment but no luck.
You need to set the reference to copy local so that the dll appears in your bon folder or alternatively use the "add deployable dependencies" function in vs for a better way.
the problem is your production server doesn't have the library in it's gac so you need to provide it.
Do it this way, http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx however it is an MVC project but will work for you.

How to add reference to Microsoft.Office.Interop.Word.dll while copying an asp.net app from dev server to test server

I am referencing Microsoft.Office.Interop.Word.dll in my asp.net web application at development server.
No i need to move this app from development server to testing server.
I can't see the dll in the bin folder of the app as it is pointing to GAC.
How should i reference the above specified dll in testing server?
Do we need to do anything with web.config?
Please advice.
Thanks,
Ram
Visual Studio uses different sets of the PIAs on the development computer. These different sets of assemblies are in the following locations:
A folder in the program files directory.
These copies of the assemblies are used when you write code and build projects. Visual Studio installs these assemblies automatically.
The global assembly cache.
These copies of the assemblies are used during some development tasks, such as when you run or debug projects that target the .NET Framework 3.5. Visual Studio does not install and register these assemblies; you must do this yourself.
Link
If not found DLL you have to download from internet....

Resources